diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-09-21 08:43:03 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2010-07-01 14:33:27 +0100 |
commit | 1af81dfb4d24d104777b8917544d81097db0deab (patch) | |
tree | 3030f158798f4246a3b7d38ba9262adb57705849 /doc/coreutils.texi | |
parent | 8aa15b2be2bd2ab4b76d197a279abf8b9091680a (diff) | |
download | coreutils-1af81dfb4d24d104777b8917544d81097db0deab.tar.xz |
cp: add an option to only copy the file attributes
* src/copy.c (copy_attr): A new function which merges copy_attr_by_fd
and copy_attr_by_name. Also display all errors when --attributes-only
* src/copy.c (copy_reg): Skip copying the file contents if specified.
Refactor the SELinux error handling code a little and display all
SELinux errors when only copying attributes.
* src/copy.h (struct cp_options): Add a data_copy_required boolean
* src/cp.c (main): Default to copying data but don't if specified
* src/install.c: Default to copying data
* src/mv.c: Likewise
tests/cp/reflink-perm: Add a test to check that --attributes-only
does not copy data
* tests/cp/acl: Likewise. Also refactor to remove redundant
acl manipulation
* doc/coreutils.texi (cp invocation): Describe the new option
* NEWS: Mention the new feature
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r-- | doc/coreutils.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 5c2bd1a84..21cf36d1d 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -7357,6 +7357,12 @@ Try to preserve SELinux security context and extended attributes (xattr), but ignore any failure to do that and print no corresponding diagnostic. Equivalent to @option{-dR --preserve=all} with the reduced diagnostics. +@itemx --attributes-only +@opindex --attributes-only +Preserve the specified attributes of the original files in the copy, +but do not copy any data. See the @option{--preserve} option for +controlling which attributes to copy. + @item -b @itemx @w{@kbd{--backup}[=@var{method}]} @opindex -b |