[lug] Confused about what cp -x does

Peter Hutnick peter-lists at hutnick.com
Sat Jun 29 13:02:14 MDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 29 June 2002 12:29 pm, Evelyn Mitchell wrote:
> The info page for cp is more complete than the man page:
>
>   `-x'
>   `--one-file-system'
>        Skip subdirectories that are on different filesystems from the one
>        that the copy started on.  However, mount point directories
>        _are_ copied.

I can't seem to get in the habit of going to the info pages :-(

I guess I don't really understand what "However, mount point directories _are_ 
copied." really means, though.  It sounds like it is saying that the actual 
mount point (i.e. "archive/" but not its contents) is copied, which makes 
perfect sense, since it is a directory on the "included" filesystem.

OTOH, I'm getting /everything/ that is in the "excluded" filesystem.  (Well, 
three directory levels so far.)

Clearly it is my confusion.  Rsync does the same thing.  But the "x" option 
seem to have no effect at all when used with "r" (or "a"), which seems like 
the only time it /could/ have an effect.

Is it possible that this is NFS related?  I have used the option before and 
gotten the results I expected, but only with local filesystems.

- -Peter

- -- 
/"\ ASCII Ribbon campaign against HTML e-mail
\ /
 X   Get my PGP key at http://hutnick.com/pgp
/ \  6128 5651 6F23 EC17 6EBD  737D 960A 20E6 76CA 8A59
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9HgQ3lgog5nbKilkRAvtOAJ9vSx80vh6wzDMPB8qUQuttnVtYlwCfTrn6
Tum/GL4NJwLUifg/6hZkJhw=
=Ya13
-----END PGP SIGNATURE-----




More information about the LUG mailing list