summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivano@gnu.org>2009-08-01 19:36:48 +0200
committerJim Meyering <meyering@redhat.com>2009-08-07 17:14:22 +0200
commita1d7469835371ded0ad8e3496bc5a5bebf94ccef (patch)
tree925945606aa919b7b48603117db6f8ca15e7b551 /doc
parentff159a605e5bc10fe871109f66cba5ee410c9138 (diff)
downloadcoreutils-a1d7469835371ded0ad8e3496bc5a5bebf94ccef.tar.xz
cp: accept the --reflink option
* NEWS: Mention it. * doc/coreutils.texi (cp invocation): Describe it. * src/copy.h (struct cp_options) [reflink]: New member. * src/copy.c (usage): Describe it. (copy_reg): If reflink is true try to clone the file. (main): Check for --reflink. (cp_option_init): Initialize the new member. * src/install.c (cp_option_init): Initialize the new member. * src/mv.c (cp_option_init): Likewise. * tests/cp/sparse: Add a new test case.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 90a54b268..bb1d87a87 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7543,6 +7543,15 @@ Also, it is not portable to use @option{-R} to copy symbolic links
unless you also specify @option{-P}, as @acronym{POSIX} allows
implementations that dereference symbolic links by default.
+@item --reflink
+@opindex --reflink
+Perform a lightweight, copy-on-write (COW) copy.
+Copying with this option can succeed only on some relatively new file systems.
+Once it has succeeded, beware that the source and destination files
+share the same disk data blocks as long as they remain unmodified.
+Thus, if a disk I/O error affects data blocks of one of the files,
+the other suffers the exact same fate.
+
@item --remove-destination
@opindex --remove-destination
Remove each existing destination file before attempting to open it