diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | doc/coreutils.texi | 7 | ||||
-rw-r--r-- | src/touch.c | 7 |
3 files changed, 17 insertions, 5 deletions
@@ -1,3 +1,11 @@ +2007-08-20 Bob Proulx <bob@proulx.com> + + Clarify touch documentation of file arguments. + * src/touch.c (usage): Improve wording of documentation regarding + file argument handling and special handling of - argument. + * doc/coreutils.texi (touch invocation): Likewise. + Documentation problem reported by Vincent Lefevre. + 2007-08-20 Paul Eggert <eggert@cs.ucla.edu> * NEWS: The old cp -p bug affected coreutils releases before 6.0. diff --git a/doc/coreutils.texi b/doc/coreutils.texi index e3164a950..800ca64ca 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -9271,10 +9271,11 @@ touch [@var{option}]@dots{} @var{file}@dots{} @end example @cindex empty files, creating -Any @var{file} that does not exist is created empty. +Any @var{file} argument that does not exist is created empty. -A @var{file} of @samp{-} causes @command{touch} to change the -times of the file associated with standard output. +A @var{file} argument string of @samp{-} is handled specially and +causes @command{touch} to change the times of the file associated with +standard output. @cindex permissions, for changing file timestamps If changing both the access and modification times to the current diff --git a/src/touch.c b/src/touch.c index 963e7ffb1..2540558e5 100644 --- a/src/touch.c +++ b/src/touch.c @@ -233,6 +233,11 @@ usage (int status) fputs (_("\ Update the access and modification times of each FILE to the current time.\n\ \n\ +A FILE argument that does not exist is created empty.\n\ +\n\ +A FILE argument string of - is handled specially and causes touch to\n\ +change the times of the file associated with standard output.\n\ +\n\ "), stdout); fputs (_("\ Mandatory arguments to long options are mandatory for short options too.\n\ @@ -256,8 +261,6 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (_("\ \n\ Note that the -d and -t options accept different time-date formats.\n\ -\n\ -If a FILE is -, touch standard output.\n\ "), stdout); emit_bug_reporting_address (); } |