summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-03-02 17:35:39 +0000
committerJim Meyering <jim@meyering.net>2002-03-02 17:35:39 +0000
commit846263ddff9cddb44e1d0099d092506cf2cfe3c7 (patch)
tree54b73d252672905f320570e69f65e3ad9367db70 /doc
parentb9d1d9e98e343443115139c9c9b46d6923ae8966 (diff)
downloadcoreutils-846263ddff9cddb44e1d0099d092506cf2cfe3c7.tar.xz
(cp invocation): Document that cp -r
preserves symlinks. Emphasize non-portability of cp -r.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 65e3cbc38..bac04fa8a 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -5803,9 +5803,10 @@ any missing intermediate directories.
@cindex recursively copying directories
@cindex non-directories, copying as special files
Copy directories recursively, copying any non-directories and special
-files (e.g., symbolic links, FIFOs and device files) as if they were
-regular files. This means trying to read the data in each source
-file and writing it to the destination. It is usually a mistake to
+files (e.g., FIFOs and device files) as if they were regular files.
+This means trying to read the data in each source file and writing it to
+the destination. However, contrary to most other implementations,
+GNU @code{cp -r} preserves symbolic links. It is usually a mistake to
apply @code{cp -r} to special files like FIFOs and the ones typically
found in the @file{/dev} directory. In most cases, @code{cp -r}
will hang indefinitely trying to read from FIFOs and special files
@@ -5814,6 +5815,8 @@ if you use it to copy @file{/dev/zero}.
Use the @option{--recursive} (@option{-R}) option instead if you want
to copy special files, preserving their special nature
rather than reading from them to copy their contents.
+It is not portable to use @code{cp -r} to preserve symbolic links.
+On most non-GNU systems, @code{cp -r} does @emph{not} preserve symbolic links.
@itemx @w{@kbd{--reply}[=@var{how}]}
@opindex --reply