summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-10-10 10:13:30 +0100
committerPádraig Brady <P@draigBrady.com>2013-10-10 10:19:13 +0100
commitbae9c38410ca338d603ea4f62fb4ef177705d8ff (patch)
tree1c655053b046d1c3e0cdb40c495cdb7a114ef82b /doc
parentcba81e7b84f27385e254cddd065bb16c98a5d045 (diff)
downloadcoreutils-bae9c38410ca338d603ea4f62fb4ef177705d8ff.tar.xz
doc: clarify the example for cp --preserve=links
* doc/coreutils.texi (cp invocation): Give more detail about what's happening in the example, explicitly calling out the --no-dereference option required to make the -H and -L options significant. Also mention the option order significance of the -H and -L options. Fixes http://bugs.gnu.org/15579
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index b27362778..cc806d52c 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8257,9 +8257,11 @@ $ mkdir c; : > a; ln -s a b; cp -aH a b c; ls -i1 c
@noindent
Note the inputs: @file{b} is a symlink to regular file @file{a},
yet the files in destination directory, @file{c/}, are hard-linked.
-Since @option{-a} implies @option{--preserve=links}, and since @option{-H}
-tells @command{cp} to dereference command line arguments, it sees two files
-with the same inode number, and preserves the perceived hard link.
+Since @option{-a} implies @option{--no-dereference} it would copy the symlink,
+but the later @option{-H} tells @command{cp} to dereference the command line
+arguments where it then sees two files with the same inode number.
+Then the @option{--preserve=links} option also implied by @option{-a}
+will preserve the perceived hard link.
Here is a similar example that exercises @command{cp}'s @option{-L} option:
@smallexample