]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(chmod invocation): chmod -w complains if its
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 May 2005 17:24:49 +0000 (17:24 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 May 2005 17:24:49 +0000 (17:24 +0000)
behavior differs from what chmod a-w would do.

doc/coreutils.texi

index e968afa39d5efac2921ec27d069dc00ec9aa0eb9..e24c11a77af28b7d36ed9a121c6f53c6983767d7 100644 (file)
@@ -8451,9 +8451,11 @@ recursive directory traversals.
 
 If used, @var{mode} specifies the new permissions.
 For details, see the section on @ref{File permissions}.
-In the extremely rare cases where @var{mode} has leading @samp{-}, a
-portable script should use @option{--} first, e.g., @samp{chmod -- -w
-file}.  Typically, though, @samp{chmod a-w file} is preferable.
+If you really want @var{mode} to have a leading @samp{-}, you should
+use @option{--} first, e.g., @samp{chmod -- -w file}.  Typically,
+though, @samp{chmod a-w file} is preferable, and @command{chmod -w
+file} (without the @option{--}) complains if it behaves differently
+from what @samp{chmod a-w file} would do.
 
 The program accepts the following options.  Also see @ref{Common options}.