From: Paul Eggert Date: Tue, 5 Apr 2005 22:20:05 +0000 (+0000) Subject: (cat invocation, chown invocation) X-Git-Tag: CPPI-1_12~1102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a07556afb18d2282db1d536e48597de5506a7bac;p=thirdparty%2Fcoreutils.git (cat invocation, chown invocation) (chgrp invocation, basename invocation, dirname invocation): Add examples, which are copies of the examples newly added to the usage messages. (ln invocation): Use same format as other examples above, for consistency. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index c7b1fa1ea9..e6fbb39786 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -1311,6 +1311,16 @@ characters at the end of each line are also visible. @exitstatus +Examples: + +@smallexample +# Output f's contents, then standard input, then g's contents. +cat f - g + +# Copy standard input to standard output. +cat +@end smallexample + @node tac invocation @section @command{tac}: Concatenate and write files in reverse @@ -7700,15 +7710,20 @@ Print the name of each file before linking it. @end table +@exitstatus + Examples: @smallexample -ln -s /some/name # creates link ./name pointing to /some/name -ln -s /some/name myname # creates link ./myname pointing to /some/name -ln -s a b .. # creates links ../a and ../b pointing to ./a and ./b -@end smallexample +# Create link ./name pointing to /some/name. +ln -s /some/name -@exitstatus +# Create link ./myname pointing to /some/name. +ln -s /some/name myname + +# Create links ../a and ../b pointing to ./a and ./b. +ln -s a b .. +@end smallexample @node mkdir invocation @@ -8266,6 +8281,19 @@ Recursively change ownership of directories and their contents. @exitstatus +Examples: + +@smallexample +# Change the owner of /u to "root". +chown root /u + +# Likewise, but also change its group to "staff". +chown root:staff /u + +# Change the owner of /u and subfiles to "root". +chown -hR root /u +@end smallexample + @node chgrp invocation @section @command{chgrp}: Change group ownership @@ -8374,6 +8402,16 @@ Recursively change the group ownership of directories and their contents. @exitstatus +Examples: + +@smallexample +# Change the group of /u to "staff". +chgrp staff /u + +# Change the group of /u and subfiles to "staff". +chgrp -hR staff /u +@end smallexample + @node chmod invocation @section @command{chmod}: Change access permissions @@ -10188,6 +10226,16 @@ options}. Options must precede operands. @exitstatus +Examples: + +@smallexample +# Output "sort". +basename /usr/bin/sort + +# Output "stdio". +basename include/stdio.h .h +@end smallexample + @node dirname invocation @section @command{dirname}: Strip non-directory suffix from a file name @@ -10212,6 +10260,16 @@ options}. @exitstatus +Examples: + +@smallexample +# Output "/usr/bin". +dirname /usr/bin/sort + +# Output ".". +dirname stdio.h +@end smallexample + @node pathchk invocation @section @command{pathchk}: Check file name portability