]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
cp: improve --preserve usage doc
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 Jan 2023 18:39:43 +0000 (10:39 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 Jan 2023 21:53:58 +0000 (13:53 -0800)
* src/cp.c (usage): Improve description of --preserve.

src/cp.c

index 016ae898804e73a731e4aa34bc03ccc958ec2f3d..ede00cd12b69dab94955a01e2d9772948476de12 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -183,11 +183,7 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
 "), stdout);
       fputs (_("\
   -p                           same as --preserve=mode,ownership,timestamps\n\
-      --preserve[=ATTR_LIST]   preserve the specified attributes (default:\n\
-                                 mode,ownership,timestamps), if possible\n\
-                                 additional attributes: context, links, xattr,\
-\n\
-                                 all\n\
+      --preserve[=ATTR_LIST]   preserve the specified attributes\n\
 "), stdout);
       fputs (_("\
       --no-preserve=ATTR_LIST  don't preserve the specified attributes\n\
@@ -227,6 +223,14 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       fputs (_("\
 \n\
+ATTR_LIST is a comma-separated list of attributes. Attributes are 'mode' for\n\
+permissions (including any ACL and xattr permissions), 'ownership' for user\n\
+and group, 'timestamps' for file timestamps, 'links' for hard links, 'context'\n\
+for security context, 'xattr' for extended attributes, and 'all' for all\n\
+attributes.\n\
+"), stdout);
+      fputs (_("\
+\n\
 By default, sparse SOURCE files are detected by a crude heuristic and the\n\
 corresponding DEST file is made sparse as well.  That is the behavior\n\
 selected by --sparse=auto.  Specify --sparse=always to create a sparse DEST\n\