From: Paul Eggert Date: Tue, 27 Mar 2012 15:52:20 +0000 (-0700) Subject: doc: add chmod examples X-Git-Tag: v8.31~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d5db7193c956a8fc33b57456cf51d7bca17e586;p=thirdparty%2Fcoreutils.git doc: add chmod examples Discussed in https://bugs.gnu.org/11043 . * doc/coreutils.texi (chmod invocation): Add examples. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 16768cbca4..512443aa68 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -11337,6 +11337,24 @@ Recursively change permissions of directories and their contents. @exitstatus +Examples: + +@smallexample +# Change file permissions of FOO to be world readable +# and user writable, with no other permissions. +chmod 644 foo +chmod a=r,u+w foo + +# Add user and group execute permissions to FOO. +chmod +110 file +chmod ug+x file + +# Set file permissions of DIR and subsidiary files to +# be the umask default, assuming execute permissions for +# directories and for files already executable. +chmod -R a=,+rwX dir +@end smallexample + @node touch invocation @section @command{touch}: Change file timestamps