[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Docs for --preserve option
From: |
Ángel González |
Subject: |
Docs for --preserve option |
Date: |
Fri, 14 Aug 2009 01:11:01 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
Hello everybody,
Failing to understand --preserve option *after reading the man page*, I
hope to help
improving the docs so future users won't hit the same builder.
The specific section at cp --help (from which cp man is generated) is:
> --preserve[=ATTR_LIST]
> preserve the specified attributes (default:
mode,ownership,timestamps), if possible additional attributes: context,
links, xattr, all
Upon reading this I wrongly assumed that _failing to provide a preserve
parameter_, it would preserve by default the mode, ownership and timestamps.
I was annoyed on it seeing I needed to manually add
--preserve=mode,ownership,timestamps and it wasn't working 'as
documented' until I found the explanation in the Texinfo manual:
>Using `--preserve' with no ATTRIBUTE_LIST is equivalent to
> `--preserve=mode,ownership,timestamps'.
>In the absence of this option, each destination file is created
> with the mode bits of the corresponding source file, minus the
> bits set in the umask and minus the set-user-ID and set-group-ID
> bits. *Note File permissions::.
I am attaching a rewording proposal that avoids talking about "the
default". If the mailing list strips plain text attachments I can send
it to you directly.
PS: You may want to fix
http://www.gnu.org/software/coreutils/faq/coreutils-faq.html there're
<samp> html tags visible inside anchor tags.
diff --git a/src/cp.c b/src/cp.c
index c99aff3..5577c89 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -181,10 +181,10 @@ Mandatory arguments to long options are mandatory for
short options too.\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 (without\n\
+ ATTR_LIST: mode,ownership,timestamps), if\n\
+ possible. Additional attributes: context,\n\
+ links, xattr, all\n\
"), stdout);
fputs (_("\
--no-preserve=ATTR_LIST don't preserve the specified attributes\n\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Docs for --preserve option,
Ángel González <=