Tizen 2.0 Release
[external/tizen-coreutils.git] / doc / coreutils.info
1 This is coreutils.info, produced by makeinfo version 4.8 from
2 coreutils.texi.
3
4 INFO-DIR-SECTION Basics
5 START-INFO-DIR-ENTRY
6 * Coreutils: (coreutils).       Core GNU (file, text, shell) utilities.
7 * Common options: (coreutils)Common options.      Common options.
8 * File permissions: (coreutils)File permissions.  Access modes.
9 * Date input formats: (coreutils)Date input formats.
10 END-INFO-DIR-ENTRY
11
12 INFO-DIR-SECTION Individual utilities
13 START-INFO-DIR-ENTRY
14 * base64: (coreutils)base64 invocation.         Base64 encode/decode data.
15 * basename: (coreutils)basename invocation.     Strip directory and suffix.
16 * cat: (coreutils)cat invocation.               Concatenate and write files.
17 * chgrp: (coreutils)chgrp invocation.           Change file groups.
18 * chmod: (coreutils)chmod invocation.           Change file permissions.
19 * chown: (coreutils)chown invocation.           Change file owners/groups.
20 * chroot: (coreutils)chroot invocation.         Specify the root directory.
21 * cksum: (coreutils)cksum invocation.           Print POSIX CRC checksum.
22 * comm: (coreutils)comm invocation.             Compare sorted files by line.
23 * cp: (coreutils)cp invocation.                 Copy files.
24 * csplit: (coreutils)csplit invocation.         Split by context.
25 * cut: (coreutils)cut invocation.               Print selected parts of lines.
26 * date: (coreutils)date invocation.             Print/set system date and time.
27 * dd: (coreutils)dd invocation.                 Copy and convert a file.
28 * df: (coreutils)df invocation.                 Report file system disk usage.
29 * dir: (coreutils)dir invocation.               List directories briefly.
30 * dircolors: (coreutils)dircolors invocation.   Color setup for ls.
31 * dirname: (coreutils)dirname invocation.       Strip non-directory suffix.
32 * du: (coreutils)du invocation.                 Report on disk usage.
33 * echo: (coreutils)echo invocation.             Print a line of text.
34 * env: (coreutils)env invocation.               Modify the environment.
35 * expand: (coreutils)expand invocation.         Convert tabs to spaces.
36 * expr: (coreutils)expr invocation.             Evaluate expressions.
37 * factor: (coreutils)factor invocation.         Print prime factors
38 * false: (coreutils)false invocation.           Do nothing, unsuccessfully.
39 * fmt: (coreutils)fmt invocation.               Reformat paragraph text.
40 * fold: (coreutils)fold invocation.             Wrap long input lines.
41 * groups: (coreutils)groups invocation.         Print group names a user is in.
42 * head: (coreutils)head invocation.             Output the first part of files.
43 * hostid: (coreutils)hostid invocation.         Print numeric host identifier.
44 * hostname: (coreutils)hostname invocation.     Print or set system name.
45 * id: (coreutils)id invocation.                 Print user identity.
46 * install: (coreutils)install invocation.       Copy and change attributes.
47 * join: (coreutils)join invocation.             Join lines on a common field.
48 * kill: (coreutils)kill invocation.             Send a signal to processes.
49 * link: (coreutils)link invocation.             Make hard links between files.
50 * ln: (coreutils)ln invocation.                 Make links between files.
51 * logname: (coreutils)logname invocation.       Print current login name.
52 * ls: (coreutils)ls invocation.                 List directory contents.
53 * md5sum: (coreutils)md5sum invocation.         Print or check MD5 digests.
54 * mkdir: (coreutils)mkdir invocation.           Create directories.
55 * mkfifo: (coreutils)mkfifo invocation.         Create FIFOs (named pipes).
56 * mknod: (coreutils)mknod invocation.           Create special files.
57 * mv: (coreutils)mv invocation.                 Rename files.
58 * nice: (coreutils)nice invocation.             Modify niceness.
59 * nl: (coreutils)nl invocation.                 Number lines and write files.
60 * nohup: (coreutils)nohup invocation.           Immunize to hangups.
61 * od: (coreutils)od invocation.                 Dump files in octal, etc.
62 * paste: (coreutils)paste invocation.           Merge lines of files.
63 * pathchk: (coreutils)pathchk invocation.       Check file name portability.
64 * pr: (coreutils)pr invocation.                 Paginate or columnate files.
65 * printenv: (coreutils)printenv invocation.     Print environment variables.
66 * printf: (coreutils)printf invocation.         Format and print data.
67 * ptx: (coreutils)ptx invocation.               Produce permuted indexes.
68 * pwd: (coreutils)pwd invocation.               Print working directory.
69 * readlink: (coreutils)readlink invocation.     Print referent of a symlink.
70 * rm: (coreutils)rm invocation.                 Remove files.
71 * rmdir: (coreutils)rmdir invocation.           Remove empty directories.
72 * seq: (coreutils)seq invocation.               Print numeric sequences
73 * sha1sum: (coreutils)sha1sum invocation.       Print or check SHA-1 digests.
74 * sha2: (coreutils)sha2 utilities.              Print or check SHA-2 digests.
75 * shred: (coreutils)shred invocation.           Remove files more securely.
76 * shuf: (coreutils)shuf invocation.             Shuffling text files.
77 * sleep: (coreutils)sleep invocation.           Delay for a specified time.
78 * sort: (coreutils)sort invocation.             Sort text files.
79 * split: (coreutils)split invocation.           Split into fixed-size pieces.
80 * stat: (coreutils)stat invocation.             Report file(system) status.
81 * stty: (coreutils)stty invocation.             Print/change terminal settings.
82 * su: (coreutils)su invocation.                 Modify user and group ID.
83 * sum: (coreutils)sum invocation.               Print traditional checksum.
84 * sync: (coreutils)sync invocation.             Synchronize memory and disk.
85 * tac: (coreutils)tac invocation.               Reverse files.
86 * tail: (coreutils)tail invocation.             Output the last part of files.
87 * tee: (coreutils)tee invocation.               Redirect to multiple files.
88 * test: (coreutils)test invocation.             File/string tests.
89 * touch: (coreutils)touch invocation.           Change file timestamps.
90 * tr: (coreutils)tr invocation.                 Translate characters.
91 * true: (coreutils)true invocation.             Do nothing, successfully.
92 * tsort: (coreutils)tsort invocation.           Topological sort.
93 * tty: (coreutils)tty invocation.               Print terminal name.
94 * uname: (coreutils)uname invocation.           Print system information.
95 * unexpand: (coreutils)unexpand invocation.     Convert spaces to tabs.
96 * uniq: (coreutils)uniq invocation.             Uniquify files.
97 * unlink: (coreutils)unlink invocation.         Removal via unlink(2).
98 * users: (coreutils)users invocation.           Print current user names.
99 * vdir: (coreutils)vdir invocation.             List directories verbosely.
100 * wc: (coreutils)wc invocation.                 Line, word, and byte counts.
101 * who: (coreutils)who invocation.               Print who is logged in.
102 * whoami: (coreutils)whoami invocation.         Print effective user ID.
103 * yes: (coreutils)yes invocation.               Print a string indefinitely.
104 END-INFO-DIR-ENTRY
105
106    This manual documents version 6.9 of the GNU core utilities,
107 including the standard programs for text and file manipulation.
108
109    Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2004, 2005,
110 2006 Free Software Foundation, Inc.
111
112      Permission is granted to copy, distribute and/or modify this
113      document under the terms of the GNU Free Documentation License,
114      Version 1.2 or any later version published by the Free Software
115      Foundation; with no Invariant Sections, with no Front-Cover Texts,
116      and with no Back-Cover Texts.  A copy of the license is included
117      in the section entitled "GNU Free Documentation License".
118
119 \1f
120 File: coreutils.info,  Node: Top,  Next: Introduction,  Up: (dir)
121
122 GNU Coreutils
123 *************
124
125 This manual documents version 6.9 of the GNU core utilities, including
126 the standard programs for text and file manipulation.
127
128    Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2004, 2005,
129 2006 Free Software Foundation, Inc.
130
131      Permission is granted to copy, distribute and/or modify this
132      document under the terms of the GNU Free Documentation License,
133      Version 1.2 or any later version published by the Free Software
134      Foundation; with no Invariant Sections, with no Front-Cover Texts,
135      and with no Back-Cover Texts.  A copy of the license is included
136      in the section entitled "GNU Free Documentation License".
137
138 * Menu:
139
140 * Introduction::                       Caveats, overview, and authors.
141 * Common options::                     Common options.
142 * Output of entire files::             cat tac nl od
143 * Formatting file contents::           fmt pr fold
144 * Output of parts of files::           head tail split csplit
145 * Summarizing files::                  wc sum cksum md5sum sha1sum sha2
146 * Operating on sorted files::          sort shuf uniq comm ptx tsort
147 * Operating on fields within a line::  cut paste join
148 * Operating on characters::            tr expand unexpand
149 * Directory listing::                  ls dir vdir dircolors
150 * Basic operations::                   cp dd install mv rm shred
151 * Special file types::                 ln mkdir rmdir mkfifo mknod
152 * Changing file attributes::           chgrp chmod chown touch
153 * Disk usage::                         df du stat sync
154 * Printing text::                      echo printf yes
155 * Conditions::                         false true test expr
156 * Redirection::                        tee
157 * File name manipulation::             dirname basename pathchk
158 * Working context::                    pwd stty printenv tty
159 * User information::                   id logname whoami groups users who
160 * System context::                     date uname hostname hostid
161 * Modified command invocation::        chroot env nice nohup su
162 * Process control::                    kill
163 * Delaying::                           sleep
164 * Numeric operations::                 factor seq
165 * File permissions::                   Access modes.
166 * Date input formats::                 Specifying date strings.
167 * Opening the software toolbox::       The software tools philosophy.
168 * Copying This Manual::                License for copying this manual.
169 * Index::                              General index.
170
171  --- The Detailed Node Listing ---
172
173 Common Options
174
175 * Exit status::                 Indicating program success or failure.
176 * Backup options::              Backup options
177 * Block size::                  Block size
178 * Disambiguating names and IDs:: chgrp and chown owner and group syntax
179 * Random sources::              Sources of random data
180 * Target directory::            Target directory
181 * Trailing slashes::            Trailing slashes
182 * Traversing symlinks::         Traversing symlinks to directories
183 * Treating / specially::        Treating / specially
184 * Standards conformance::       Standards conformance
185
186 Output of entire files
187
188 * cat invocation::              Concatenate and write files.
189 * tac invocation::              Concatenate and write files in reverse.
190 * nl invocation::               Number lines and write files.
191 * od invocation::               Write files in octal or other formats.
192 * base64 invocation::           Transform data into printable data.
193
194 Formatting file contents
195
196 * fmt invocation::              Reformat paragraph text.
197 * pr invocation::               Paginate or columnate files for printing.
198 * fold invocation::             Wrap input lines to fit in specified width.
199
200 Output of parts of files
201
202 * head invocation::             Output the first part of files.
203 * tail invocation::             Output the last part of files.
204 * split invocation::            Split a file into fixed-size pieces.
205 * csplit invocation::           Split a file into context-determined pieces.
206
207 Summarizing files
208
209 * wc invocation::               Print newline, word, and byte counts.
210 * sum invocation::              Print checksum and block counts.
211 * cksum invocation::            Print CRC checksum and byte counts.
212 * md5sum invocation::           Print or check MD5 digests.
213 * sha1sum invocation::          Print or check SHA-1 digests.
214 * sha2 utilities::              Print or check SHA-2 digests.
215
216 Operating on sorted files
217
218 * sort invocation::             Sort text files.
219 * shuf invocation::             Shuffle text files.
220 * uniq invocation::             Uniquify files.
221 * comm invocation::             Compare two sorted files line by line.
222 * ptx invocation::              Produce a permuted index of file contents.
223 * tsort invocation::            Topological sort.
224
225 `ptx': Produce permuted indexes
226
227 * General options in ptx::      Options which affect general program behavior.
228 * Charset selection in ptx::    Underlying character set considerations.
229 * Input processing in ptx::     Input fields, contexts, and keyword selection.
230 * Output formatting in ptx::    Types of output format, and sizing the fields.
231 * Compatibility in ptx::        The GNU extensions to `ptx'
232
233 Operating on fields within a line
234
235 * cut invocation::              Print selected parts of lines.
236 * paste invocation::            Merge lines of files.
237 * join invocation::             Join lines on a common field.
238
239 Operating on characters
240
241 * tr invocation::               Translate, squeeze, and/or delete characters.
242 * expand invocation::           Convert tabs to spaces.
243 * unexpand invocation::         Convert spaces to tabs.
244
245 `tr': Translate, squeeze, and/or delete characters
246
247 * Character sets::              Specifying sets of characters.
248 * Translating::                 Changing one set of characters to another.
249 * Squeezing::                   Squeezing repeats and deleting.
250
251 Directory listing
252
253 * ls invocation::               List directory contents
254 * dir invocation::              Briefly list directory contents
255 * vdir invocation::             Verbosely list directory contents
256 * dircolors invocation::        Color setup for `ls'
257
258 `ls':  List directory contents
259
260 * Which files are listed::      Which files are listed
261 * What information is listed::  What information is listed
262 * Sorting the output::          Sorting the output
263 * More details about version sort::  More details about version sort
264 * General output formatting::   General output formatting
265 * Formatting the file names::   Formatting the file names
266
267 Basic operations
268
269 * cp invocation::               Copy files and directories
270 * dd invocation::               Convert and copy a file
271 * install invocation::          Copy files and set attributes
272 * mv invocation::               Move (rename) files
273 * rm invocation::               Remove files or directories
274 * shred invocation::            Remove files more securely
275
276 Special file types
277
278 * link invocation::             Make a hard link via the link syscall
279 * ln invocation::               Make links between files
280 * mkdir invocation::            Make directories
281 * mkfifo invocation::           Make FIFOs (named pipes)
282 * mknod invocation::            Make block or character special files
283 * readlink invocation::         Print the referent of a symbolic link
284 * rmdir invocation::            Remove empty directories
285 * unlink invocation::           Remove files via unlink syscall
286
287 Changing file attributes
288
289 * chown invocation::            Change file owner and group
290 * chgrp invocation::            Change group ownership
291 * chmod invocation::            Change access permissions
292 * touch invocation::            Change file timestamps
293
294 Disk usage
295
296 * df invocation::               Report file system disk space usage
297 * du invocation::               Estimate file space usage
298 * stat invocation::             Report file or file system status
299 * sync invocation::             Synchronize data on disk with memory
300
301 Printing text
302
303 * echo invocation::             Print a line of text
304 * printf invocation::           Format and print data
305 * yes invocation::              Print a string until interrupted
306
307 Conditions
308
309 * false invocation::              Do nothing, unsuccessfully
310 * true invocation::               Do nothing, successfully
311 * test invocation::               Check file types and compare values
312 * expr invocation::               Evaluate expressions
313
314 `test': Check file types and compare values
315
316 * File type tests::               File type tests
317 * Access permission tests::       Access permission tests
318 * File characteristic tests::     File characteristic tests
319 * String tests::                  String tests
320 * Numeric tests::                 Numeric tests
321
322 `expr': Evaluate expression
323
324 * String expressions::         + : match substr index length
325 * Numeric expressions::        + - * / %
326 * Relations for expr::         | & < <= = == != >= >
327 * Examples of expr::           Examples of using `expr'
328
329 Redirection
330
331 * tee invocation::               Redirect output to multiple files
332
333 File name manipulation
334
335 * basename invocation::          Strip directory and suffix from a file name
336 * dirname invocation::           Strip non-directory suffix from a file name
337 * pathchk invocation::           Check file name portability
338
339 Working context
340
341 * pwd invocation::               Print working directory
342 * stty invocation::              Print or change terminal characteristics
343 * printenv invocation::          Print all or some environment variables
344 * tty invocation::               Print file name of terminal on standard input
345
346 `stty': Print or change terminal characteristics
347
348 * Control::                     Control settings
349 * Input::                       Input settings
350 * Output::                      Output settings
351 * Local::                       Local settings
352 * Combination::                 Combination settings
353 * Characters::                  Special characters
354 * Special::                     Special settings
355
356 User information
357
358 * id invocation::                Print user identity
359 * logname invocation::           Print current login name
360 * whoami invocation::            Print effective user ID
361 * groups invocation::            Print group names a user is in
362 * users invocation::             Print login names of users currently logged in
363 * who invocation::               Print who is currently logged in
364
365 System context
366
367 * date invocation::              Print or set system date and time
368 * uname invocation::             Print system information
369 * hostname invocation::          Print or set system name
370 * hostid invocation::            Print numeric host identifier.
371
372 `date': Print or set system date and time
373
374 * Time conversion specifiers::   %[HIklMNpPrRsSTXzZ]
375 * Date conversion specifiers::   %[aAbBcCdDeFgGhjmuUVwWxyY]
376 * Literal conversion specifiers:: %[%nt]
377 * Padding and other flags::      Pad with zeros, spaces, etc.
378 * Setting the time::             Changing the system clock.
379 * Options for date::             Instead of the current time.
380 * Examples of date::             Examples.
381
382 Modified command invocation
383
384 * chroot invocation::            Run a command with a different root directory
385 * env invocation::               Run a command in a modified environment
386 * nice invocation::              Run a command with modified niceness
387 * nohup invocation::             Run a command immune to hangups
388 * su invocation::                Run a command with substitute user and group ID
389
390 Process control
391
392 * kill invocation::              Sending a signal to processes.
393
394 Delaying
395
396 * sleep invocation::             Delay for a specified time
397
398 Numeric operations
399
400 * factor invocation::            Print prime factors
401 * seq invocation::               Print numeric sequences
402
403 File permissions
404
405 * Mode Structure::               Structure of file mode bits.
406 * Symbolic Modes::               Mnemonic representation of file mode bits.
407 * Numeric Modes::                File mode bits as octal numbers.
408 * Directory Setuid and Setgid::  Set-user-ID and set-group-ID on directories.
409
410 Date input formats
411
412 * General date syntax::          Common rules.
413 * Calendar date items::          19 Dec 1994.
414 * Time of day items::            9:20pm.
415 * Time zone items::              EST, PDT, GMT.
416 * Day of week items::            Monday and others.
417 * Relative items in date strings:: next tuesday, 2 years ago.
418 * Pure numbers in date strings:: 19931219, 1440.
419 * Seconds since the Epoch::      @1078100502.
420 * Specifying time zone rules::   TZ="America/New_York", TZ="UTC0".
421 * Authors of get_date::          Bellovin, Eggert, Salz, Berets, et al.
422
423 Opening the software toolbox
424
425 * Toolbox introduction::         Toolbox introduction
426 * I/O redirection::              I/O redirection
427 * The who command::              The `who' command
428 * The cut command::              The `cut' command
429 * The sort command::             The `sort' command
430 * The uniq command::             The `uniq' command
431 * Putting the tools together::   Putting the tools together
432
433 Copying This Manual
434
435 * GNU Free Documentation License::  License for copying this manual.
436
437 \1f
438 File: coreutils.info,  Node: Introduction,  Next: Common options,  Prev: Top,  Up: Top
439
440 1 Introduction
441 **************
442
443 This manual is a work in progress: many sections make no attempt to
444 explain basic concepts in a way suitable for novices.  Thus, if you are
445 interested, please get involved in improving this manual.  The entire
446 GNU community will benefit.
447
448    The GNU utilities documented here are mostly compatible with the
449 POSIX standard.  Please report bugs to <bug-coreutils@gnu.org>.
450 Remember to include the version number, machine architecture, input
451 files, and any other information needed to reproduce the bug: your
452 input, what you expected, what you got, and why it is wrong.  Diffs are
453 welcome, but please include a description of the problem as well, since
454 this is sometimes difficult to infer.  *Note Bugs: (gcc)Bugs.
455
456    This manual was originally derived from the Unix man pages in the
457 distributions, which were written by David MacKenzie and updated by Jim
458 Meyering.  What you are reading now is the authoritative documentation
459 for these utilities; the man pages are no longer being maintained.  The
460 original `fmt' man page was written by Ross Paterson.  Franc,ois Pinard
461 did the initial conversion to Texinfo format.  Karl Berry did the
462 indexing, some reorganization, and editing of the results.  Brian
463 Youmans of the Free Software Foundation office staff combined the
464 manuals for textutils, fileutils, and sh-utils to produce the present
465 omnibus manual.  Richard Stallman contributed his usual invaluable
466 insights to the overall process.
467
468 \1f
469 File: coreutils.info,  Node: Common options,  Next: Output of entire files,  Prev: Introduction,  Up: Top
470
471 2 Common options
472 ****************
473
474 Certain options are available in all of these programs.  Rather than
475 writing identical descriptions for each of the programs, they are
476 described here.  (In fact, every GNU program accepts (or should accept)
477 these options.)
478
479    Normally options and operands can appear in any order, and programs
480 act as if all the options appear before any operands.  For example,
481 `sort -r passwd -t :' acts like `sort -r -t : passwd', since `:' is an
482 option-argument of `-t'.  However, if the `POSIXLY_CORRECT' environment
483 variable is set, options must appear before operands, unless otherwise
484 specified for a particular command.
485
486    A few programs can usefully have trailing operands with leading `-'.
487 With such a program, options must precede operands even if
488 `POSIXLY_CORRECT' is not set, and this fact is noted in the program
489 description.  For example, the `env' command's options must appear
490 before its operands, since in some cases the operands specify a command
491 that itself contains options.
492
493    Some of these programs recognize the `--help' and `--version'
494 options only when one of them is the sole command line argument.
495
496 `--help'
497      Print a usage message listing all available options, then exit
498      successfully.
499
500 `--version'
501      Print the version number, then exit successfully.
502
503 `--'
504      Delimit the option list.  Later arguments, if any, are treated as
505      operands even if they begin with `-'.  For example, `sort -- -r'
506      reads from the file named `-r'.
507
508
509    A single `-' operand is not really an option, though it looks like
510 one.  It stands for standard input, or for standard output if that is
511 clear from the context.  For example, `sort -' reads from standard
512 input, and is equivalent to plain `sort', and `tee -' writes an extra
513 copy of its input to standard output.  Unless otherwise specified, `-'
514 can appear as any operand that requires a file name.
515
516 * Menu:
517
518 * Exit status::                 Indicating program success or failure.
519 * Backup options::              -b -S, in some programs.
520 * Block size::                  BLOCK_SIZE and --block-size, in some programs.
521 * Disambiguating names and IDs:: chgrp and chown owner and group syntax
522 * Random sources::              --random-source, in some programs.
523 * Target directory::            Specifying a target directory, in some programs.
524 * Trailing slashes::            --strip-trailing-slashes, in some programs.
525 * Traversing symlinks::         -H, -L, or -P, in some programs.
526 * Treating / specially::        --preserve-root and --no-preserve-root.
527 * Special built-in utilities::  `break', `:', `eval', ...
528 * Standards conformance::       Conformance to the POSIX standard.
529
530 \1f
531 File: coreutils.info,  Node: Exit status,  Next: Backup options,  Up: Common options
532
533 2.1 Exit status
534 ===============
535
536 Nearly every command invocation yields an integral "exit status" that
537 can be used to change how other commands work.  For the vast majority
538 of commands, an exit status of zero indicates success.  Failure is
539 indicated by a nonzero value--typically `1', though it may differ on
540 unusual platforms as POSIX requires only that it be nonzero.
541
542    However, some of the programs documented here do produce other exit
543 status values and a few associate different meanings with the values
544 `0' and `1'.  Here are some of the exceptions: `chroot', `env', `expr',
545 `nice', `nohup', `printenv', `sort', `su', `test', `tty'.
546
547 \1f
548 File: coreutils.info,  Node: Backup options,  Next: Block size,  Prev: Exit status,  Up: Common options
549
550 2.2 Backup options
551 ==================
552
553 Some GNU programs (at least `cp', `install', `ln', and `mv') optionally
554 make backups of files before writing new versions.  These options
555 control the details of these backups.  The options are also briefly
556 mentioned in the descriptions of the particular programs.
557
558 `-b'
559 `--backup[=METHOD]'
560      Make a backup of each file that would otherwise be overwritten or
561      removed.  Without this option, the original versions are destroyed.
562      Use METHOD to determine the type of backups to make.  When this
563      option is used but METHOD is not specified, then the value of the
564      `VERSION_CONTROL' environment variable is used.  And if
565      `VERSION_CONTROL' is not set, the default backup type is
566      `existing'.
567
568      Note that the short form of this option, `-b' does not accept any
569      argument.  Using `-b' is equivalent to using `--backup=existing'.
570
571      This option corresponds to the Emacs variable `version-control';
572      the values for METHOD are the same as those used in Emacs.  This
573      option also accepts more descriptive names.  The valid METHODs are
574      (unique abbreviations are accepted):
575
576     `none'
577     `off'
578           Never make backups.
579
580     `numbered'
581     `t'
582           Always make numbered backups.
583
584     `existing'
585     `nil'
586           Make numbered backups of files that already have them, simple
587           backups of the others.
588
589     `simple'
590     `never'
591           Always make simple backups.  Please note `never' is not to be
592           confused with `none'.
593
594
595 `-S SUFFIX'
596 `--suffix=SUFFIX'
597      Append SUFFIX to each backup file made with `-b'.  If this option
598      is not specified, the value of the `SIMPLE_BACKUP_SUFFIX'
599      environment variable is used.  And if `SIMPLE_BACKUP_SUFFIX' is not
600      set, the default is `~', just as in Emacs.
601
602
603 \1f
604 File: coreutils.info,  Node: Block size,  Next: Disambiguating names and IDs,  Prev: Backup options,  Up: Common options
605
606 2.3 Block size
607 ==============
608
609 Some GNU programs (at least `df', `du', and `ls') display sizes in
610 "blocks".  You can adjust the block size and method of display to make
611 sizes easier to read.  The block size used for display is independent
612 of any file system block size.  Fractional block counts are rounded up
613 to the nearest integer.
614
615    The default block size is chosen by examining the following
616 environment variables in turn; the first one that is set determines the
617 block size.
618
619 `DF_BLOCK_SIZE'
620      This specifies the default block size for the `df' command.
621      Similarly, `DU_BLOCK_SIZE' specifies the default for `du' and
622      `LS_BLOCK_SIZE' for `ls'.
623
624 `BLOCK_SIZE'
625      This specifies the default block size for all three commands, if
626      the above command-specific environment variables are not set.
627
628 `BLOCKSIZE'
629      This specifies the default block size for all values that are
630      normally printed as blocks, if neither `BLOCK_SIZE' nor the above
631      command-specific environment variables are set.  Unlike the other
632      environment variables, `BLOCKSIZE' does not affect values that are
633      normally printed as byte counts, e.g., the file sizes contained in
634      `ls -l' output.
635
636 `POSIXLY_CORRECT'
637      If neither `COMMAND_BLOCK_SIZE', nor `BLOCK_SIZE', nor `BLOCKSIZE'
638      is set, but this variable is set, the block size defaults to 512.
639
640
641    If none of the above environment variables are set, the block size
642 currently defaults to 1024 bytes in most contexts, but this number may
643 change in the future.  For `ls' file sizes, the block size defaults to
644 1 byte.
645
646    A block size specification can be a positive integer specifying the
647 number of bytes per block, or it can be `human-readable' or `si' to
648 select a human-readable format.  Integers may be followed by suffixes
649 that are upward compatible with the SI prefixes
650 (http://www.bipm.fr/enus/3_SI/si-prefixes.html) for decimal multiples
651 and with the IEC 60027-2 prefixes for binary multiples
652 (http://physics.nist.gov/cuu/Units/binary.html).
653
654    With human-readable formats, output sizes are followed by a size
655 letter such as `M' for megabytes.  `BLOCK_SIZE=human-readable' uses
656 powers of 1024; `M' stands for 1,048,576 bytes.  `BLOCK_SIZE=si' is
657 similar, but uses powers of 1000 and appends `B'; `MB' stands for
658 1,000,000 bytes.
659
660    A block size specification preceded by `'' causes output sizes to be
661 displayed with thousands separators.  The `LC_NUMERIC' locale specifies
662 the thousands separator and grouping.  For example, in an American
663 English locale, `--block-size="'1kB"' would cause a size of 1234000
664 bytes to be displayed as `1,234'.  In the default C locale, there is no
665 thousands separator so a leading `'' has no effect.
666
667    An integer block size can be followed by a suffix to specify a
668 multiple of that size.  A bare size letter, or one followed by `iB',
669 specifies a multiple using powers of 1024.  A size letter followed by
670 `B' specifies powers of 1000 instead.  For example, `1M' and `1MiB' are
671 equivalent to `1048576', whereas `1MB' is equivalent to `1000000'.
672
673    A plain suffix without a preceding integer acts as if `1' were
674 prepended, except that it causes a size indication to be appended to
675 the output.  For example, `--block-size="kB"' displays 3000 as `3kB'.
676
677    The following suffixes are defined.  Large sizes like `1Y' may be
678 rejected by your computer due to limitations of its arithmetic.
679
680 `kB'
681      kilobyte: 10^3 = 1000.
682
683 `k'
684 `K'
685 `KiB'
686      kibibyte: 2^10 = 1024.  `K' is special: the SI prefix is `k' and
687      the IEC 60027-2 prefix is `Ki', but tradition and POSIX use `k' to
688      mean `KiB'.
689
690 `MB'
691      megabyte: 10^6 = 1,000,000.
692
693 `M'
694 `MiB'
695      mebibyte: 2^20 = 1,048,576.
696
697 `GB'
698      gigabyte: 10^9 = 1,000,000,000.
699
700 `G'
701 `GiB'
702      gibibyte: 2^30 = 1,073,741,824.
703
704 `TB'
705      terabyte:  10^12 = 1,000,000,000,000.
706
707 `T'
708 `TiB'
709      tebibyte: 2^40 = 1,099,511,627,776.
710
711 `PB'
712      petabyte: 10^15 = 1,000,000,000,000,000.
713
714 `P'
715 `PiB'
716      pebibyte: 2^50 = 1,125,899,906,842,624.
717
718 `EB'
719      exabyte: 10^18 = 1,000,000,000,000,000,000.
720
721 `E'
722 `EiB'
723      exbibyte: 2^60 = 1,152,921,504,606,846,976.
724
725 `ZB'
726      zettabyte: 10^21 = 1,000,000,000,000,000,000,000
727
728 `Z'
729 `ZiB'
730      2^70 = 1,180,591,620,717,411,303,424.  (`Zi' is a GNU extension to
731      IEC 60027-2.)
732
733 `YB'
734      yottabyte: 10^24 = 1,000,000,000,000,000,000,000,000.
735
736 `Y'
737 `YiB'
738      2^80 = 1,208,925,819,614,629,174,706,176.  (`Yi' is a GNU
739      extension to IEC 60027-2.)
740
741    Block size defaults can be overridden by an explicit
742 `--block-size=SIZE' option.  The `-k' option is equivalent to
743 `--block-size=1K', which is the default unless the `POSIXLY_CORRECT'
744 environment variable is set.  The `-h' or `--human-readable' option is
745 equivalent to `--block-size=human-readable'.  The `--si' option is
746 equivalent to `--block-size=si'.
747
748 \1f
749 File: coreutils.info,  Node: Disambiguating names and IDs,  Next: Random sources,  Prev: Block size,  Up: Common options
750
751 2.4 chown and chgrp: Disambiguating user names and IDs
752 ======================================================
753
754 Since the OWNER and GROUP arguments to `chown' and `chgrp' may be
755 specified as names or numeric IDs, there is an apparent ambiguity.
756 What if a user or group _name_ is a string of digits?  (1) Should the
757 command interpret it as a user name or as an ID?  POSIX requires that
758 `chown' and `chgrp' first attempt to resolve the specified string as a
759 name, and only once that fails, then try to interpret it as an ID.
760 This is troublesome when you want to specify a numeric ID, say 42, and
761 it must work even in a pathological situation where `42' is a user name
762 that maps to some other user ID, say 1000.  Simply invoking `chown 42
763 F', will set `F's owner ID to 1000--not what you intended.
764
765    GNU `chown' and `chgrp' provide a way to work around this, that at
766 the same time may result in a significant performance improvement by
767 eliminating a database look-up.  Simply precede each numeric user ID
768 and/or group ID with a `+', in order to force its interpretation as an
769 integer:
770
771      chown +42 F
772      chgrp +$numeric_group_id another-file
773      chown +0:+0 /
774
775    GNU `chown' and `chgrp' skip the name look-up process for each
776 `+'-prefixed string, because a string containing `+' is never a valid
777 user or group name.  This syntax is accepted on most common Unix
778 systems, but not on Solaris 10.
779
780    ---------- Footnotes ----------
781
782    (1) Using a number as a user name is common in some environments.
783
784 \1f
785 File: coreutils.info,  Node: Random sources,  Next: Target directory,  Prev: Disambiguating names and IDs,  Up: Common options
786
787 2.5 Sources of random data
788 ==========================
789
790 The `shuf', `shred', and `sort' commands sometimes need random data to
791 do their work.  For example, `sort -R' must choose a hash function at
792 random, and it needs random data to make this selection.
793
794    Normally these commands use the device file `/dev/urandom' as the
795 source of random data.  Typically, this device gathers environmental
796 noise from device drivers and other sources into an entropy pool, and
797 uses the pool to generate random bits.  If the pool is short of data,
798 the device reuses the internal pool to produce more bits, using a
799 cryptographically secure pseudorandom number generator.
800
801    `/dev/urandom' suffices for most practical uses, but applications
802 requiring high-value or long-term protection of private data may
803 require an alternate data source like `/dev/random' or `/dev/arandom'.
804 The set of available sources depends on your operating system.
805
806    To use such a source, specify the `--random-source=FILE' option,
807 e.g., `shuf --random-source=/dev/random'.  The contents of FILE should
808 be as random as possible.  An error is reported if FILE does not
809 contain enough bytes to randomize the input adequately.
810
811    To reproduce the results of an earlier invocation of a command, you
812 can save some random data into a file and then use that file as the
813 random source in earlier and later invocations of the command.
814
815    Some old-fashioned or stripped-down operating systems lack support
816 for `/dev/urandom'.  On these systems commands like `shuf' by default
817 fall back on an internal pseudorandom generator initialized by a small
818 amount of entropy.
819
820 \1f
821 File: coreutils.info,  Node: Target directory,  Next: Trailing slashes,  Prev: Random sources,  Up: Common options
822
823 2.6 Target directory
824 ====================
825
826 The `cp', `install', `ln', and `mv' commands normally treat the last
827 operand specially when it is a directory or a symbolic link to a
828 directory.  For example, `cp source dest' is equivalent to `cp source
829 dest/source' if `dest' is a directory.  Sometimes this behavior is not
830 exactly what is wanted, so these commands support the following options
831 to allow more fine-grained control:
832
833 `-T'
834 `--no-target-directory'
835      Do not treat the last operand specially when it is a directory or a
836      symbolic link to a directory.  This can help avoid race conditions
837      in programs that operate in a shared area.  For example, when the
838      command `mv /tmp/source /tmp/dest' succeeds, there is no guarantee
839      that `/tmp/source' was renamed to `/tmp/dest': it could have been
840      renamed to `/tmp/dest/source' instead, if some other process
841      created `/tmp/dest' as a directory.  However, if `mv -T
842      /tmp/source /tmp/dest' succeeds, there is no question that
843      `/tmp/source' was renamed to `/tmp/dest'.
844
845      In the opposite situation, where you want the last operand to be
846      treated as a directory and want a diagnostic otherwise, you can use
847      the `--target-directory' (`-t') option.
848
849 `-t DIRECTORY'
850 `--target-directory=DIRECTORY'
851      Use DIRECTORY as the directory component of each destination file
852      name.
853
854      The interface for most programs is that after processing options
855      and a finite (possibly zero) number of fixed-position arguments,
856      the remaining argument list is either expected to be empty, or is
857      a list of items (usually files) that will all be handled
858      identically.  The `xargs' program is designed to work well with
859      this convention.
860
861      The commands in the `mv'-family are unusual in that they take a
862      variable number of arguments with a special case at the _end_
863      (namely, the target directory).  This makes it nontrivial to
864      perform some operations, e.g., "move all files from here to
865      ../d/", because `mv * ../d/' might exhaust the argument space, and
866      `ls | xargs ...' doesn't have a clean way to specify an extra
867      final argument for each invocation of the subject command.  (It
868      can be done by going through a shell command, but that requires
869      more human labor and brain power than it should.)
870
871      The `--target-directory' (`-t') option allows the `cp', `install',
872      `ln', and `mv' programs to be used conveniently with `xargs'.  For
873      example, you can move the files from the current directory to a
874      sibling directory, `d' like this:
875
876           ls | xargs mv -t ../d --
877
878      However, this doesn't move files whose names begin with `.'.  If
879      you use the GNU `find' program, you can move those files too, with
880      this command:
881
882           find . -mindepth 1 -maxdepth 1 \
883             | xargs mv -t ../d
884
885      But both of the above approaches fail if there are no files in the
886      current directory, or if any file has a name containing a blank or
887      some other special characters.  The following example removes
888      those limitations and requires both GNU `find' and GNU `xargs':
889
890           find . -mindepth 1 -maxdepth 1 -print0 \
891             | xargs --null --no-run-if-empty \
892                 mv -t ../d
893
894
895 The `--target-directory' (`-t') and `--no-target-directory' (`-T')
896 options cannot be combined.
897
898 \1f
899 File: coreutils.info,  Node: Trailing slashes,  Next: Traversing symlinks,  Prev: Target directory,  Up: Common options
900
901 2.7 Trailing slashes
902 ====================
903
904 Some GNU programs (at least `cp' and `mv') allow you to remove any
905 trailing slashes from each SOURCE argument before operating on it.  The
906 `--strip-trailing-slashes' option enables this behavior.
907
908    This is useful when a SOURCE argument may have a trailing slash and
909 specify a symbolic link to a directory.  This scenario is in fact rather
910 common because some shells can automatically append a trailing slash
911 when performing file name completion on such symbolic links.  Without
912 this option, `mv', for example, (via the system's rename function) must
913 interpret a trailing slash as a request to dereference the symbolic link
914 and so must rename the indirectly referenced _directory_ and not the
915 symbolic link.  Although it may seem surprising that such behavior be
916 the default, it is required by POSIX and is consistent with other parts
917 of that standard.
918
919 \1f
920 File: coreutils.info,  Node: Traversing symlinks,  Next: Treating / specially,  Prev: Trailing slashes,  Up: Common options
921
922 2.8 Traversing symlinks
923 =======================
924
925 The following options modify how `chown' and `chgrp' traverse a
926 hierarchy when the `--recursive' (`-R') option is also specified.  If
927 more than one of the following options is specified, only the final one
928 takes effect.  These options specify whether processing a symbolic link
929 to a directory entails operating on just the symbolic link or on all
930 files in the hierarchy rooted at that directory.
931
932    These options are independent of `--dereference' and
933 `--no-dereference' (`-h'), which control whether to modify a symlink or
934 its referent.
935
936 `-H'
937      If `--recursive' (`-R') is specified and a command line argument
938      is a symbolic link to a directory, traverse it.
939
940 `-L'
941      In a recursive traversal, traverse every symbolic link to a
942      directory that is encountered.
943
944 `-P'
945      Do not traverse any symbolic links.  This is the default if none
946      of `-H', `-L', or `-P' is specified.
947
948
949 \1f
950 File: coreutils.info,  Node: Treating / specially,  Next: Special built-in utilities,  Prev: Traversing symlinks,  Up: Common options
951
952 2.9 Treating / specially
953 ========================
954
955 Certain commands can operate destructively on entire hierarchies.  For
956 example, if a user with appropriate privileges mistakenly runs `rm -rf
957 / tmp/junk', that may remove all files on the entire system.  Since
958 there are so few legitimate uses for such a command, GNU `rm' normally
959 declines to operate on any directory that resolves to `/'.  If you
960 really want to try to remove all the files on your system, you can use
961 the `--no-preserve-root' option, but the default behavior, specified by
962 the `--preserve-option', is safer for most purposes.
963
964    The commands `chgrp', `chmod' and `chown' can also operate
965 destructively on entire hierarchies, so they too support these options.
966 Although, unlike `rm', they don't actually unlink files, these
967 commands are arguably more dangerous when operating recursively on `/',
968 since they often work much more quickly, and hence damage more files
969 before an alert user can interrupt them.  Tradition and POSIX require
970 these commands to operate recursively on `/', so they default to
971 `--no-preserve-root', but using the `--preserve-root' option makes them
972 safer for most purposes.  For convenience you can specify
973 `--preserve-root' in an alias or in a shell function.
974
975    Note that the `--preserve-root' option also ensures that `chgrp' and
976 `chown' do not modify `/' even when dereferencing a symlink pointing to
977 `/'.
978
979 \1f
980 File: coreutils.info,  Node: Special built-in utilities,  Next: Standards conformance,  Prev: Treating / specially,  Up: Common options
981
982 2.10 Special built-in utilities
983 ===============================
984
985 Some programs like `nice' can invoke other programs; for example, the
986 command `nice cat file' invokes the program `cat' by executing the
987 command `cat file'.  However, "special built-in utilities" like `exit'
988 cannot be invoked this way.  For example, the command `nice exit' does
989 not have a well-defined behavior: it may generate an error message
990 instead of exiting.
991
992    Here is a list of the special built-in utilities that are
993 standardized by POSIX 1003.1-2004.
994
995      . : break continue eval exec exit export readonly return set shift
996      times trap unset
997
998    For example, because `.', `:', and `exec' are special, the commands
999 `nice . foo.sh', `nice :', and `nice exec pwd' do not work as you might
1000 expect.
1001
1002    Many shells extend this list.  For example, Bash has several extra
1003 special built-in utilities like `history', and `suspend', and with Bash
1004 the command `nice suspend' generates an error message instead of
1005 suspending.
1006
1007 \1f
1008 File: coreutils.info,  Node: Standards conformance,  Prev: Special built-in utilities,  Up: Common options
1009
1010 2.11 Standards conformance
1011 ==========================
1012
1013 In a few cases, the GNU utilities' default behavior is incompatible
1014 with the POSIX standard.  To suppress these incompatibilities, define
1015 the `POSIXLY_CORRECT' environment variable.  Unless you are checking
1016 for POSIX conformance, you probably do not need to define
1017 `POSIXLY_CORRECT'.
1018
1019    Newer versions of POSIX are occasionally incompatible with older
1020 versions.  For example, older versions of POSIX required the command
1021 `sort +1' to sort based on the second and succeeding fields in each
1022 input line, but starting with POSIX 1003.1-2001 the same command is
1023 required to sort the file named `+1', and you must instead use the
1024 command `sort -k 2' to get the field-based sort.
1025
1026    The GNU utilities normally conform to the version of POSIX that is
1027 standard for your system.  To cause them to conform to a different
1028 version of POSIX, define the `_POSIX2_VERSION' environment variable to
1029 a value of the form YYYYMM specifying the year and month the standard
1030 was adopted.  Two values are currently supported for `_POSIX2_VERSION':
1031 `199209' stands for POSIX 1003.2-1992, and `200112' stands for POSIX
1032 1003.1-2001.  For example, if you have a newer system but are running
1033 software that assumes an older version of POSIX and uses `sort +1' or
1034 `tail +10', you can work around any compatibility problems by setting
1035 `_POSIX2_VERSION=199209' in your environment.
1036
1037 \1f
1038 File: coreutils.info,  Node: Output of entire files,  Next: Formatting file contents,  Prev: Common options,  Up: Top
1039
1040 3 Output of entire files
1041 ************************
1042
1043 These commands read and write entire files, possibly transforming them
1044 in some way.
1045
1046 * Menu:
1047
1048 * cat invocation::              Concatenate and write files.
1049 * tac invocation::              Concatenate and write files in reverse.
1050 * nl invocation::               Number lines and write files.
1051 * od invocation::               Write files in octal or other formats.
1052 * base64 invocation::           Transform data into printable data.
1053
1054 \1f
1055 File: coreutils.info,  Node: cat invocation,  Next: tac invocation,  Up: Output of entire files
1056
1057 3.1 `cat': Concatenate and write files
1058 ======================================
1059
1060 `cat' copies each FILE (`-' means standard input), or standard input if
1061 none are given, to standard output.  Synopsis:
1062
1063      cat [OPTION] [FILE]...
1064
1065    The program accepts the following options.  Also see *Note Common
1066 options::.
1067
1068 `-A'
1069 `--show-all'
1070      Equivalent to `-vET'.
1071
1072 `-b'
1073 `--number-nonblank'
1074      Number all nonblank output lines, starting with 1.
1075
1076 `-e'
1077      Equivalent to `-vE'.
1078
1079 `-E'
1080 `--show-ends'
1081      Display a `$' after the end of each line.
1082
1083 `-n'
1084 `--number'
1085      Number all output lines, starting with 1.
1086
1087 `-s'
1088 `--squeeze-blank'
1089      Replace multiple adjacent blank lines with a single blank line.
1090
1091 `-t'
1092      Equivalent to `-vT'.
1093
1094 `-T'
1095 `--show-tabs'
1096      Display TAB characters as `^I'.
1097
1098 `-u'
1099      Ignored; for POSIX compatibility.
1100
1101 `-v'
1102 `--show-nonprinting'
1103      Display control characters except for LFD and TAB using `^'
1104      notation and precede characters that have the high bit set with
1105      `M-'.
1106
1107
1108    On systems like MS-DOS that distinguish between text and binary
1109 files, `cat' normally reads and writes in binary mode.  However, `cat'
1110 reads in text mode if one of the options `-bensAE' is used or if `cat'
1111 is reading from standard input and standard input is a terminal.
1112 Similarly, `cat' writes in text mode if one of the options `-bensAE' is
1113 used or if standard output is a terminal.
1114
1115    An exit status of zero indicates success, and a nonzero value
1116 indicates failure.
1117
1118    Examples:
1119
1120      # Output f's contents, then standard input, then g's contents.
1121      cat f - g
1122
1123      # Copy standard input to standard output.
1124      cat
1125
1126 \1f
1127 File: coreutils.info,  Node: tac invocation,  Next: nl invocation,  Prev: cat invocation,  Up: Output of entire files
1128
1129 3.2 `tac': Concatenate and write files in reverse
1130 =================================================
1131
1132 `tac' copies each FILE (`-' means standard input), or standard input if
1133 none are given, to standard output, reversing the records (lines by
1134 default) in each separately.  Synopsis:
1135
1136      tac [OPTION]... [FILE]...
1137
1138    "Records" are separated by instances of a string (newline by
1139 default).  By default, this separator string is attached to the end of
1140 the record that it follows in the file.
1141
1142    The program accepts the following options.  Also see *Note Common
1143 options::.
1144
1145 `-b'
1146 `--before'
1147      The separator is attached to the beginning of the record that it
1148      precedes in the file.
1149
1150 `-r'
1151 `--regex'
1152      Treat the separator string as a regular expression.  Users of `tac'
1153      on MS-DOS/MS-Windows should note that, since `tac' reads files in
1154      binary mode, each line of a text file might end with a CR/LF pair
1155      instead of the Unix-style LF.
1156
1157 `-s SEPARATOR'
1158 `--separator=SEPARATOR'
1159      Use SEPARATOR as the record separator, instead of newline.
1160
1161
1162    An exit status of zero indicates success, and a nonzero value
1163 indicates failure.
1164
1165 \1f
1166 File: coreutils.info,  Node: nl invocation,  Next: od invocation,  Prev: tac invocation,  Up: Output of entire files
1167
1168 3.3 `nl': Number lines and write files
1169 ======================================
1170
1171 `nl' writes each FILE (`-' means standard input), or standard input if
1172 none are given, to standard output, with line numbers added to some or
1173 all of the lines.  Synopsis:
1174
1175      nl [OPTION]... [FILE]...
1176
1177    `nl' decomposes its input into (logical) pages; by default, the line
1178 number is reset to 1 at the top of each logical page.  `nl' treats all
1179 of the input files as a single document; it does not reset line numbers
1180 or logical pages between files.
1181
1182    A logical page consists of three sections: header, body, and footer.
1183 Any of the sections can be empty.  Each can be numbered in a different
1184 style from the others.
1185
1186    The beginnings of the sections of logical pages are indicated in the
1187 input file by a line containing exactly one of these delimiter strings:
1188
1189 `\:\:\:'
1190      start of header;
1191
1192 `\:\:'
1193      start of body;
1194
1195 `\:'
1196      start of footer.
1197
1198    The two characters from which these strings are made can be changed
1199 from `\' and `:' via options (see below), but the pattern and length of
1200 each string cannot be changed.
1201
1202    A section delimiter is replaced by an empty line on output.  Any text
1203 that comes before the first section delimiter string in the input file
1204 is considered to be part of a body section, so `nl' treats a file that
1205 contains no section delimiters as a single body section.
1206
1207    The program accepts the following options.  Also see *Note Common
1208 options::.
1209
1210 `-b STYLE'
1211 `--body-numbering=STYLE'
1212      Select the numbering style for lines in the body section of each
1213      logical page.  When a line is not numbered, the current line number
1214      is not incremented, but the line number separator character is
1215      still prepended to the line.  The styles are:
1216
1217     `a'
1218           number all lines,
1219
1220     `t'
1221           number only nonempty lines (default for body),
1222
1223     `n'
1224           do not number lines (default for header and footer),
1225
1226     `pBRE'
1227           number only lines that contain a match for the basic regular
1228           expression BRE.  *Note Regular Expressions: (grep)Regular
1229           Expressions.
1230
1231 `-d CD'
1232 `--section-delimiter=CD'
1233      Set the section delimiter characters to CD; default is `\:'.  If
1234      only C is given, the second remains `:'.  (Remember to protect `\'
1235      or other metacharacters from shell expansion with quotes or extra
1236      backslashes.)
1237
1238 `-f STYLE'
1239 `--footer-numbering=STYLE'
1240      Analogous to `--body-numbering'.
1241
1242 `-h STYLE'
1243 `--header-numbering=STYLE'
1244      Analogous to `--body-numbering'.
1245
1246 `-i NUMBER'
1247 `--page-increment=NUMBER'
1248      Increment line numbers by NUMBER (default 1).
1249
1250 `-l NUMBER'
1251 `--join-blank-lines=NUMBER'
1252      Consider NUMBER (default 1) consecutive empty lines to be one
1253      logical line for numbering, and only number the last one.  Where
1254      fewer than NUMBER consecutive empty lines occur, do not number
1255      them.  An empty line is one that contains no characters, not even
1256      spaces or tabs.
1257
1258 `-n FORMAT'
1259 `--number-format=FORMAT'
1260      Select the line numbering format (default is `rn'):
1261
1262     `ln'
1263           left justified, no leading zeros;
1264
1265     `rn'
1266           right justified, no leading zeros;
1267
1268     `rz'
1269           right justified, leading zeros.
1270
1271 `-p'
1272 `--no-renumber'
1273      Do not reset the line number at the start of a logical page.
1274
1275 `-s STRING'
1276 `--number-separator=STRING'
1277      Separate the line number from the text line in the output with
1278      STRING (default is the TAB character).
1279
1280 `-v NUMBER'
1281 `--starting-line-number=NUMBER'
1282      Set the initial line number on each logical page to NUMBER
1283      (default 1).
1284
1285 `-w NUMBER'
1286 `--number-width=NUMBER'
1287      Use NUMBER characters for line numbers (default 6).
1288
1289
1290    An exit status of zero indicates success, and a nonzero value
1291 indicates failure.
1292
1293 \1f
1294 File: coreutils.info,  Node: od invocation,  Next: base64 invocation,  Prev: nl invocation,  Up: Output of entire files
1295
1296 3.4 `od': Write files in octal or other formats
1297 ===============================================
1298
1299 `od' writes an unambiguous representation of each FILE (`-' means
1300 standard input), or standard input if none are given.  Synopses:
1301
1302      od [OPTION]... [FILE]...
1303      od [-abcdfilosx]... [FILE] [[+]OFFSET[.][b]]
1304      od [OPTION]... --traditional [FILE] [[+]OFFSET[.][b] [[+]LABEL[.][b]]]
1305
1306    Each line of output consists of the offset in the input, followed by
1307 groups of data from the file.  By default, `od' prints the offset in
1308 octal, and each group of file data is a C `short int''s worth of input
1309 printed as a single octal number.
1310
1311    If OFFSET is given, it specifies how many input bytes to skip before
1312 formatting and writing.  By default, it is interpreted as an octal
1313 number, but the optional trailing decimal point causes it to be
1314 interpreted as decimal.  If no decimal is specified and the offset
1315 begins with `0x' or `0X' it is interpreted as a hexadecimal number.  If
1316 there is a trailing `b', the number of bytes skipped will be OFFSET
1317 multiplied by 512.
1318
1319    If a command is of both the first and second forms, the second form
1320 is assumed if the last operand begins with `+' or (if there are two
1321 operands) a digit.  For example, in `od foo 10' and `od +10' the `10'
1322 is an offset, whereas in `od 10' the `10' is a file name.
1323
1324    The program accepts the following options.  Also see *Note Common
1325 options::.
1326
1327 `-A RADIX'
1328 `--address-radix=RADIX'
1329      Select the base in which file offsets are printed.  RADIX can be
1330      one of the following:
1331
1332     `d'
1333           decimal;
1334
1335     `o'
1336           octal;
1337
1338     `x'
1339           hexadecimal;
1340
1341     `n'
1342           none (do not print offsets).
1343
1344      The default is octal.
1345
1346 `-j BYTES'
1347 `--skip-bytes=BYTES'
1348      Skip BYTES input bytes before formatting and writing.  If BYTES
1349      begins with `0x' or `0X', it is interpreted in hexadecimal;
1350      otherwise, if it begins with `0', in octal; otherwise, in decimal.
1351      Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by
1352      1048576.
1353
1354 `-N BYTES'
1355 `--read-bytes=BYTES'
1356      Output at most BYTES bytes of the input.  Prefixes and suffixes on
1357      `bytes' are interpreted as for the `-j' option.
1358
1359 `-S N'
1360 `--strings[=N]'
1361      Instead of the normal output, output only "string constants": at
1362      least N consecutive ASCII graphic characters, followed by a null
1363      (zero) byte.
1364
1365      If N is omitted with `--strings', the default is 3.
1366
1367 `-t TYPE'
1368 `--format=TYPE'
1369      Select the format in which to output the file data.  TYPE is a
1370      string of one or more of the below type indicator characters.  If
1371      you include more than one type indicator character in a single TYPE
1372      string, or use this option more than once, `od' writes one copy of
1373      each output line using each of the data types that you specified,
1374      in the order that you specified.
1375
1376      Adding a trailing "z" to any type specification appends a display
1377      of the ASCII character representation of the printable characters
1378      to the output line generated by the type specification.
1379
1380     `a'
1381           named character, ignoring high-order bit
1382
1383     `c'
1384           ASCII character or backslash escape,
1385
1386     `d'
1387           signed decimal
1388
1389     `f'
1390           floating point
1391
1392     `o'
1393           octal
1394
1395     `u'
1396           unsigned decimal
1397
1398     `x'
1399           hexadecimal
1400
1401      The type `a' outputs things like `sp' for space, `nl' for newline,
1402      and `nul' for a null (zero) byte.  Only the least significant
1403      seven bits of each byte is used; the high-order bit is ignored.
1404      Type `c' outputs ` ', `\n', and `\0', respectively.
1405
1406      Except for types `a' and `c', you can specify the number of bytes
1407      to use in interpreting each number in the given data type by
1408      following the type indicator character with a decimal integer.
1409      Alternately, you can specify the size of one of the C compiler's
1410      built-in data types by following the type indicator character with
1411      one of the following characters.  For integers (`d', `o', `u',
1412      `x'):
1413
1414     `C'
1415           char
1416
1417     `S'
1418           short
1419
1420     `I'
1421           int
1422
1423     `L'
1424           long
1425
1426      For floating point (`f'):
1427
1428     F
1429           float
1430
1431     D
1432           double
1433
1434     L
1435           long double
1436
1437 `-v'
1438 `--output-duplicates'
1439      Output consecutive lines that are identical.  By default, when two
1440      or more consecutive output lines would be identical, `od' outputs
1441      only the first line, and puts just an asterisk on the following
1442      line to indicate the elision.
1443
1444 `-w[N]'
1445 `--width[=N]'
1446      Dump `n' input bytes per output line.  This must be a multiple of
1447      the least common multiple of the sizes associated with the
1448      specified output types.
1449
1450      If this option is not given at all, the default is 16.  If N is
1451      omitted, the default is 32.
1452
1453
1454    The next several options are shorthands for format specifications.
1455 GNU `od' accepts any combination of shorthands and format specification
1456 options.  These options accumulate.
1457
1458 `-a'
1459      Output as named characters.  Equivalent to `-t a'.
1460
1461 `-b'
1462      Output as octal bytes.  Equivalent to `-t o1'.
1463
1464 `-c'
1465      Output as ASCII characters or backslash escapes.  Equivalent to
1466      `-t c'.
1467
1468 `-d'
1469      Output as unsigned decimal two-byte units.  Equivalent to `-t u2'.
1470
1471 `-f'
1472      Output as floats.  Equivalent to `-t fF'.
1473
1474 `-i'
1475      Output as decimal ints.  Equivalent to `-t dI'.
1476
1477 `-l'
1478      Output as decimal long ints.  Equivalent to `-t dL'.
1479
1480 `-o'
1481      Output as octal two-byte units.  Equivalent to `-t o2'.
1482
1483 `-s'
1484      Output as decimal two-byte units.  Equivalent to `-t d2'.
1485
1486 `-x'
1487      Output as hexadecimal two-byte units.  Equivalent to `-t x2'.
1488
1489 `--traditional'
1490      Recognize the non-option label argument that traditional `od'
1491      accepted.  The following syntax:
1492
1493           od --traditional [FILE] [[+]OFFSET[.][b] [[+]LABEL[.][b]]]
1494
1495      can be used to specify at most one file and optional arguments
1496      specifying an offset and a pseudo-start address, LABEL.  The LABEL
1497      argument is interpreted just like OFFSET, but it specifies an
1498      initial pseudo-address.  The pseudo-addresses are displayed in
1499      parentheses following any normal address.
1500
1501
1502    An exit status of zero indicates success, and a nonzero value
1503 indicates failure.
1504
1505 \1f
1506 File: coreutils.info,  Node: base64 invocation,  Prev: od invocation,  Up: Output of entire files
1507
1508 3.5 `base64': Transform data into printable data.
1509 =================================================
1510
1511 `base64' transforms data read from a file, or standard input, into (or
1512 from) base64 encoded form.  The base64 encoded form uses printable
1513 ASCII characters to represent binary data, see RFC 3548
1514 (ftp://ftp.rfc-editor.org/in-notes/rfc3548.txt).  Synopses:
1515
1516      base64 [OPTION]... [FILE]
1517      base64 --decode [OPTION]... [FILE]
1518
1519    The base64 encoding expands data to roughly 133% of the original.
1520
1521    The program accepts the following options.  Also see *Note Common
1522 options::.
1523
1524 `-w COLS'
1525 `--wrap=COLS'
1526      During encoding, wrap lines after COLS characters.  This must be a
1527      positive number.
1528
1529      The default is to wrap after 76 characters.  Use the value 0 to
1530      disable line wrapping altogether.
1531
1532 `-d'
1533 `--decode'
1534      Change the mode of operation, from the default of encoding data, to
1535      decoding data.  Input is expected to be base64 encoded data, and
1536      the output will be the original data.
1537
1538 `-i'
1539 `--ignore-garbage'
1540      When decoding, newlines are always accepted.  During decoding,
1541      ignore unrecognized bytes, to permit distorted data to be decoded.
1542
1543
1544    An exit status of zero indicates success, and a nonzero value
1545 indicates failure.
1546
1547 \1f
1548 File: coreutils.info,  Node: Formatting file contents,  Next: Output of parts of files,  Prev: Output of entire files,  Up: Top
1549
1550 4 Formatting file contents
1551 **************************
1552
1553 These commands reformat the contents of files.
1554
1555 * Menu:
1556
1557 * fmt invocation::              Reformat paragraph text.
1558 * pr invocation::               Paginate or columnate files for printing.
1559 * fold invocation::             Wrap input lines to fit in specified width.
1560
1561 \1f
1562 File: coreutils.info,  Node: fmt invocation,  Next: pr invocation,  Up: Formatting file contents
1563
1564 4.1 `fmt': Reformat paragraph text
1565 ==================================
1566
1567 `fmt' fills and joins lines to produce output lines of (at most) a
1568 given number of characters (75 by default).  Synopsis:
1569
1570      fmt [OPTION]... [FILE]...
1571
1572    `fmt' reads from the specified FILE arguments (or standard input if
1573 none are given), and writes to standard output.
1574
1575    By default, blank lines, spaces between words, and indentation are
1576 preserved in the output; successive input lines with different
1577 indentation are not joined; tabs are expanded on input and introduced on
1578 output.
1579
1580    `fmt' prefers breaking lines at the end of a sentence, and tries to
1581 avoid line breaks after the first word of a sentence or before the last
1582 word of a sentence.  A "sentence break" is defined as either the end of
1583 a paragraph or a word ending in any of `.?!', followed by two spaces or
1584 end of line, ignoring any intervening parentheses or quotes.  Like TeX,
1585 `fmt' reads entire "paragraphs" before choosing line breaks; the
1586 algorithm is a variant of that given by Donald E. Knuth and Michael F.
1587 Plass in "Breaking Paragraphs Into Lines", `Software--Practice &
1588 Experience' 11, 11 (November 1981), 1119-1184.
1589
1590    The program accepts the following options.  Also see *Note Common
1591 options::.
1592
1593 `-c'
1594 `--crown-margin'
1595      "Crown margin" mode: preserve the indentation of the first two
1596      lines within a paragraph, and align the left margin of each
1597      subsequent line with that of the second line.
1598
1599 `-t'
1600 `--tagged-paragraph'
1601      "Tagged paragraph" mode: like crown margin mode, except that if
1602      indentation of the first line of a paragraph is the same as the
1603      indentation of the second, the first line is treated as a one-line
1604      paragraph.
1605
1606 `-s'
1607 `--split-only'
1608      Split lines only.  Do not join short lines to form longer ones.
1609      This prevents sample lines of code, and other such "formatted"
1610      text from being unduly combined.
1611
1612 `-u'
1613 `--uniform-spacing'
1614      Uniform spacing.  Reduce spacing between words to one space, and
1615      spacing between sentences to two spaces.
1616
1617 `-WIDTH'
1618 `-w WIDTH'
1619 `--width=WIDTH'
1620      Fill output lines up to WIDTH characters (default 75).  `fmt'
1621      initially tries to make lines about 7% shorter than this, to give
1622      it room to balance line lengths.
1623
1624 `-p PREFIX'
1625 `--prefix=PREFIX'
1626      Only lines beginning with PREFIX (possibly preceded by whitespace)
1627      are subject to formatting.  The prefix and any preceding
1628      whitespace are stripped for the formatting and then re-attached to
1629      each formatted output line.  One use is to format certain kinds of
1630      program comments, while leaving the code unchanged.
1631
1632
1633    An exit status of zero indicates success, and a nonzero value
1634 indicates failure.
1635
1636 \1f
1637 File: coreutils.info,  Node: pr invocation,  Next: fold invocation,  Prev: fmt invocation,  Up: Formatting file contents
1638
1639 4.2 `pr': Paginate or columnate files for printing
1640 ==================================================
1641
1642 `pr' writes each FILE (`-' means standard input), or standard input if
1643 none are given, to standard output, paginating and optionally
1644 outputting in multicolumn format; optionally merges all FILEs, printing
1645 all in parallel, one per column.  Synopsis:
1646
1647      pr [OPTION]... [FILE]...
1648
1649    By default, a 5-line header is printed at each page: two blank lines;
1650 a line with the date, the file name, and the page count; and two more
1651 blank lines.  A footer of five blank lines is also printed.  With the
1652 `-F' option, a 3-line header is printed: the leading two blank lines are
1653 omitted; no footer is used.  The default PAGE_LENGTH in both cases is 66
1654 lines.  The default number of text lines changes from 56 (without `-F')
1655 to 63 (with `-F').  The text line of the header takes the form `DATE
1656 STRING PAGE', with spaces inserted around STRING so that the line takes
1657 up the full PAGE_WIDTH.  Here, DATE is the date (see the `-D' or
1658 `--date-format' option for details), STRING is the centered header
1659 string, and PAGE identifies the page number.  The `LC_MESSAGES' locale
1660 category affects the spelling of PAGE; in the default C locale, it is
1661 `Page NUMBER' where NUMBER is the decimal page number.
1662
1663    Form feeds in the input cause page breaks in the output.  Multiple
1664 form feeds produce empty pages.
1665
1666    Columns are of equal width, separated by an optional string (default
1667 is `space').  For multicolumn output, lines will always be truncated to
1668 PAGE_WIDTH (default 72), unless you use the `-J' option.  For single
1669 column output no line truncation occurs by default.  Use `-W' option to
1670 truncate lines in that case.
1671
1672    The following changes were made in version 1.22i and apply to later
1673 versions of `pr':  - Brian
1674    * Some small LETTER OPTIONS (`-s', `-w') have been redefined for
1675      better POSIX compliance.  The output of some further cases has
1676      been adapted to other Unix systems.  These changes are not
1677      compatible with earlier versions of the program.
1678
1679    * Some NEW CAPITAL LETTER options (`-J', `-S', `-W') have been
1680      introduced to turn off unexpected interferences of small letter
1681      options.  The `-N' option and the second argument LAST_PAGE of
1682      `+FIRST_PAGE' offer more flexibility.  The detailed handling of
1683      form feeds set in the input files requires the `-T' option.
1684
1685    * Capital letter options override small letter ones.
1686
1687    * Some of the option-arguments (compare `-s', `-e', `-i', `-n')
1688      cannot be specified as separate arguments from the preceding
1689      option letter (already stated in the POSIX specification).
1690
1691    The program accepts the following options.  Also see *Note Common
1692 options::.
1693
1694 `+FIRST_PAGE[:LAST_PAGE]'
1695 `--pages=FIRST_PAGE[:LAST_PAGE]'
1696      Begin printing with page FIRST_PAGE and stop with LAST_PAGE.
1697      Missing `:LAST_PAGE' implies end of file.  While estimating the
1698      number of skipped pages each form feed in the input file results
1699      in a new page.  Page counting with and without `+FIRST_PAGE' is
1700      identical.  By default, counting starts with the first page of
1701      input file (not first page printed).  Line numbering may be
1702      altered by `-N' option.
1703
1704 `-COLUMN'
1705 `--columns=COLUMN'
1706      With each single FILE, produce COLUMN columns of output (default
1707      is 1) and print columns down, unless `-a' is used.  The column
1708      width is automatically decreased as COLUMN increases; unless you
1709      use the `-W/-w' option to increase PAGE_WIDTH as well.  This
1710      option might well cause some lines to be truncated.  The number of
1711      lines in the columns on each page are balanced.  The options `-e'
1712      and `-i' are on for multiple text-column output.  Together with
1713      `-J' option column alignment and line truncation is turned off.
1714      Lines of full length are joined in a free field format and `-S'
1715      option may set field separators.  `-COLUMN' may not be used with
1716      `-m' option.
1717
1718 `-a'
1719 `--across'
1720      With each single FILE, print columns across rather than down.  The
1721      `-COLUMN' option must be given with COLUMN greater than one.  If a
1722      line is too long to fit in a column, it is truncated.
1723
1724 `-c'
1725 `--show-control-chars'
1726      Print control characters using hat notation (e.g., `^G'); print
1727      other nonprinting characters in octal backslash notation.  By
1728      default, nonprinting characters are not changed.
1729
1730 `-d'
1731 `--double-space'
1732      Double space the output.
1733
1734 `-D FORMAT'
1735 `--date-format=FORMAT'
1736      Format header dates using FORMAT, using the same conventions as
1737      for the command `date +FORMAT'; *Note date invocation::.  Except
1738      for directives, which start with `%', characters in FORMAT are
1739      printed unchanged.  You can use this option to specify an
1740      arbitrary string in place of the header date, e.g.,
1741      `--date-format="Monday morning"'.
1742
1743      Normally the date format defaults to `%Y-%m-%d %H:%M' (for
1744      example, `2001-12-04 23:59'); but if the `POSIXLY_CORRECT'
1745      environment variable is set and the `LC_TIME' locale category
1746      specifies the POSIX locale, the default is `%b %e %H:%M %Y' (for
1747      example, `Dec  4 23:59 2001'.
1748
1749      Time stamps are listed according to the time zone rules specified
1750      by the `TZ' environment variable, or by the system default rules if
1751      `TZ' is not set.  *Note Specifying the Time Zone with `TZ':
1752      (libc)TZ Variable.
1753
1754 `-e[IN-TABCHAR[IN-TABWIDTH]]'
1755 `--expand-tabs[=IN-TABCHAR[IN-TABWIDTH]]'
1756      Expand TABs to spaces on input.  Optional argument IN-TABCHAR is
1757      the input tab character (default is the TAB character).  Second
1758      optional argument IN-TABWIDTH is the input tab character's width
1759      (default is 8).
1760
1761 `-f'
1762 `-F'
1763 `--form-feed'
1764      Use a form feed instead of newlines to separate output pages.  The
1765      default page length of 66 lines is not altered.  But the number of
1766      lines of text per page changes from default 56 to 63 lines.
1767
1768 `-h HEADER'
1769 `--header=HEADER'
1770      Replace the file name in the header with the centered string
1771      HEADER.  When using the shell, HEADER should be quoted and should
1772      be separated from `-h' by a space.
1773
1774 `-i[OUT-TABCHAR[OUT-TABWIDTH]]'
1775 `--output-tabs[=OUT-TABCHAR[OUT-TABWIDTH]]'
1776      Replace spaces with TABs on output.  Optional argument OUT-TABCHAR
1777      is the output tab character (default is the TAB character).
1778      Second optional argument OUT-TABWIDTH is the output tab
1779      character's width (default is 8).
1780
1781 `-J'
1782 `--join-lines'
1783      Merge lines of full length.  Used together with the column options
1784      `-COLUMN', `-a -COLUMN' or `-m'.  Turns off `-W/-w' line
1785      truncation; no column alignment used; may be used with
1786      `--sep-string[=STRING]'.  `-J' has been introduced (together with
1787      `-W' and `--sep-string') to disentangle the old (POSIX-compliant)
1788      options `-w' and `-s' along with the three column options.
1789
1790 `-l PAGE_LENGTH'
1791 `--length=PAGE_LENGTH'
1792      Set the page length to PAGE_LENGTH (default 66) lines, including
1793      the lines of the header [and the footer].  If PAGE_LENGTH is less
1794      than or equal to 10 (or <= 3 with `-F'), the header and footer are
1795      omitted, and all form feeds set in input files are eliminated, as
1796      if the `-T' option had been given.
1797
1798 `-m'
1799 `--merge'
1800      Merge and print all FILEs in parallel, one in each column.  If a
1801      line is too long to fit in a column, it is truncated, unless the
1802      `-J' option is used.  `--sep-string[=STRING]' may be used.  Empty
1803      pages in some FILEs (form feeds set) produce empty columns, still
1804      marked by STRING.  The result is a continuous line numbering and
1805      column marking throughout the whole merged file.  Completely empty
1806      merged pages show no separators or line numbers.  The default
1807      header becomes `DATE PAGE' with spaces inserted in the middle; this
1808      may be used with the `-h' or `--header' option to fill up the
1809      middle blank part.
1810
1811 `-n[NUMBER-SEPARATOR[DIGITS]]'
1812 `--number-lines[=NUMBER-SEPARATOR[DIGITS]]'
1813      Provide DIGITS digit line numbering (default for DIGITS is 5).
1814      With multicolumn output the number occupies the first DIGITS
1815      column positions of each text column or only each line of `-m'
1816      output.  With single column output the number precedes each line
1817      just as `-m' does.  Default counting of the line numbers starts
1818      with the first line of the input file (not the first line printed,
1819      compare the `--page' option and `-N' option).  Optional argument
1820      NUMBER-SEPARATOR is the character appended to the line number to
1821      separate it from the text followed.  The default separator is the
1822      TAB character.  In a strict sense a TAB is always printed with
1823      single column output only.  The TAB-width varies with the
1824      TAB-position, e.g., with the left MARGIN specified by `-o' option.
1825      With multicolumn output priority is given to `equal width of
1826      output columns' (a POSIX specification).  The TAB-width is fixed
1827      to the value of the first column and does not change with
1828      different values of left MARGIN.  That means a fixed number of
1829      spaces is always printed in the place of the NUMBER-SEPARATOR TAB.
1830      The tabification depends upon the output position.
1831
1832 `-N LINE_NUMBER'
1833 `--first-line-number=LINE_NUMBER'
1834      Start line counting with the number LINE_NUMBER at first line of
1835      first page printed (in most cases not the first line of the input
1836      file).
1837
1838 `-o MARGIN'
1839 `--indent=MARGIN'
1840      Indent each line with a margin MARGIN spaces wide (default is
1841      zero).  The total page width is the size of the margin plus the
1842      PAGE_WIDTH set with the `-W/-w' option.  A limited overflow may
1843      occur with numbered single column output (compare `-n' option).
1844
1845 `-r'
1846 `--no-file-warnings'
1847      Do not print a warning message when an argument FILE cannot be
1848      opened.  (The exit status will still be nonzero, however.)
1849
1850 `-s[CHAR]'
1851 `--separator[=CHAR]'
1852      Separate columns by a single character CHAR.  The default for CHAR
1853      is the TAB character without `-w' and `no character' with `-w'.
1854      Without `-s' the default separator `space' is set.  `-s[char]'
1855      turns off line truncation of all three column options
1856      (`-COLUMN'|`-a -COLUMN'|`-m') unless `-w' is set.  This is a
1857      POSIX-compliant formulation.
1858
1859 `-SSTRING'
1860 `--sep-string[=STRING]'
1861      Use STRING to separate output columns.  The `-S' option doesn't
1862      affect the `-W/-w' option, unlike the `-s' option which does.  It
1863      does not affect line truncation or column alignment.  Without
1864      `-S', and with `-J', `pr' uses the default output separator, TAB.
1865      Without `-S' or `-J', `pr' uses a `space' (same as `-S" "').
1866      `--sep-string' with no `=STRING' is equivalent to
1867      `--sep-string=""'.
1868
1869 `-t'
1870 `--omit-header'
1871      Do not print the usual header [and footer] on each page, and do
1872      not fill out the bottom of pages (with blank lines or a form
1873      feed).  No page structure is produced, but form feeds set in the
1874      input files are retained.  The predefined pagination is not
1875      changed.  `-t' or `-T' may be useful together with other options;
1876      e.g.: `-t -e4', expand TAB characters in the input file to 4
1877      spaces but don't make any other changes.  Use of `-t' overrides
1878      `-h'.
1879
1880 `-T'
1881 `--omit-pagination'
1882      Do not print header [and footer].  In addition eliminate all form
1883      feeds set in the input files.
1884
1885 `-v'
1886 `--show-nonprinting'
1887      Print nonprinting characters in octal backslash notation.
1888
1889 `-w PAGE_WIDTH'
1890 `--width=PAGE_WIDTH'
1891      Set page width to PAGE_WIDTH characters for multiple text-column
1892      output only (default for PAGE_WIDTH is 72).  `-s[CHAR]' turns off
1893      the default page width and any line truncation and column
1894      alignment.  Lines of full length are merged, regardless of the
1895      column options set.  No PAGE_WIDTH setting is possible with single
1896      column output.  A POSIX-compliant formulation.
1897
1898 `-W PAGE_WIDTH'
1899 `--page_width=PAGE_WIDTH'
1900      Set the page width to PAGE_WIDTH characters.  That's valid with and
1901      without a column option.  Text lines are truncated, unless `-J' is
1902      used.  Together with one of the three column options (`-COLUMN',
1903      `-a -COLUMN' or `-m') column alignment is always used.  The
1904      separator options `-S' or `-s' don't affect the `-W' option.
1905      Default is 72 characters.  Without `-W PAGE_WIDTH' and without any
1906      of the column options NO line truncation is used (defined to keep
1907      downward compatibility and to meet most frequent tasks).  That's
1908      equivalent to `-W 72 -J'.  The header line is never truncated.
1909
1910
1911    An exit status of zero indicates success, and a nonzero value
1912 indicates failure.
1913
1914 \1f
1915 File: coreutils.info,  Node: fold invocation,  Prev: pr invocation,  Up: Formatting file contents
1916
1917 4.3 `fold': Wrap input lines to fit in specified width
1918 ======================================================
1919
1920 `fold' writes each FILE (`-' means standard input), or standard input
1921 if none are given, to standard output, breaking long lines.  Synopsis:
1922
1923      fold [OPTION]... [FILE]...
1924
1925    By default, `fold' breaks lines wider than 80 columns.  The output
1926 is split into as many lines as necessary.
1927
1928    `fold' counts screen columns by default; thus, a tab may count more
1929 than one column, backspace decreases the column count, and carriage
1930 return sets the column to zero.
1931
1932    The program accepts the following options.  Also see *Note Common
1933 options::.
1934
1935 `-b'
1936 `--bytes'
1937      Count bytes rather than columns, so that tabs, backspaces, and
1938      carriage returns are each counted as taking up one column, just
1939      like other characters.
1940
1941 `-s'
1942 `--spaces'
1943      Break at word boundaries: the line is broken after the last blank
1944      before the maximum line length.  If the line contains no such
1945      blanks, the line is broken at the maximum line length as usual.
1946
1947 `-w WIDTH'
1948 `--width=WIDTH'
1949      Use a maximum line length of WIDTH columns instead of 80.
1950
1951      For compatibility `fold' supports an obsolete option syntax
1952      `-WIDTH'.  New scripts should use `-w WIDTH' instead.
1953
1954
1955    An exit status of zero indicates success, and a nonzero value
1956 indicates failure.
1957
1958 \1f
1959 File: coreutils.info,  Node: Output of parts of files,  Next: Summarizing files,  Prev: Formatting file contents,  Up: Top
1960
1961 5 Output of parts of files
1962 **************************
1963
1964 These commands output pieces of the input.
1965
1966 * Menu:
1967
1968 * head invocation::             Output the first part of files.
1969 * tail invocation::             Output the last part of files.
1970 * split invocation::            Split a file into fixed-size pieces.
1971 * csplit invocation::           Split a file into context-determined pieces.
1972
1973 \1f
1974 File: coreutils.info,  Node: head invocation,  Next: tail invocation,  Up: Output of parts of files
1975
1976 5.1 `head': Output the first part of files
1977 ==========================================
1978
1979 `head' prints the first part (10 lines by default) of each FILE; it
1980 reads from standard input if no files are given or when given a FILE of
1981 `-'.  Synopsis:
1982
1983      head [OPTION]... [FILE]...
1984
1985    If more than one FILE is specified, `head' prints a one-line header
1986 consisting of:
1987
1988      ==> FILE NAME <==
1989
1990 before the output for each FILE.
1991
1992    The program accepts the following options.  Also see *Note Common
1993 options::.
1994
1995 `-c N'
1996 `--bytes=N'
1997      Print the first N bytes, instead of initial lines.  Appending `b'
1998      multiplies N by 512, `k' by 1024, and `m' by 1048576.  However, if
1999      N starts with a `-', print all but the last N bytes of each file.
2000
2001 `-n N'
2002 `--lines=N'
2003      Output the first N lines.  However, if N starts with a `-', print
2004      all but the last N lines of each file.
2005
2006 `-q'
2007 `--quiet'
2008 `--silent'
2009      Never print file name headers.
2010
2011 `-v'
2012 `--verbose'
2013      Always print file name headers.
2014
2015
2016    For compatibility `head' also supports an obsolete option syntax
2017 `-COUNTOPTIONS', which is recognized only if it is specified first.
2018 COUNT is a decimal number optionally followed by a size letter (`b',
2019 `k', `m') as in `-c', or `l' to mean count by lines, or other option
2020 letters (`cqv').  Scripts intended for standard hosts should use `-c
2021 COUNT' or `-n COUNT' instead.  If your script must also run on hosts
2022 that support only the obsolete syntax, it is usually simpler to avoid
2023 `head', e.g., by using `sed 5q' instead of `head -5'.
2024
2025    An exit status of zero indicates success, and a nonzero value
2026 indicates failure.
2027
2028 \1f
2029 File: coreutils.info,  Node: tail invocation,  Next: split invocation,  Prev: head invocation,  Up: Output of parts of files
2030
2031 5.2 `tail': Output the last part of files
2032 =========================================
2033
2034 `tail' prints the last part (10 lines by default) of each FILE; it
2035 reads from standard input if no files are given or when given a FILE of
2036 `-'.  Synopsis:
2037
2038      tail [OPTION]... [FILE]...
2039
2040    If more than one FILE is specified, `tail' prints a one-line header
2041 consisting of:
2042
2043      ==> FILE NAME <==
2044
2045 before the output for each FILE.
2046
2047    GNU `tail' can output any amount of data (some other versions of
2048 `tail' cannot).  It also has no `-r' option (print in reverse), since
2049 reversing a file is really a different job from printing the end of a
2050 file; BSD `tail' (which is the one with `-r') can only reverse files
2051 that are at most as large as its buffer, which is typically 32 KiB.  A
2052 more reliable and versatile way to reverse files is the GNU `tac'
2053 command.
2054
2055    If any option-argument is a number N starting with a `+', `tail'
2056 begins printing with the Nth item from the start of each file, instead
2057 of from the end.
2058
2059    The program accepts the following options.  Also see *Note Common
2060 options::.
2061
2062 `-c BYTES'
2063 `--bytes=BYTES'
2064      Output the last BYTES bytes, instead of final lines.  Appending
2065      `b' multiplies BYTES by 512, `k' by 1024, and `m' by 1048576.
2066
2067 `-f'
2068 `--follow[=HOW]'
2069      Loop forever trying to read more characters at the end of the file,
2070      presumably because the file is growing.  If more than one file is
2071      given, `tail' prints a header whenever it gets output from a
2072      different file, to indicate which file that output is from.
2073
2074      There are two ways to specify how you'd like to track files with
2075      this option, but that difference is noticeable only when a
2076      followed file is removed or renamed.  If you'd like to continue to
2077      track the end of a growing file even after it has been unlinked,
2078      use `--follow=descriptor'.  This is the default behavior, but it
2079      is not useful if you're tracking a log file that may be rotated
2080      (removed or renamed, then reopened).  In that case, use
2081      `--follow=name' to track the named file by reopening it
2082      periodically to see if it has been removed and recreated by some
2083      other program.
2084
2085      No matter which method you use, if the tracked file is determined
2086      to have shrunk, `tail' prints a message saying the file has been
2087      truncated and resumes tracking the end of the file from the
2088      newly-determined endpoint.
2089
2090      When a file is removed, `tail''s behavior depends on whether it is
2091      following the name or the descriptor.  When following by name,
2092      tail can detect that a file has been removed and gives a message
2093      to that effect, and if `--retry' has been specified it will
2094      continue checking periodically to see if the file reappears.  When
2095      following a descriptor, tail does not detect that the file has
2096      been unlinked or renamed and issues no message;  even though the
2097      file may no longer be accessible via its original name, it may
2098      still be growing.
2099
2100      The option values `descriptor' and `name' may be specified only
2101      with the long form of the option, not with `-f'.
2102
2103      If `POSIXLY_CORRECT' is set, the `-f' option is ignored if no FILE
2104      operand is specified and standard input is a FIFO or a pipe.
2105
2106 `-F'
2107      This option is the same as `--follow=name --retry'.  That is, tail
2108      will attempt to reopen a file when it is removed.  Should this
2109      fail, tail will keep trying until it becomes accessible again.
2110
2111 `--retry'
2112      This option is useful mainly when following by name (i.e., with
2113      `--follow=name').  Without this option, when tail encounters a
2114      file that doesn't exist or is otherwise inaccessible, it reports
2115      that fact and never checks it again.
2116
2117 `--sleep-interval=NUMBER'
2118      Change the number of seconds to wait between iterations (the
2119      default is 1.0).  During one iteration, every specified file is
2120      checked to see if it has changed size.  Historical implementations
2121      of `tail' have required that NUMBER be an integer.  However, GNU
2122      `tail' accepts an arbitrary floating point number (using a period
2123      before any fractional digits).
2124
2125 `--pid=PID'
2126      When following by name or by descriptor, you may specify the
2127      process ID, PID, of the sole writer of all FILE arguments.  Then,
2128      shortly after that process terminates, tail will also terminate.
2129      This will work properly only if the writer and the tailing process
2130      are running on the same machine.  For example, to save the output
2131      of a build in a file and to watch the file grow, if you invoke
2132      `make' and `tail' like this then the tail process will stop when
2133      your build completes.  Without this option, you would have had to
2134      kill the `tail -f' process yourself.
2135
2136           $ make >& makerr & tail --pid=$! -f makerr
2137
2138      If you specify a PID that is not in use or that does not correspond
2139      to the process that is writing to the tailed files, then `tail'
2140      may terminate long before any FILEs stop growing or it may not
2141      terminate until long after the real writer has terminated.  Note
2142      that `--pid' cannot be supported on some systems; `tail' will
2143      print a warning if this is the case.
2144
2145 `--max-unchanged-stats=N'
2146      When tailing a file by name, if there have been N (default
2147      n=5) consecutive iterations for which the file has not changed,
2148      then `open'/`fstat' the file to determine if that file name is
2149      still associated with the same device/inode-number pair as before.
2150      When following a log file that is rotated, this is approximately
2151      the number of seconds between when tail prints the last
2152      pre-rotation lines and when it prints the lines that have
2153      accumulated in the new log file.  This option is meaningful only
2154      when following by name.
2155
2156 `-n N'
2157 `--lines=N'
2158      Output the last N lines.
2159
2160 `-q'
2161 `--quiet'
2162 `--silent'
2163      Never print file name headers.
2164
2165 `-v'
2166 `--verbose'
2167      Always print file name headers.
2168
2169
2170    For compatibility `tail' also supports an obsolete usage `tail
2171 -[COUNT][bcl][f] [FILE]', which is recognized only if it does not
2172 conflict with the usage described above.  This obsolete form uses
2173 exactly one option and at most one file.  In the option, COUNT is an
2174 optional decimal number optionally followed by a size letter (`b', `c',
2175 `l') to mean count by 512-byte blocks, bytes, or lines, optionally
2176 followed by `f' which has the same meaning as `-f'.
2177
2178    On older systems, the leading `-' can be replaced by `+' in the
2179 obsolete option syntax with the same meaning as in counts, and obsolete
2180 usage overrides normal usage when the two conflict.  This obsolete
2181 behavior can be enabled or disabled with the `_POSIX2_VERSION'
2182 environment variable (*note Standards conformance::).
2183
2184    Scripts intended for use on standard hosts should avoid obsolete
2185 syntax and should use `-c COUNT[b]', `-n COUNT', and/or `-f' instead.
2186 If your script must also run on hosts that support only the obsolete
2187 syntax, you can often rewrite it to avoid problematic usages, e.g., by
2188 using `sed -n '$p'' rather than `tail -1'.  If that's not possible, the
2189 script can use a test like `if tail -c +1 </dev/null >/dev/null 2>&1;
2190 then ...' to decide which syntax to use.
2191
2192    Even if your script assumes the standard behavior, you should still
2193 beware usages whose behaviors differ depending on the POSIX version.
2194 For example, avoid `tail - main.c', since it might be interpreted as
2195 either `tail main.c' or as `tail -- - main.c'; avoid `tail -c 4', since
2196 it might mean either `tail -c4' or `tail -c 10 4'; and avoid `tail +4',
2197 since it might mean either `tail ./+4' or `tail -n +4'.
2198
2199    An exit status of zero indicates success, and a nonzero value
2200 indicates failure.
2201
2202 \1f
2203 File: coreutils.info,  Node: split invocation,  Next: csplit invocation,  Prev: tail invocation,  Up: Output of parts of files
2204
2205 5.3 `split': Split a file into fixed-size pieces
2206 ================================================
2207
2208 `split' creates output files containing consecutive sections of INPUT
2209 (standard input if none is given or INPUT is `-').  Synopsis:
2210
2211      split [OPTION] [INPUT [PREFIX]]
2212
2213    By default, `split' puts 1000 lines of INPUT (or whatever is left
2214 over for the last section), into each output file.
2215
2216    The output files' names consist of PREFIX (`x' by default) followed
2217 by a group of characters (`aa', `ab', ... by default), such that
2218 concatenating the output files in traditional sorted order by file name
2219 produces the original input file.  If the output file names are
2220 exhausted, `split' reports an error without deleting the output files
2221 that it did create.
2222
2223    The program accepts the following options.  Also see *Note Common
2224 options::.
2225
2226 `-a LENGTH'
2227 `--suffix-length=LENGTH'
2228      Use suffixes of length LENGTH.  The default LENGTH is 2.
2229
2230 `-l LINES'
2231 `--lines=LINES'
2232      Put LINES lines of INPUT into each output file.
2233
2234      For compatibility `split' also supports an obsolete option syntax
2235      `-LINES'.  New scripts should use `-l LINES' instead.
2236
2237 `-b BYTES'
2238 `--bytes=BYTES'
2239      Put the first BYTES bytes of INPUT into each output file.
2240      Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by
2241      1048576.
2242
2243 `-C BYTES'
2244 `--line-bytes=BYTES'
2245      Put into each output file as many complete lines of INPUT as
2246      possible without exceeding BYTES bytes.  For lines longer than
2247      BYTES bytes, put BYTES bytes into each output file until less than
2248      BYTES bytes of the line are left, then continue normally.  BYTES
2249      has the same format as for the `--bytes' option.
2250
2251 `-d'
2252 `--numeric-suffixes'
2253      Use digits in suffixes rather than lower-case letters.
2254
2255 `--verbose'
2256      Write a diagnostic to standard error just before each output file
2257      is opened.
2258
2259
2260    An exit status of zero indicates success, and a nonzero value
2261 indicates failure.
2262
2263 \1f
2264 File: coreutils.info,  Node: csplit invocation,  Prev: split invocation,  Up: Output of parts of files
2265
2266 5.4 `csplit': Split a file into context-determined pieces
2267 =========================================================
2268
2269 `csplit' creates zero or more output files containing sections of INPUT
2270 (standard input if INPUT is `-').  Synopsis:
2271
2272      csplit [OPTION]... INPUT PATTERN...
2273
2274    The contents of the output files are determined by the PATTERN
2275 arguments, as detailed below.  An error occurs if a PATTERN argument
2276 refers to a nonexistent line of the input file (e.g., if no remaining
2277 line matches a given regular expression).  After every PATTERN has been
2278 matched, any remaining input is copied into one last output file.
2279
2280    By default, `csplit' prints the number of bytes written to each
2281 output file after it has been created.
2282
2283    The types of pattern arguments are:
2284
2285 `N'
2286      Create an output file containing the input up to but not including
2287      line N (a positive integer).  If followed by a repeat count, also
2288      create an output file containing the next N lines of the input
2289      file once for each repeat.
2290
2291 `/REGEXP/[OFFSET]'
2292      Create an output file containing the current line up to (but not
2293      including) the next line of the input file that contains a match
2294      for REGEXP.  The optional OFFSET is an integer.  If it is given,
2295      the input up to (but not including) the matching line plus or
2296      minus OFFSET is put into the output file, and the line after that
2297      begins the next section of input.
2298
2299 `%REGEXP%[OFFSET]'
2300      Like the previous type, except that it does not create an output
2301      file, so that section of the input file is effectively ignored.
2302
2303 `{REPEAT-COUNT}'
2304      Repeat the previous pattern REPEAT-COUNT additional times.  The
2305      REPEAT-COUNT can either be a positive integer or an asterisk,
2306      meaning repeat as many times as necessary until the input is
2307      exhausted.
2308
2309
2310    The output files' names consist of a prefix (`xx' by default)
2311 followed by a suffix.  By default, the suffix is an ascending sequence
2312 of two-digit decimal numbers from `00' to `99'.  In any case,
2313 concatenating the output files in sorted order by file name produces the
2314 original input file.
2315
2316    By default, if `csplit' encounters an error or receives a hangup,
2317 interrupt, quit, or terminate signal, it removes any output files that
2318 it has created so far before it exits.
2319
2320    The program accepts the following options.  Also see *Note Common
2321 options::.
2322
2323 `-f PREFIX'
2324 `--prefix=PREFIX'
2325      Use PREFIX as the output file name prefix.
2326
2327 `-b SUFFIX'
2328 `--suffix=SUFFIX'
2329      Use SUFFIX as the output file name suffix.  When this option is
2330      specified, the suffix string must include exactly one
2331      `printf(3)'-style conversion specification, possibly including
2332      format specification flags, a field width, a precision
2333      specifications, or all of these kinds of modifiers.  The format
2334      letter must convert a binary integer argument to readable form;
2335      thus, only `d', `i', `u', `o', `x', and `X' conversions are
2336      allowed.  The entire SUFFIX is given (with the current output file
2337      number) to `sprintf(3)' to form the file name suffixes for each of
2338      the individual output files in turn.  If this option is used, the
2339      `--digits' option is ignored.
2340
2341 `-n DIGITS'
2342 `--digits=DIGITS'
2343      Use output file names containing numbers that are DIGITS digits
2344      long instead of the default 2.
2345
2346 `-k'
2347 `--keep-files'
2348      Do not remove output files when errors are encountered.
2349
2350 `-z'
2351 `--elide-empty-files'
2352      Suppress the generation of zero-length output files.  (In cases
2353      where the section delimiters of the input file are supposed to
2354      mark the first lines of each of the sections, the first output
2355      file will generally be a zero-length file unless you use this
2356      option.)  The output file sequence numbers always run
2357      consecutively starting from 0, even when this option is specified.
2358
2359 `-s'
2360 `-q'
2361 `--silent'
2362 `--quiet'
2363      Do not print counts of output file sizes.
2364
2365
2366    An exit status of zero indicates success, and a nonzero value
2367 indicates failure.
2368
2369 \1f
2370 File: coreutils.info,  Node: Summarizing files,  Next: Operating on sorted files,  Prev: Output of parts of files,  Up: Top
2371
2372 6 Summarizing files
2373 *******************
2374
2375 These commands generate just a few numbers representing entire contents
2376 of files.
2377
2378 * Menu:
2379
2380 * wc invocation::               Print newline, word, and byte counts.
2381 * sum invocation::              Print checksum and block counts.
2382 * cksum invocation::            Print CRC checksum and byte counts.
2383 * md5sum invocation::           Print or check MD5 digests.
2384 * sha1sum invocation::          Print or check SHA-1 digests.
2385 * sha2 utilities::              Print or check SHA-2 digests.
2386
2387 \1f
2388 File: coreutils.info,  Node: wc invocation,  Next: sum invocation,  Up: Summarizing files
2389
2390 6.1 `wc': Print newline, word, and byte counts
2391 ==============================================
2392
2393 `wc' counts the number of bytes, characters, whitespace-separated
2394 words, and newlines in each given FILE, or standard input if none are
2395 given or for a FILE of `-'.  Synopsis:
2396
2397      wc [OPTION]... [FILE]...
2398
2399    `wc' prints one line of counts for each file, and if the file was
2400 given as an argument, it prints the file name following the counts.  If
2401 more than one FILE is given, `wc' prints a final line containing the
2402 cumulative counts, with the file name `total'.  The counts are printed
2403 in this order: newlines, words, characters, bytes, maximum line length.
2404 Each count is printed right-justified in a field with at least one
2405 space between fields so that the numbers and file names normally line
2406 up nicely in columns.  The width of the count fields varies depending
2407 on the inputs, so you should not depend on a particular field width.
2408 However, as a GNU extension, if only one count is printed, it is
2409 guaranteed to be printed without leading spaces.
2410
2411    By default, `wc' prints three counts: the newline, words, and byte
2412 counts.  Options can specify that only certain counts be printed.
2413 Options do not undo others previously given, so
2414
2415      wc --bytes --words
2416
2417 prints both the byte counts and the word counts.
2418
2419    With the `--max-line-length' option, `wc' prints the length of the
2420 longest line per file, and if there is more than one file it prints the
2421 maximum (not the sum) of those lengths.
2422
2423    The program accepts the following options.  Also see *Note Common
2424 options::.
2425
2426 `-c'
2427 `--bytes'
2428      Print only the byte counts.
2429
2430 `-m'
2431 `--chars'
2432      Print only the character counts.
2433
2434 `-w'
2435 `--words'
2436      Print only the word counts.
2437
2438 `-l'
2439 `--lines'
2440      Print only the newline counts.
2441
2442 `-L'
2443 `--max-line-length'
2444      Print only the maximum line lengths.
2445
2446 `--files0-from=FILE'
2447      Rather than processing files named on the command line, process
2448      those named in file FILE; each name is terminated by a null byte.
2449      This is useful when the list of file names is so long that it may
2450      exceed a command line length limitation.  In such cases, running
2451      `wc' via `xargs' is undesirable because it splits the list into
2452      pieces and makes `wc' print a total for each sublist rather than
2453      for the entire list.  One way to produce a list of
2454      null-byte-terminated file names is with GNU `find', using its
2455      `-print0' predicate.  For example, to find the length of the
2456      longest line in any `.c' or `.h' file in the current hierarchy, do
2457      this:
2458
2459           find . -name '*.[ch]' -print0 | wc -L --files0-from=- | tail -n1
2460
2461      Do not specify any FILE on the command line when using this option.
2462
2463
2464    An exit status of zero indicates success, and a nonzero value
2465 indicates failure.
2466
2467 \1f
2468 File: coreutils.info,  Node: sum invocation,  Next: cksum invocation,  Prev: wc invocation,  Up: Summarizing files
2469
2470 6.2 `sum': Print checksum and block counts
2471 ==========================================
2472
2473 `sum' computes a 16-bit checksum for each given FILE, or standard input
2474 if none are given or for a FILE of `-'.  Synopsis:
2475
2476      sum [OPTION]... [FILE]...
2477
2478    `sum' prints the checksum for each FILE followed by the number of
2479 blocks in the file (rounded up).  If more than one FILE is given, file
2480 names are also printed (by default).  (With the `--sysv' option,
2481 corresponding file names are printed when there is at least one file
2482 argument.)
2483
2484    By default, GNU `sum' computes checksums using an algorithm
2485 compatible with BSD `sum' and prints file sizes in units of 1024-byte
2486 blocks.
2487
2488    The program accepts the following options.  Also see *Note Common
2489 options::.
2490
2491 `-r'
2492      Use the default (BSD compatible) algorithm.  This option is
2493      included for compatibility with the System V `sum'.  Unless `-s'
2494      was also given, it has no effect.
2495
2496 `-s'
2497 `--sysv'
2498      Compute checksums using an algorithm compatible with System V
2499      `sum''s default, and print file sizes in units of 512-byte blocks.
2500
2501
2502    `sum' is provided for compatibility; the `cksum' program (see next
2503 section) is preferable in new applications.
2504
2505    An exit status of zero indicates success, and a nonzero value
2506 indicates failure.
2507
2508 \1f
2509 File: coreutils.info,  Node: cksum invocation,  Next: md5sum invocation,  Prev: sum invocation,  Up: Summarizing files
2510
2511 6.3 `cksum': Print CRC checksum and byte counts
2512 ===============================================
2513
2514 `cksum' computes a cyclic redundancy check (CRC) checksum for each
2515 given FILE, or standard input if none are given or for a FILE of `-'.
2516 Synopsis:
2517
2518      cksum [OPTION]... [FILE]...
2519
2520    `cksum' prints the CRC checksum for each file along with the number
2521 of bytes in the file, and the file name unless no arguments were given.
2522
2523    `cksum' is typically used to ensure that files transferred by
2524 unreliable means (e.g., netnews) have not been corrupted, by comparing
2525 the `cksum' output for the received files with the `cksum' output for
2526 the original files (typically given in the distribution).
2527
2528    The CRC algorithm is specified by the POSIX standard.  It is not
2529 compatible with the BSD or System V `sum' algorithms (see the previous
2530 section); it is more robust.
2531
2532    The only options are `--help' and `--version'.  *Note Common
2533 options::.
2534
2535    An exit status of zero indicates success, and a nonzero value
2536 indicates failure.
2537
2538 \1f
2539 File: coreutils.info,  Node: md5sum invocation,  Next: sha1sum invocation,  Prev: cksum invocation,  Up: Summarizing files
2540
2541 6.4 `md5sum': Print or check MD5 digests
2542 ========================================
2543
2544 `md5sum' computes a 128-bit checksum (or "fingerprint" or
2545 "message-digest") for each specified FILE.
2546
2547    Note: The MD5 digest is more reliable than a simple CRC (provided by
2548 the `cksum' command) for detecting accidental file corruption, as the
2549 chances of accidentally having two files with identical MD5 are
2550 vanishingly small.  However, it should not be considered truly secure
2551 against malicious tampering: although finding a file with a given MD5
2552 fingerprint, or modifying a file so as to retain its MD5 are considered
2553 infeasible at the moment, it is known how to produce different files
2554 with identical MD5 (a "collision"), something which can be a security
2555 issue in certain contexts.  For more secure hashes, consider using
2556 SHA-1 or SHA-2.  *Note sha1sum invocation::, and *Note sha2 utilities::.
2557
2558    If a FILE is specified as `-' or if no files are given `md5sum'
2559 computes the checksum for the standard input.  `md5sum' can also
2560 determine whether a file and checksum are consistent.  Synopsis:
2561
2562      md5sum [OPTION]... [FILE]...
2563
2564    For each FILE, `md5sum' outputs the MD5 checksum, a flag indicating
2565 a binary or text input file, and the file name.  If FILE contains a
2566 backslash or newline, the line is started with a backslash, and each
2567 problematic character in the file name is escaped with a backslash,
2568 making the output unambiguous even in the presence of arbitrary file
2569 names.  If FILE is omitted or specified as `-', standard input is read.
2570
2571    The program accepts the following options.  Also see *Note Common
2572 options::.
2573
2574 `-b'
2575 `--binary'
2576      Treat each input file as binary, by reading it in binary mode and
2577      outputting a `*' flag.  This is the inverse of `--text'.  On
2578      systems like GNU that do not distinguish between binary and text
2579      files, this option merely flags each input file as binary: the MD5
2580      checksum is unaffected.  This option is the default on systems
2581      like MS-DOS that distinguish between binary and text files, except
2582      for reading standard input when standard input is a terminal.
2583
2584 `-c'
2585 `--check'
2586      Read file names and checksum information (not data) from each FILE
2587      (or from stdin if no FILE was specified) and report whether the
2588      checksums match the contents of the named files.  The input to
2589      this mode of `md5sum' is usually the output of a prior,
2590      checksum-generating run of `md5sum'.  Each valid line of input
2591      consists of an MD5 checksum, a binary/text flag, and then a file
2592      name.  Binary files are marked with `*', text with ` '.  For each
2593      such line, `md5sum' reads the named file and computes its MD5
2594      checksum.  Then, if the computed message digest does not match the
2595      one on the line with the file name, the file is noted as having
2596      failed the test.  Otherwise, the file passes the test.  By
2597      default, for each valid line, one line is written to standard
2598      output indicating whether the named file passed the test.  After
2599      all checks have been performed, if there were any failures, a
2600      warning is issued to standard error.  Use the `--status' option to
2601      inhibit that output.  If any listed file cannot be opened or read,
2602      if any valid line has an MD5 checksum inconsistent with the
2603      associated file, or if no valid line is found, `md5sum' exits with
2604      nonzero status.  Otherwise, it exits successfully.
2605
2606 `--status'
2607      This option is useful only when verifying checksums.  When
2608      verifying checksums, don't generate the default one-line-per-file
2609      diagnostic and don't output the warning summarizing any failures.
2610      Failures to open or read a file still evoke individual diagnostics
2611      to standard error.  If all listed files are readable and are
2612      consistent with the associated MD5 checksums, exit successfully.
2613      Otherwise exit with a status code indicating there was a failure.
2614
2615 `-t'
2616 `--text'
2617      Treat each input file as text, by reading it in text mode and
2618      outputting a ` ' flag.  This is the inverse of `--binary'.  This
2619      option is the default on systems like GNU that do not distinguish
2620      between binary and text files.  On other systems, it is the
2621      default for reading standard input when standard input is a
2622      terminal.
2623
2624 `-w'
2625 `--warn'
2626      When verifying checksums, warn about improperly formatted MD5
2627      checksum lines.  This option is useful only if all but a few lines
2628      in the checked input are valid.
2629
2630
2631    An exit status of zero indicates success, and a nonzero value
2632 indicates failure.
2633
2634 \1f
2635 File: coreutils.info,  Node: sha1sum invocation,  Next: sha2 utilities,  Prev: md5sum invocation,  Up: Summarizing files
2636
2637 6.5 `sha1sum': Print or check SHA-1 digests
2638 ===========================================
2639
2640 `sha1sum' computes a 160-bit checksum for each specified FILE.  The
2641 usage and options of this command are precisely the same as for
2642 `md5sum'.  *Note md5sum invocation::.
2643
2644    Note: The SHA-1 digest is more secure than MD5, and no collisions of
2645 it are known (different files having the same fingerprint).  However,
2646 it is known that they can be produced with considerable, but not
2647 unreasonable, resources.  For this reason, it is generally considered
2648 that SHA-1 should be gradually phased out in favor of the more secure
2649 SHA-2 hash algorithms.  *Note sha2 utilities::.
2650
2651 \1f
2652 File: coreutils.info,  Node: sha2 utilities,  Prev: sha1sum invocation,  Up: Summarizing files
2653
2654 6.6 sha2 utilities: Print or check SHA-2 digests
2655 ================================================
2656
2657 The commands `sha224sum', `sha256sum', `sha384sum' and `sha512sum'
2658 compute checksums of various lengths (respectively 224, 256, 384 and
2659 512 bits), collectively known as the SHA-2 hashes.  The usage and
2660 options of these commands are precisely the same as for `md5sum'.
2661 *Note md5sum invocation::.
2662
2663    Note: The SHA384 and SHA512 digests are considerably slower to
2664 compute, especially on 32-bit computers, than SHA224 or SHA256.
2665
2666 \1f
2667 File: coreutils.info,  Node: Operating on sorted files,  Next: Operating on fields within a line,  Prev: Summarizing files,  Up: Top
2668
2669 7 Operating on sorted files
2670 ***************************
2671
2672 These commands work with (or produce) sorted files.
2673
2674 * Menu:
2675
2676 * sort invocation::             Sort text files.
2677 * shuf invocation::             Shuffle text files.
2678 * uniq invocation::             Uniquify files.
2679 * comm invocation::             Compare two sorted files line by line.
2680 * ptx invocation::              Produce a permuted index of file contents.
2681 * tsort invocation::            Topological sort.
2682 * tsort background::            Where tsort came from.
2683
2684 \1f
2685 File: coreutils.info,  Node: sort invocation,  Next: shuf invocation,  Up: Operating on sorted files
2686
2687 7.1 `sort': Sort text files
2688 ===========================
2689
2690 `sort' sorts, merges, or compares all the lines from the given files,
2691 or standard input if none are given or for a FILE of `-'.  By default,
2692 `sort' writes the results to standard output.  Synopsis:
2693
2694      sort [OPTION]... [FILE]...
2695
2696    `sort' has three modes of operation: sort (the default), merge, and
2697 check for sortedness.  The following options change the operation mode:
2698
2699 `-c'
2700 `--check'
2701 `--check=diagnose-first'
2702      Check whether the given file is already sorted: if it is not all
2703      sorted, print a diagnostic containing the first out-of-order line
2704      and exit with a status of 1.  Otherwise, exit successfully.  At
2705      most one input file can be given.
2706
2707 `-C'
2708 `--check=quiet'
2709 `--check=silent'
2710      Exit successfully if the given file is already sorted, and exit
2711      with status 1 otherwise.  At most one input file can be given.
2712      This is like `-c', except it does not print a diagnostic.
2713
2714 `-m'
2715 `--merge'
2716      Merge the given files by sorting them as a group.  Each input file
2717      must always be individually sorted.  It always works to sort
2718      instead of merge; merging is provided because it is faster, in the
2719      case where it works.
2720
2721
2722    A pair of lines is compared as follows: `sort' compares each pair of
2723 fields, in the order specified on the command line, according to the
2724 associated ordering options, until a difference is found or no fields
2725 are left.  If no key fields are specified, `sort' uses a default key of
2726 the entire line.  Finally, as a last resort when all keys compare
2727 equal, `sort' compares entire lines as if no ordering options other
2728 than `--reverse' (`-r') were specified.  The `--stable' (`-s') option
2729 disables this "last-resort comparison" so that lines in which all
2730 fields compare equal are left in their original relative order.  The
2731 `--unique' (`-u') option also disables the last-resort comparison.
2732
2733    Unless otherwise specified, all comparisons use the character
2734 collating sequence specified by the `LC_COLLATE' locale.(1)
2735
2736    GNU `sort' (as specified for all GNU utilities) has no limit on
2737 input line length or restrictions on bytes allowed within lines.  In
2738 addition, if the final byte of an input file is not a newline, GNU
2739 `sort' silently supplies one.  A line's trailing newline is not part of
2740 the line for comparison purposes.
2741
2742    Exit status:
2743
2744      0 if no error occurred
2745      1 if invoked with `-c' or `-C' and the input is not sorted
2746      2 if an error occurred
2747
2748    If the environment variable `TMPDIR' is set, `sort' uses its value
2749 as the directory for temporary files instead of `/tmp'.  The
2750 `--temporary-directory' (`-T') option in turn overrides the environment
2751 variable.
2752
2753    The following options affect the ordering of output lines.  They may
2754 be specified globally or as part of a specific key field.  If no key
2755 fields are specified, global options apply to comparison of entire
2756 lines; otherwise the global options are inherited by key fields that do
2757 not specify any special options of their own.  In pre-POSIX versions of
2758 `sort', global options affect only later key fields, so portable shell
2759 scripts should specify global options first.
2760
2761 `-b'
2762 `--ignore-leading-blanks'
2763      Ignore leading blanks when finding sort keys in each line.  By
2764      default a blank is a space or a tab, but the `LC_CTYPE' locale can
2765      change this.
2766
2767 `-d'
2768 `--dictionary-order'
2769      Sort in "phone directory" order: ignore all characters except
2770      letters, digits and blanks when sorting.  By default letters and
2771      digits are those of ASCII and a blank is a space or a tab, but the
2772      `LC_CTYPE' locale can change this.
2773
2774 `-f'
2775 `--ignore-case'
2776      Fold lowercase characters into the equivalent uppercase characters
2777      when comparing so that, for example, `b' and `B' sort as equal.
2778      The `LC_CTYPE' locale determines character types.
2779
2780 `-g'
2781 `--general-numeric-sort'
2782      Sort numerically, using the standard C function `strtod' to convert
2783      a prefix of each line to a double-precision floating point number.
2784      This allows floating point numbers to be specified in scientific
2785      notation, like `1.0e-34' and `10e100'.  The `LC_NUMERIC' locale
2786      determines the decimal-point character.  Do not report overflow,
2787      underflow, or conversion errors.  Use the following collating
2788      sequence:
2789
2790         * Lines that do not start with numbers (all considered to be
2791           equal).
2792
2793         * NaNs ("Not a Number" values, in IEEE floating point
2794           arithmetic) in a consistent but machine-dependent order.
2795
2796         * Minus infinity.
2797
2798         * Finite numbers in ascending numeric order (with -0 and +0
2799           equal).
2800
2801         * Plus infinity.
2802
2803      Use this option only if there is no alternative; it is much slower
2804      than `--numeric-sort' (`-n') and it can lose information when
2805      converting to floating point.
2806
2807 `-i'
2808 `--ignore-nonprinting'
2809      Ignore nonprinting characters.  The `LC_CTYPE' locale determines
2810      character types.  This option has no effect if the stronger
2811      `--dictionary-order' (`-d') option is also given.
2812
2813 `-M'
2814 `--month-sort'
2815      An initial string, consisting of any amount of blanks, followed by
2816      a month name abbreviation, is folded to UPPER case and compared in
2817      the order `JAN' < `FEB' < ... < `DEC'.  Invalid names compare low
2818      to valid names.  The `LC_TIME' locale category determines the
2819      month spellings.  By default a blank is a space or a tab, but the
2820      `LC_CTYPE' locale can change this.
2821
2822 `-n'
2823 `--numeric-sort'
2824      Sort numerically.  The number begins each line and consists of
2825      optional blanks, an optional `-' sign, and zero or more digits
2826      possibly separated by thousands separators, optionally followed by
2827      a decimal-point character and zero or more digits.  An empty
2828      number is treated as `0'.  The `LC_NUMERIC' locale specifies the
2829      decimal-point character and thousands separator.  By default a
2830      blank is a space or a tab, but the `LC_CTYPE' locale can change
2831      this.
2832
2833      Comparison is exact; there is no rounding error.
2834
2835      Neither a leading `+' nor exponential notation is recognized.  To
2836      compare such strings numerically, use the `--general-numeric-sort'
2837      (`-g') option.
2838
2839 `-r'
2840 `--reverse'
2841      Reverse the result of comparison, so that lines with greater key
2842      values appear earlier in the output instead of later.
2843
2844 `-R'
2845 `--random-sort'
2846      Sort by hashing the input keys and then sorting the hash values.
2847      Choose the hash function at random, ensuring that it is free of
2848      collisions so that differing keys have differing hash values.
2849      This is like a random permutation of the inputs (*note shuf
2850      invocation::), except that keys with the same value sort together.
2851
2852      If multiple random sort fields are specified, the same random hash
2853      function is used for all fields.  To use different random hash
2854      functions for different fields, you can invoke `sort' more than
2855      once.
2856
2857      The choice of hash function is affected by the `--random-source'
2858      option.
2859
2860
2861    Other options are:
2862
2863 `--compress-program=PROG'
2864      Compress any temporary files with the program PROG.
2865
2866      With no arguments, PROG must compress standard input to standard
2867      output, and when given the `-d' option it must decompress standard
2868      input to standard output.
2869
2870      Terminate with an error if PROG exits with nonzero status.
2871
2872      Whitespace and the backslash character should not appear in PROG;
2873      they are reserved for future use.
2874
2875 `-k POS1[,POS2]'
2876 `--key=POS1[,POS2]'
2877      Specify a sort field that consists of the part of the line between
2878      POS1 and POS2 (or the end of the line, if POS2 is omitted),
2879      _inclusive_.
2880
2881      Each POS has the form `F[.C][OPTS]', where F is the number of the
2882      field to use, and C is the number of the first character from the
2883      beginning of the field.  Fields and character positions are
2884      numbered starting with 1; a character position of zero in POS2
2885      indicates the field's last character.  If `.C' is omitted from
2886      POS1, it defaults to 1 (the beginning of the field); if omitted
2887      from POS2, it defaults to 0 (the end of the field).  OPTS are
2888      ordering options, allowing individual keys to be sorted according
2889      to different rules; see below for details.  Keys can span multiple
2890      fields.
2891
2892      Example:  To sort on the second field, use `--key=2,2' (`-k 2,2').
2893      See below for more examples.
2894
2895 `-o OUTPUT-FILE'
2896 `--output=OUTPUT-FILE'
2897      Write output to OUTPUT-FILE instead of standard output.  Normally,
2898      `sort' reads all input before opening OUTPUT-FILE, so you can
2899      safely sort a file in place by using commands like `sort -o F F'
2900      and `cat F | sort -o F'.  However, `sort' with `--merge' (`-m')
2901      can open the output file before reading all input, so a command
2902      like `cat F | sort -m -o F - G' is not safe as `sort' might start
2903      writing `F' before `cat' is done reading it.
2904
2905      On newer systems, `-o' cannot appear after an input file if
2906      `POSIXLY_CORRECT' is set, e.g., `sort F -o F'.  Portable scripts
2907      should specify `-o OUTPUT-FILE' before any input files.
2908
2909 `--random-source=FILE'
2910      Use FILE as a source of random data used to determine which random
2911      hash function to use with the `-R' option.  *Note Random sources::.
2912
2913 `-s'
2914 `--stable'
2915      Make `sort' stable by disabling its last-resort comparison.  This
2916      option has no effect if no fields or global ordering options other
2917      than `--reverse' (`-r') are specified.
2918
2919 `-S SIZE'
2920 `--buffer-size=SIZE'
2921      Use a main-memory sort buffer of the given SIZE.  By default, SIZE
2922      is in units of 1024 bytes.  Appending `%' causes SIZE to be
2923      interpreted as a percentage of physical memory.  Appending `K'
2924      multiplies SIZE by 1024 (the default), `M' by 1,048,576, `G' by
2925      1,073,741,824, and so on for `T', `P', `E', `Z', and `Y'.
2926      Appending `b' causes SIZE to be interpreted as a byte count, with
2927      no multiplication.
2928
2929      This option can improve the performance of `sort' by causing it to
2930      start with a larger or smaller sort buffer than the default.
2931      However, this option affects only the initial buffer size.  The
2932      buffer grows beyond SIZE if `sort' encounters input lines larger
2933      than SIZE.
2934
2935 `-t SEPARATOR'
2936 `--field-separator=SEPARATOR'
2937      Use character SEPARATOR as the field separator when finding the
2938      sort keys in each line.  By default, fields are separated by the
2939      empty string between a non-blank character and a blank character.
2940      By default a blank is a space or a tab, but the `LC_CTYPE' locale
2941      can change this.
2942
2943      That is, given the input line ` foo bar', `sort' breaks it into
2944      fields ` foo' and ` bar'.  The field separator is not considered
2945      to be part of either the field preceding or the field following,
2946      so with `sort -t " "' the same input line has three fields: an
2947      empty field, `foo', and `bar'.  However, fields that extend to the
2948      end of the line, as `-k 2', or fields consisting of a range, as
2949      `-k 2,3', retain the field separators present between the
2950      endpoints of the range.
2951
2952      To specify a null character (ASCII NUL) as the field separator,
2953      use the two-character string `\0', e.g., `sort -t '\0''.
2954
2955 `-T TEMPDIR'
2956 `--temporary-directory=TEMPDIR'
2957      Use directory TEMPDIR to store temporary files, overriding the
2958      `TMPDIR' environment variable.  If this option is given more than
2959      once, temporary files are stored in all the directories given.  If
2960      you have a large sort or merge that is I/O-bound, you can often
2961      improve performance by using this option to specify directories on
2962      different disks and controllers.
2963
2964 `-u'
2965 `--unique'
2966      Normally, output only the first of a sequence of lines that compare
2967      equal.  For the `--check' (`-c' or `-C') option, check that no
2968      pair of consecutive lines compares equal.
2969
2970      This option also disables the default last-resort comparison.
2971
2972      The commands `sort -u' and `sort | uniq' are equivalent, but this
2973      equivalence does not extend to arbitrary `sort' options.  For
2974      example, `sort -n -u' inspects only the value of the initial
2975      numeric string when checking for uniqueness, whereas `sort -n |
2976      uniq' inspects the entire line.  *Note uniq invocation::.
2977
2978 `-z'
2979 `--zero-terminated'
2980      Treat the input as a set of lines, each terminated by a null
2981      character (ASCII NUL) instead of a line feed (ASCII LF).  This
2982      option can be useful in conjunction with `perl -0' or `find
2983      -print0' and `xargs -0' which do the same in order to reliably
2984      handle arbitrary file names (even those containing blanks or other
2985      special characters).
2986
2987
2988    Historical (BSD and System V) implementations of `sort' have
2989 differed in their interpretation of some options, particularly `-b',
2990 `-f', and `-n'.  GNU sort follows the POSIX behavior, which is usually
2991 (but not always!) like the System V behavior.  According to POSIX, `-n'
2992 no longer implies `-b'.  For consistency, `-M' has been changed in the
2993 same way.  This may affect the meaning of character positions in field
2994 specifications in obscure cases.  The only fix is to add an explicit
2995 `-b'.
2996
2997    A position in a sort field specified with `-k' may have any of the
2998 option letters `Mbdfinr' appended to it, in which case the global
2999 ordering options are not used for that particular field.  The `-b'
3000 option may be independently attached to either or both of the start and
3001 end positions of a field specification, and if it is inherited from the
3002 global options it will be attached to both.  If input lines can contain
3003 leading or adjacent blanks and `-t' is not used, then `-k' is typically
3004 combined with `-b', `-g', `-M', or `-n'; otherwise the varying numbers
3005 of leading blanks in fields can cause confusing results.
3006
3007    If the start position in a sort field specifier falls after the end
3008 of the line or after the end field, the field is empty.  If the `-b'
3009 option was specified, the `.C' part of a field specification is counted
3010 from the first nonblank character of the field.
3011
3012    On older systems, `sort' supports an obsolete origin-zero syntax
3013 `+POS1 [-POS2]' for specifying sort keys.  This obsolete behavior can
3014 be enabled or disabled with the `_POSIX2_VERSION' environment variable
3015 (*note Standards conformance::); it can also be enabled when
3016 `POSIXLY_CORRECT' is not set by using the obsolete syntax with `-POS2'
3017 present.
3018
3019    Scripts intended for use on standard hosts should avoid obsolete
3020 syntax and should use `-k' instead.  For example, avoid `sort +2',
3021 since it might be interpreted as either `sort ./+2' or `sort -k 3'.  If
3022 your script must also run on hosts that support only the obsolete
3023 syntax, it can use a test like `if sort -k 1 </dev/null >/dev/null
3024 2>&1; then ...' to decide which syntax to use.
3025
3026    Here are some examples to illustrate various combinations of options.
3027
3028    * Sort in descending (reverse) numeric order.
3029
3030           sort -n -r
3031
3032    * Sort alphabetically, omitting the first and second fields and the
3033      blanks at the start of the third field.  This uses a single key
3034      composed of the characters beginning at the start of the first
3035      nonblank character in field three and extending to the end of each
3036      line.
3037
3038           sort -k 3b
3039
3040    * Sort numerically on the second field and resolve ties by sorting
3041      alphabetically on the third and fourth characters of field five.
3042      Use `:' as the field delimiter.
3043
3044           sort -t : -k 2,2n -k 5.3,5.4
3045
3046      Note that if you had written `-k 2n' instead of `-k 2,2n' `sort'
3047      would have used all characters beginning in the second field and
3048      extending to the end of the line as the primary _numeric_ key.
3049      For the large majority of applications, treating keys spanning
3050      more than one field as numeric will not do what you expect.
3051
3052      Also note that the `n' modifier was applied to the field-end
3053      specifier for the first key.  It would have been equivalent to
3054      specify `-k 2n,2' or `-k 2n,2n'.  All modifiers except `b' apply
3055      to the associated _field_, regardless of whether the modifier
3056      character is attached to the field-start and/or the field-end part
3057      of the key specifier.
3058
3059    * Sort the password file on the fifth field and ignore any leading
3060      blanks.  Sort lines with equal values in field five on the numeric
3061      user ID in field three.  Fields are separated by `:'.
3062
3063           sort -t : -k 5b,5 -k 3,3n /etc/passwd
3064           sort -t : -n -k 5b,5 -k 3,3 /etc/passwd
3065           sort -t : -b -k 5,5 -k 3,3n /etc/passwd
3066
3067      These three commands have equivalent effect.  The first specifies
3068      that the first key's start position ignores leading blanks and the
3069      second key is sorted numerically.  The other two commands rely on
3070      global options being inherited by sort keys that lack modifiers.
3071      The inheritance works in this case because `-k 5b,5b' and `-k
3072      5b,5' are equivalent, as the location of a field-end lacking a `.C'
3073      character position is not affected by whether initial blanks are
3074      skipped.
3075
3076    * Sort a set of log files, primarily by IPv4 address and secondarily
3077      by time stamp.  If two lines' primary and secondary keys are
3078      identical, output the lines in the same order that they were
3079      input.  The log files contain lines that look like this:
3080
3081           4.150.156.3 - - [01/Apr/2004:06:31:51 +0000] message 1
3082           211.24.3.231 - - [24/Apr/2004:20:17:39 +0000] message 2
3083
3084      Fields are separated by exactly one space.  Sort IPv4 addresses
3085      lexicographically, e.g., 212.61.52.2 sorts before 212.129.233.201
3086      because 61 is less than 129.
3087
3088           sort -s -t ' ' -k 4.9n -k 4.5M -k 4.2n -k 4.14,4.21 file*.log |
3089           sort -s -t '.' -k 1,1n -k 2,2n -k 3,3n -k 4,4n
3090
3091      This example cannot be done with a single `sort' invocation, since
3092      IPv4 address components are separated by `.' while dates come just
3093      after a space.  So it is broken down into two invocations of
3094      `sort': the first sorts by time stamp and the second by IPv4
3095      address.  The time stamp is sorted by year, then month, then day,
3096      and finally by hour-minute-second field, using `-k' to isolate each
3097      field.  Except for hour-minute-second there's no need to specify
3098      the end of each key field, since the `n' and `M' modifiers sort
3099      based on leading prefixes that cannot cross field boundaries.  The
3100      IPv4 addresses are sorted lexicographically.  The second sort uses
3101      `-s' so that ties in the primary key are broken by the secondary
3102      key; the first sort uses `-s' so that the combination of the two
3103      sorts is stable.
3104
3105    * Generate a tags file in case-insensitive sorted order.
3106
3107           find src -type f -print0 | sort -z -f | xargs -0 etags --append
3108
3109      The use of `-print0', `-z', and `-0' in this case means that file
3110      names that contain blanks or other special characters are not
3111      broken up by the sort operation.
3112
3113    * Shuffle a list of directories, but preserve the order of files
3114      within each directory.  For instance, one could use this to
3115      generate a music playlist in which albums are shuffled but the
3116      songs of each album are played in order.
3117
3118           ls */* | sort -t / -k 1,1R -k 2,2
3119
3120
3121    ---------- Footnotes ----------
3122
3123    (1) If you use a non-POSIX locale (e.g., by setting `LC_ALL' to
3124 `en_US'), then `sort' may produce output that is sorted differently
3125 than you're accustomed to.  In that case, set the `LC_ALL' environment
3126 variable to `C'.  Note that setting only `LC_COLLATE' has two problems.
3127 First, it is ineffective if `LC_ALL' is also set.  Second, it has
3128 undefined behavior if `LC_CTYPE' (or `LANG', if `LC_CTYPE' is unset) is
3129 set to an incompatible value.  For example, you get undefined behavior
3130 if `LC_CTYPE' is `ja_JP.PCK' but `LC_COLLATE' is `en_US.UTF-8'.
3131
3132 \1f
3133 File: coreutils.info,  Node: shuf invocation,  Next: uniq invocation,  Prev: sort invocation,  Up: Operating on sorted files
3134
3135 7.2 `shuf': Shuffling text
3136 ==========================
3137
3138 `shuf' shuffles its input by outputting a random permutation of its
3139 input lines.  Each output permutation is equally likely.  Synopses:
3140
3141      shuf [OPTION]... [FILE]
3142      shuf -e [OPTION]... [ARG]...
3143      shuf -i LO-HI [OPTION]...
3144
3145    `shuf' has three modes of operation that affect where it obtains its
3146 input lines.  By default, it reads lines from standard input.  The
3147 following options change the operation mode:
3148
3149 `-e'
3150 `--echo'
3151      Treat each command-line operand as an input line.
3152
3153 `-i LO-HI'
3154 `--input-range=LO-HI'
3155      Act as if input came from a file containing the range of unsigned
3156      decimal integers LO...HI, one per line.
3157
3158
3159    `shuf''s other options can affect its behavior in all operation
3160 modes:
3161
3162 `-n LINES'
3163 `--head-lines=LINES'
3164      Output at most LINES lines.  By default, all input lines are
3165      output.
3166
3167 `-o OUTPUT-FILE'
3168 `--output=OUTPUT-FILE'
3169      Write output to OUTPUT-FILE instead of standard output.  `shuf'
3170      reads all input before opening OUTPUT-FILE, so you can safely
3171      shuffle a file in place by using commands like `shuf -o F <F' and
3172      `cat F | shuf -o F'.
3173
3174 `--random-source=FILE'
3175      Use FILE as a source of random data used to determine which
3176      permutation to generate.  *Note Random sources::.
3177
3178 `-z'
3179 `--zero-terminated'
3180      Treat the input and output as a set of lines, each terminated by a
3181      zero byte (ASCII NUL (Null) character) instead of an ASCII LF
3182      (Line Feed).  This option can be useful in conjunction with `perl
3183      -0' or `find -print0' and `xargs -0' which do the same in order to
3184      reliably handle arbitrary file names (even those containing blanks
3185      or other special characters).
3186
3187
3188    For example:
3189
3190      shuf <<EOF
3191      A man,
3192      a plan,
3193      a canal:
3194      Panama!
3195      EOF
3196
3197 might produce the output
3198
3199      Panama!
3200      A man,
3201      a canal:
3202      a plan,
3203
3204 Similarly, the command:
3205
3206      shuf -e clubs hearts diamonds spades
3207
3208 might output:
3209
3210      clubs
3211      diamonds
3212      spades
3213      hearts
3214
3215 and the command `shuf -i 1-4' might output:
3216
3217      4
3218      2
3219      1
3220      3
3221
3222 These examples all have four input lines, so `shuf' might produce any
3223 of the twenty-four possible permutations of the input.  In general, if
3224 there are N input lines, there are N! (i.e., N factorial, or N * (N -
3225 1) * ... * 1) possible output permutations.
3226
3227    An exit status of zero indicates success, and a nonzero value
3228 indicates failure.
3229
3230 \1f
3231 File: coreutils.info,  Node: uniq invocation,  Next: comm invocation,  Prev: shuf invocation,  Up: Operating on sorted files
3232
3233 7.3 `uniq': Uniquify files
3234 ==========================
3235
3236 `uniq' writes the unique lines in the given `input', or standard input
3237 if nothing is given or for an INPUT name of `-'.  Synopsis:
3238
3239      uniq [OPTION]... [INPUT [OUTPUT]]
3240
3241    By default, `uniq' prints its input lines, except that it discards
3242 all but the first of adjacent repeated lines, so that no output lines
3243 are repeated.  Optionally, it can instead discard lines that are not
3244 repeated, or all repeated lines.
3245
3246    The input need not be sorted, but repeated input lines are detected
3247 only if they are adjacent.  If you want to discard non-adjacent
3248 duplicate lines, perhaps you want to use `sort -u'.  *Note sort
3249 invocation::.
3250
3251    Comparisons use the character collating sequence specified by the
3252 `LC_COLLATE' locale category.
3253
3254    If no OUTPUT file is specified, `uniq' writes to standard output.
3255
3256    The program accepts the following options.  Also see *Note Common
3257 options::.
3258
3259 `-f N'
3260 `--skip-fields=N'
3261      Skip N fields on each line before checking for uniqueness.  Use a
3262      null string for comparison if a line has fewer than N fields.
3263      Fields are sequences of non-space non-tab characters that are
3264      separated from each other by at least one space or tab.
3265
3266      For compatibility `uniq' supports an obsolete option syntax `-N'.
3267      New scripts should use `-f N' instead.
3268
3269 `-s N'
3270 `--skip-chars=N'
3271      Skip N characters before checking for uniqueness.  Use a null
3272      string for comparison if a line has fewer than N characters.  If
3273      you use both the field and character skipping options, fields are
3274      skipped over first.
3275
3276      On older systems, `uniq' supports an obsolete option syntax `+N'.
3277      This obsolete behavior can be enabled or disabled with the
3278      `_POSIX2_VERSION' environment variable (*note Standards
3279      conformance::), but portable scripts should avoid commands whose
3280      behavior depends on this variable.  For example, use `uniq ./+10'
3281      or `uniq -s 10' rather than the ambiguous `uniq +10'.
3282
3283 `-c'
3284 `--count'
3285      Print the number of times each line occurred along with the line.
3286
3287 `-i'
3288 `--ignore-case'
3289      Ignore differences in case when comparing lines.
3290
3291 `-d'
3292 `--repeated'
3293      Discard lines that are not repeated.  When used by itself, this
3294      option causes `uniq' to print the first copy of each repeated line,
3295      and nothing else.
3296
3297 `-D'
3298 `--all-repeated[=DELIMIT-METHOD]'
3299      Do not discard the second and subsequent repeated input lines, but
3300      discard lines that are not repeated.  This option is useful mainly
3301      in conjunction with other options e.g., to ignore case or to
3302      compare only selected fields.  The optional DELIMIT-METHOD tells
3303      how to delimit groups of repeated lines, and must be one of the
3304      following:
3305
3306     `none'
3307           Do not delimit groups of repeated lines.  This is equivalent
3308           to `--all-repeated' (`-D').
3309
3310     `prepend'
3311           Output a newline before each group of repeated lines.
3312
3313     `separate'
3314           Separate groups of repeated lines with a single newline.
3315           This is the same as using `prepend', except that there is no
3316           newline before the first group, and hence may be better
3317           suited for output direct to users.
3318
3319      Note that when groups are delimited and the input stream contains
3320      two or more consecutive blank lines, then the output is ambiguous.
3321      To avoid that, filter the input through `tr -s '\n'' to replace
3322      each sequence of consecutive newlines with a single newline.
3323
3324      This is a GNU extension.
3325
3326 `-u'
3327 `--unique'
3328      Discard the first repeated line.  When used by itself, this option
3329      causes `uniq' to print unique lines, and nothing else.
3330
3331 `-w N'
3332 `--check-chars=N'
3333      Compare at most N characters on each line (after skipping any
3334      specified fields and characters).  By default the entire rest of
3335      the lines are compared.
3336
3337
3338    An exit status of zero indicates success, and a nonzero value
3339 indicates failure.
3340
3341 \1f
3342 File: coreutils.info,  Node: comm invocation,  Next: ptx invocation,  Prev: uniq invocation,  Up: Operating on sorted files
3343
3344 7.4 `comm': Compare two sorted files line by line
3345 =================================================
3346
3347 `comm' writes to standard output lines that are common, and lines that
3348 are unique, to two input files; a file name of `-' means standard
3349 input.  Synopsis:
3350
3351      comm [OPTION]... FILE1 FILE2
3352
3353    Before `comm' can be used, the input files must be sorted using the
3354 collating sequence specified by the `LC_COLLATE' locale.  If an input
3355 file ends in a non-newline character, a newline is silently appended.
3356 The `sort' command with no options always outputs a file that is
3357 suitable input to `comm'.
3358
3359    With no options, `comm' produces three-column output.  Column one
3360 contains lines unique to FILE1, column two contains lines unique to
3361 FILE2, and column three contains lines common to both files.  Columns
3362 are separated by a single TAB character.
3363
3364    The options `-1', `-2', and `-3' suppress printing of the
3365 corresponding columns.  Also see *Note Common options::.
3366
3367    Unlike some other comparison utilities, `comm' has an exit status
3368 that does not depend on the result of the comparison.  Upon normal
3369 completion `comm' produces an exit code of zero.  If there is an error
3370 it exits with nonzero status.
3371
3372 \1f
3373 File: coreutils.info,  Node: tsort invocation,  Next: tsort background,  Prev: ptx invocation,  Up: Operating on sorted files
3374
3375 7.5 `tsort': Topological sort
3376 =============================
3377
3378 `tsort' performs a topological sort on the given FILE, or standard
3379 input if no input file is given or for a FILE of `-'.  For more details
3380 and some history, see *Note tsort background::.  Synopsis:
3381
3382      tsort [OPTION] [FILE]
3383
3384    `tsort' reads its input as pairs of strings, separated by blanks,
3385 indicating a partial ordering.  The output is a total ordering that
3386 corresponds to the given partial ordering.
3387
3388    For example
3389
3390      tsort <<EOF
3391      a b c
3392      d
3393      e f
3394      b c d e
3395      EOF
3396
3397 will produce the output
3398
3399      a
3400      b
3401      c
3402      d
3403      e
3404      f
3405
3406    Consider a more realistic example.  You have a large set of
3407 functions all in one file, and they may all be declared static except
3408 one.  Currently that one (say `main') is the first function defined in
3409 the file, and the ones it calls directly follow it, followed by those
3410 they call, etc.  Let's say that you are determined to take advantage of
3411 prototypes, so you have to choose between declaring all of those
3412 functions (which means duplicating a lot of information from the
3413 definitions) and rearranging the functions so that as many as possible
3414 are defined before they are used.  One way to automate the latter
3415 process is to get a list for each function of the functions it calls
3416 directly.  Many programs can generate such lists.  They describe a call
3417 graph.  Consider the following list, in which a given line indicates
3418 that the function on the left calls the one on the right directly.
3419
3420      main parse_options
3421      main tail_file
3422      main tail_forever
3423      tail_file pretty_name
3424      tail_file write_header
3425      tail_file tail
3426      tail_forever recheck
3427      tail_forever pretty_name
3428      tail_forever write_header
3429      tail_forever dump_remainder
3430      tail tail_lines
3431      tail tail_bytes
3432      tail_lines start_lines
3433      tail_lines dump_remainder
3434      tail_lines file_lines
3435      tail_lines pipe_lines
3436      tail_bytes xlseek
3437      tail_bytes start_bytes
3438      tail_bytes dump_remainder
3439      tail_bytes pipe_bytes
3440      file_lines dump_remainder
3441      recheck pretty_name
3442
3443    then you can use `tsort' to produce an ordering of those functions
3444 that satisfies your requirement.
3445
3446      example$ tsort call-graph | tac
3447      dump_remainder
3448      start_lines
3449      file_lines
3450      pipe_lines
3451      xlseek
3452      start_bytes
3453      pipe_bytes
3454      tail_lines
3455      tail_bytes
3456      pretty_name
3457      write_header
3458      tail
3459      recheck
3460      parse_options
3461      tail_file
3462      tail_forever
3463      main
3464
3465    `tsort' detects any cycles in the input and writes the first cycle
3466 encountered to standard error.
3467
3468    Note that for a given partial ordering, generally there is no unique
3469 total ordering.  In the context of the call graph above, the function
3470 `parse_options' may be placed anywhere in the list as long as it
3471 precedes `main'.
3472
3473    The only options are `--help' and `--version'.  *Note Common
3474 options::.
3475
3476 \1f
3477 File: coreutils.info,  Node: tsort background,  Prev: tsort invocation,  Up: Operating on sorted files
3478
3479 7.6 `tsort': Background
3480 =======================
3481
3482 `tsort' exists because very early versions of the Unix linker processed
3483 an archive file exactly once, and in order.  As `ld' read each object
3484 in the archive, it decided whether it was needed in the program based on
3485 whether it defined any symbols which were undefined at that point in
3486 the link.
3487
3488    This meant that dependencies within the archive had to be handled
3489 specially.  For example, `scanf' probably calls `read'.  That means
3490 that in a single pass through an archive, it was important for `scanf.o'
3491 to appear before read.o, because otherwise a program which calls
3492 `scanf' but not `read' might end up with an unexpected unresolved
3493 reference to `read'.
3494
3495    The way to address this problem was to first generate a set of
3496 dependencies of one object file on another.  This was done by a shell
3497 script called `lorder'.  The GNU tools don't provide a version of
3498 lorder, as far as I know, but you can still find it in BSD
3499 distributions.
3500
3501    Then you ran `tsort' over the `lorder' output, and you used the
3502 resulting sort to define the order in which you added objects to the
3503 archive.
3504
3505    This whole procedure has been obsolete since about 1980, because
3506 Unix archives now contain a symbol table (traditionally built by
3507 `ranlib', now generally built by `ar' itself), and the Unix linker uses
3508 the symbol table to effectively make multiple passes over an archive
3509 file.
3510
3511    Anyhow, that's where tsort came from.  To solve an old problem with
3512 the way the linker handled archive files, which has since been solved
3513 in different ways.
3514
3515    An exit status of zero indicates success, and a nonzero value
3516 indicates failure.
3517
3518 \1f
3519 File: coreutils.info,  Node: ptx invocation,  Next: tsort invocation,  Prev: comm invocation,  Up: Operating on sorted files
3520
3521 7.7 `ptx': Produce permuted indexes
3522 ===================================
3523
3524 `ptx' reads a text file and essentially produces a permuted index, with
3525 each keyword in its context.  The calling sketch is either one of:
3526
3527      ptx [OPTION ...] [FILE ...]
3528      ptx -G [OPTION ...] [INPUT [OUTPUT]]
3529
3530    The `-G' (or its equivalent: `--traditional') option disables all
3531 GNU extensions and reverts to traditional mode, thus introducing some
3532 limitations and changing several of the program's default option values.
3533 When `-G' is not specified, GNU extensions are always enabled.  GNU
3534 extensions to `ptx' are documented wherever appropriate in this
3535 document.  For the full list, see *Note Compatibility in ptx::.
3536
3537    Individual options are explained in the following sections.
3538
3539    When GNU extensions are enabled, there may be zero, one or several
3540 FILEs after the options.  If there is no FILE, the program reads the
3541 standard input.  If there is one or several FILEs, they give the name
3542 of input files which are all read in turn, as if all the input files
3543 were concatenated.  However, there is a full contextual break between
3544 each file and, when automatic referencing is requested, file names and
3545 line numbers refer to individual text input files.  In all cases, the
3546 program outputs the permuted index to the standard output.
3547
3548    When GNU extensions are _not_ enabled, that is, when the program
3549 operates in traditional mode, there may be zero, one or two parameters
3550 besides the options.  If there are no parameters, the program reads the
3551 standard input and outputs the permuted index to the standard output.
3552 If there is only one parameter, it names the text INPUT to be read
3553 instead of the standard input.  If two parameters are given, they give
3554 respectively the name of the INPUT file to read and the name of the
3555 OUTPUT file to produce.  _Be very careful_ to note that, in this case,
3556 the contents of file given by the second parameter is destroyed.  This
3557 behavior is dictated by System V `ptx' compatibility; GNU Standards
3558 normally discourage output parameters not introduced by an option.
3559
3560    Note that for _any_ file named as the value of an option or as an
3561 input text file, a single dash `-' may be used, in which case standard
3562 input is assumed.  However, it would not make sense to use this
3563 convention more than once per program invocation.
3564
3565 * Menu:
3566
3567 * General options in ptx::      Options which affect general program behavior.
3568 * Charset selection in ptx::    Underlying character set considerations.
3569 * Input processing in ptx::     Input fields, contexts, and keyword selection.
3570 * Output formatting in ptx::    Types of output format, and sizing the fields.
3571 * Compatibility in ptx::
3572
3573 \1f
3574 File: coreutils.info,  Node: General options in ptx,  Next: Charset selection in ptx,  Up: ptx invocation
3575
3576 7.7.1 General options
3577 ---------------------
3578
3579 `-G'
3580 `--traditional'
3581      As already explained, this option disables all GNU extensions to
3582      `ptx' and switches to traditional mode.
3583
3584 `--help'
3585      Print a short help on standard output, then exit without further
3586      processing.
3587
3588 `--version'
3589      Print the program version on standard output, then exit without
3590      further processing.
3591
3592
3593    An exit status of zero indicates success, and a nonzero value
3594 indicates failure.
3595
3596 \1f
3597 File: coreutils.info,  Node: Charset selection in ptx,  Next: Input processing in ptx,  Prev: General options in ptx,  Up: ptx invocation
3598
3599 7.7.2 Charset selection
3600 -----------------------
3601
3602 As it is set up now, the program assumes that the input file is coded
3603 using 8-bit ISO 8859-1 code, also known as Latin-1 character set,
3604 _unless_ it is compiled for MS-DOS, in which case it uses the character
3605 set of the IBM-PC.  (GNU `ptx' is not known to work on smaller MS-DOS
3606 machines anymore.)  Compared to 7-bit ASCII, the set of characters
3607 which are letters is different; this alters the behavior of regular
3608 expression matching.  Thus, the default regular expression for a
3609 keyword allows foreign or diacriticized letters.  Keyword sorting,
3610 however, is still crude; it obeys the underlying character set ordering
3611 quite blindly.
3612
3613 `-f'
3614 `--ignore-case'
3615      Fold lower case letters to upper case for sorting.
3616
3617
3618 \1f
3619 File: coreutils.info,  Node: Input processing in ptx,  Next: Output formatting in ptx,  Prev: Charset selection in ptx,  Up: ptx invocation
3620
3621 7.7.3 Word selection and input processing
3622 -----------------------------------------
3623
3624 `-b FILE'
3625 `--break-file=FILE'
3626      This option provides an alternative (to `-W') method of describing
3627      which characters make up words.  It introduces the name of a file
3628      which contains a list of characters which can_not_ be part of one
3629      word; this file is called the "Break file".  Any character which
3630      is not part of the Break file is a word constituent.  If both
3631      options `-b' and `-W' are specified, then `-W' has precedence and
3632      `-b' is ignored.
3633
3634      When GNU extensions are enabled, the only way to avoid newline as a
3635      break character is to write all the break characters in the file
3636      with no newline at all, not even at the end of the file.  When GNU
3637      extensions are disabled, spaces, tabs and newlines are always
3638      considered as break characters even if not included in the Break
3639      file.
3640
3641 `-i FILE'
3642 `--ignore-file=FILE'
3643      The file associated with this option contains a list of words
3644      which will never be taken as keywords in concordance output.  It
3645      is called the "Ignore file".  The file contains exactly one word
3646      in each line; the end of line separation of words is not subject
3647      to the value of the `-S' option.
3648
3649 `-o FILE'
3650 `--only-file=FILE'
3651      The file associated with this option contains a list of words
3652      which will be retained in concordance output; any word not
3653      mentioned in this file is ignored.  The file is called the "Only
3654      file".  The file contains exactly one word in each line; the end
3655      of line separation of words is not subject to the value of the
3656      `-S' option.
3657
3658      There is no default for the Only file.  When both an Only file and
3659      an Ignore file are specified, a word is considered a keyword only
3660      if it is listed in the Only file and not in the Ignore file.
3661
3662 `-r'
3663 `--references'
3664      On each input line, the leading sequence of non-white space
3665      characters will be taken to be a reference that has the purpose of
3666      identifying this input line in the resulting permuted index.  For
3667      more information about reference production, see *Note Output
3668      formatting in ptx::.  Using this option changes the default value
3669      for option `-S'.
3670
3671      Using this option, the program does not try very hard to remove
3672      references from contexts in output, but it succeeds in doing so
3673      _when_ the context ends exactly at the newline.  If option `-r' is
3674      used with `-S' default value, or when GNU extensions are disabled,
3675      this condition is always met and references are completely
3676      excluded from the output contexts.
3677
3678 `-S REGEXP'
3679 `--sentence-regexp=REGEXP'
3680      This option selects which regular expression will describe the end
3681      of a line or the end of a sentence.  In fact, this regular
3682      expression is not the only distinction between end of lines or end
3683      of sentences, and input line boundaries have no special
3684      significance outside this option.  By default, when GNU extensions
3685      are enabled and if `-r' option is not used, end of sentences are
3686      used.  In this case, this REGEX is imported from GNU Emacs:
3687
3688           [.?!][]\"')}]*\\($\\|\t\\|  \\)[ \t\n]*
3689
3690      Whenever GNU extensions are disabled or if `-r' option is used, end
3691      of lines are used; in this case, the default REGEXP is just:
3692
3693           \n
3694
3695      Using an empty REGEXP is equivalent to completely disabling end of
3696      line or end of sentence recognition.  In this case, the whole file
3697      is considered to be a single big line or sentence.  The user might
3698      want to disallow all truncation flag generation as well, through
3699      option `-F ""'.  *Note Syntax of Regular Expressions:
3700      (emacs)Regexps.
3701
3702      When the keywords happen to be near the beginning of the input
3703      line or sentence, this often creates an unused area at the
3704      beginning of the output context line; when the keywords happen to
3705      be near the end of the input line or sentence, this often creates
3706      an unused area at the end of the output context line.  The program
3707      tries to fill those unused areas by wrapping around context in
3708      them; the tail of the input line or sentence is used to fill the
3709      unused area on the left of the output line; the head of the input
3710      line or sentence is used to fill the unused area on the right of
3711      the output line.
3712
3713      As a matter of convenience to the user, many usual backslashed
3714      escape sequences from the C language are recognized and converted
3715      to the corresponding characters by `ptx' itself.
3716
3717 `-W REGEXP'
3718 `--word-regexp=REGEXP'
3719      This option selects which regular expression will describe each
3720      keyword.  By default, if GNU extensions are enabled, a word is a
3721      sequence of letters; the REGEXP used is `\w+'.  When GNU
3722      extensions are disabled, a word is by default anything which ends
3723      with a space, a tab or a newline; the REGEXP used is `[^ \t\n]+'.
3724
3725      An empty REGEXP is equivalent to not using this option.  *Note
3726      Syntax of Regular Expressions: (emacs)Regexps.
3727
3728      As a matter of convenience to the user, many usual backslashed
3729      escape sequences, as found in the C language, are recognized and
3730      converted to the corresponding characters by `ptx' itself.
3731
3732
3733 \1f
3734 File: coreutils.info,  Node: Output formatting in ptx,  Next: Compatibility in ptx,  Prev: Input processing in ptx,  Up: ptx invocation
3735
3736 7.7.4 Output formatting
3737 -----------------------
3738
3739 Output format is mainly controlled by the `-O' and `-T' options
3740 described in the table below.  When neither `-O' nor `-T' are selected,
3741 and if GNU extensions are enabled, the program chooses an output format
3742 suitable for a dumb terminal.  Each keyword occurrence is output to the
3743 center of one line, surrounded by its left and right contexts.  Each
3744 field is properly justified, so the concordance output can be readily
3745 observed.  As a special feature, if automatic references are selected
3746 by option `-A' and are output before the left context, that is, if
3747 option `-R' is _not_ selected, then a colon is added after the
3748 reference; this nicely interfaces with GNU Emacs `next-error'
3749 processing.  In this default output format, each white space character,
3750 like newline and tab, is merely changed to exactly one space, with no
3751 special attempt to compress consecutive spaces.  This might change in
3752 the future.  Except for those white space characters, every other
3753 character of the underlying set of 256 characters is transmitted
3754 verbatim.
3755
3756    Output format is further controlled by the following options.
3757
3758 `-g NUMBER'
3759 `--gap-size=NUMBER'
3760      Select the size of the minimum white space gap between the fields
3761      on the output line.
3762
3763 `-w NUMBER'
3764 `--width=NUMBER'
3765      Select the maximum output width of each final line.  If references
3766      are used, they are included or excluded from the maximum output
3767      width depending on the value of option `-R'.  If this option is not
3768      selected, that is, when references are output before the left
3769      context, the maximum output width takes into account the maximum
3770      length of all references.  If this option is selected, that is,
3771      when references are output after the right context, the maximum
3772      output width does not take into account the space taken by
3773      references, nor the gap that precedes them.
3774
3775 `-A'
3776 `--auto-reference'
3777      Select automatic references.  Each input line will have an
3778      automatic reference made up of the file name and the line ordinal,
3779      with a single colon between them.  However, the file name will be
3780      empty when standard input is being read.  If both `-A' and `-r'
3781      are selected, then the input reference is still read and skipped,
3782      but the automatic reference is used at output time, overriding the
3783      input reference.
3784
3785 `-R'
3786 `--right-side-refs'
3787      In the default output format, when option `-R' is not used, any
3788      references produced by the effect of options `-r' or `-A' are
3789      placed to the far right of output lines, after the right context.
3790      With default output format, when the `-R' option is specified,
3791      references are rather placed at the beginning of each output line,
3792      before the left context.  For any other output format, option `-R'
3793      is ignored, with one exception:  with `-R' the width of references
3794      is _not_ taken into account in total output width given by `-w'.
3795
3796      This option is automatically selected whenever GNU extensions are
3797      disabled.
3798
3799 `-F STRING'
3800 `--flac-truncation=STRING'
3801      This option will request that any truncation in the output be
3802      reported using the string STRING.  Most output fields
3803      theoretically extend towards the beginning or the end of the
3804      current line, or current sentence, as selected with option `-S'.
3805      But there is a maximum allowed output line width, changeable
3806      through option `-w', which is further divided into space for
3807      various output fields.  When a field has to be truncated because
3808      it cannot extend beyond the beginning or the end of the current
3809      line to fit in, then a truncation occurs.  By default, the string
3810      used is a single slash, as in `-F /'.
3811
3812      STRING may have more than one character, as in `-F ...'.  Also, in
3813      the particular case when STRING is empty (`-F ""'), truncation
3814      flagging is disabled, and no truncation marks are appended in this
3815      case.
3816
3817      As a matter of convenience to the user, many usual backslashed
3818      escape sequences, as found in the C language, are recognized and
3819      converted to the corresponding characters by `ptx' itself.
3820
3821 `-M STRING'
3822 `--macro-name=STRING'
3823      Select another STRING to be used instead of `xx', while generating
3824      output suitable for `nroff', `troff' or TeX.
3825
3826 `-O'
3827 `--format=roff'
3828      Choose an output format suitable for `nroff' or `troff'
3829      processing.  Each output line will look like:
3830
3831           .xx "TAIL" "BEFORE" "KEYWORD_AND_AFTER" "HEAD" "REF"
3832
3833      so it will be possible to write a `.xx' roff macro to take care of
3834      the output typesetting.  This is the default output format when GNU
3835      extensions are disabled.  Option `-M' can be used to change `xx'
3836      to another macro name.
3837
3838      In this output format, each non-graphical character, like newline
3839      and tab, is merely changed to exactly one space, with no special
3840      attempt to compress consecutive spaces.  Each quote character: `"'
3841      is doubled so it will be correctly processed by `nroff' or `troff'.
3842
3843 `-T'
3844 `--format=tex'
3845      Choose an output format suitable for TeX processing.  Each output
3846      line will look like:
3847
3848           \xx {TAIL}{BEFORE}{KEYWORD}{AFTER}{HEAD}{REF}
3849
3850      so it will be possible to write a `\xx' definition to take care of
3851      the output typesetting.  Note that when references are not being
3852      produced, that is, neither option `-A' nor option `-r' is
3853      selected, the last parameter of each `\xx' call is inhibited.
3854      Option `-M' can be used to change `xx' to another macro name.
3855
3856      In this output format, some special characters, like `$', `%',
3857      `&', `#' and `_' are automatically protected with a backslash.
3858      Curly brackets `{', `}' are protected with a backslash and a pair
3859      of dollar signs (to force mathematical mode).  The backslash
3860      itself produces the sequence `\backslash{}'.  Circumflex and tilde
3861      diacritical marks produce the sequence `^\{ }' and `~\{ }'
3862      respectively.  Other diacriticized characters of the underlying
3863      character set produce an appropriate TeX sequence as far as
3864      possible.  The other non-graphical characters, like newline and
3865      tab, and all other characters which are not part of ASCII, are
3866      merely changed to exactly one space, with no special attempt to
3867      compress consecutive spaces.  Let me know how to improve this
3868      special character processing for TeX.
3869
3870
3871 \1f
3872 File: coreutils.info,  Node: Compatibility in ptx,  Prev: Output formatting in ptx,  Up: ptx invocation
3873
3874 7.7.5 The GNU extensions to `ptx'
3875 ---------------------------------
3876
3877 This version of `ptx' contains a few features which do not exist in
3878 System V `ptx'.  These extra features are suppressed by using the `-G'
3879 command line option, unless overridden by other command line options.
3880 Some GNU extensions cannot be recovered by overriding, so the simple
3881 rule is to avoid `-G' if you care about GNU extensions.  Here are the
3882 differences between this program and System V `ptx'.
3883
3884    * This program can read many input files at once, it always writes
3885      the resulting concordance on standard output.  On the other hand,
3886      System V `ptx' reads only one file and sends the result to
3887      standard output or, if a second FILE parameter is given on the
3888      command, to that FILE.
3889
3890      Having output parameters not introduced by options is a dangerous
3891      practice which GNU avoids as far as possible.  So, for using `ptx'
3892      portably between GNU and System V, you should always use it with a
3893      single input file, and always expect the result on standard
3894      output.  You might also want to automatically configure in a `-G'
3895      option to `ptx' calls in products using `ptx', if the configurator
3896      finds that the installed `ptx' accepts `-G'.
3897
3898    * The only options available in System V `ptx' are options `-b',
3899      `-f', `-g', `-i', `-o', `-r', `-t' and `-w'.  All other options
3900      are GNU extensions and are not repeated in this enumeration.
3901      Moreover, some options have a slightly different meaning when GNU
3902      extensions are enabled, as explained below.
3903
3904    * By default, concordance output is not formatted for `troff' or
3905      `nroff'.  It is rather formatted for a dumb terminal.  `troff' or
3906      `nroff' output may still be selected through option `-O'.
3907
3908    * Unless `-R' option is used, the maximum reference width is
3909      subtracted from the total output line width.  With GNU extensions
3910      disabled, width of references is not taken into account in the
3911      output line width computations.
3912
3913    * All 256 bytes, even null bytes, are always read and processed from
3914      input file with no adverse effect, even if GNU extensions are
3915      disabled.  However, System V `ptx' does not accept 8-bit
3916      characters, a few control characters are rejected, and the tilde
3917      `~' is also rejected.
3918
3919    * Input line length is only limited by available memory, even if GNU
3920      extensions are disabled.  However, System V `ptx' processes only
3921      the first 200 characters in each line.
3922
3923    * The break (non-word) characters default to be every character
3924      except all letters of the underlying character set, diacriticized
3925      or not.  When GNU extensions are disabled, the break characters
3926      default to space, tab and newline only.
3927
3928    * The program makes better use of output line width.  If GNU
3929      extensions are disabled, the program rather tries to imitate
3930      System V `ptx', but still, there are some slight disposition
3931      glitches this program does not completely reproduce.
3932
3933    * The user can specify both an Ignore file and an Only file.  This
3934      is not allowed with System V `ptx'.
3935
3936
3937 \1f
3938 File: coreutils.info,  Node: Operating on fields within a line,  Next: Operating on characters,  Prev: Operating on sorted files,  Up: Top
3939
3940 8 Operating on fields within a line
3941 ***********************************
3942
3943 * Menu:
3944
3945 * cut invocation::              Print selected parts of lines.
3946 * paste invocation::            Merge lines of files.
3947 * join invocation::             Join lines on a common field.
3948
3949 \1f
3950 File: coreutils.info,  Node: cut invocation,  Next: paste invocation,  Up: Operating on fields within a line
3951
3952 8.1 `cut': Print selected parts of lines
3953 ========================================
3954
3955 `cut' writes to standard output selected parts of each line of each
3956 input file, or standard input if no files are given or for a file name
3957 of `-'.  Synopsis:
3958
3959      cut [OPTION]... [FILE]...
3960
3961    In the table which follows, the BYTE-LIST, CHARACTER-LIST, and
3962 FIELD-LIST are one or more numbers or ranges (two numbers separated by
3963 a dash) separated by commas.  Bytes, characters, and fields are
3964 numbered starting at 1.  Incomplete ranges may be given: `-M' means
3965 `1-M'; `N-' means `N' through end of line or last field.  The list
3966 elements can be repeated, can overlap, and can be specified in any
3967 order; but the selected input is written in the same order that it is
3968 read, and is written exactly once.
3969
3970    The program accepts the following options.  Also see *Note Common
3971 options::.
3972
3973 `-b BYTE-LIST'
3974 `--bytes=BYTE-LIST'
3975      Select for printing only the bytes in positions listed in
3976      BYTE-LIST.  Tabs and backspaces are treated like any other
3977      character; they take up 1 byte.  If an output delimiter is
3978      specified, (see the description of `--output-delimiter'), then
3979      output that string between ranges of selected bytes.
3980
3981 `-c CHARACTER-LIST'
3982 `--characters=CHARACTER-LIST'
3983      Select for printing only the characters in positions listed in
3984      CHARACTER-LIST.  The same as `-b' for now, but
3985      internationalization will change that.  Tabs and backspaces are
3986      treated like any other character; they take up 1 character.  If an
3987      output delimiter is specified, (see the description of
3988      `--output-delimiter'), then output that string between ranges of
3989      selected bytes.
3990
3991 `-f FIELD-LIST'
3992 `--fields=FIELD-LIST'
3993      Select for printing only the fields listed in FIELD-LIST.  Fields
3994      are separated by a TAB character by default.  Also print any line
3995      that contains no delimiter character, unless the
3996      `--only-delimited' (`-s') option is specified
3997
3998 `-d INPUT_DELIM_BYTE'
3999 `--delimiter=INPUT_DELIM_BYTE'
4000      With `-f', use the first byte of INPUT_DELIM_BYTE as the input
4001      fields separator (default is TAB).
4002
4003 `-n'
4004      Do not split multi-byte characters (no-op for now).
4005
4006 `-s'
4007 `--only-delimited'
4008      For `-f', do not print lines that do not contain the field
4009      separator character.  Normally, any line without a field separator
4010      is printed verbatim.
4011
4012 `--output-delimiter=OUTPUT_DELIM_STRING'
4013      With `-f', output fields are separated by OUTPUT_DELIM_STRING.
4014      The default with `-f' is to use the input delimiter.  When using
4015      `-b' or `-c' to select ranges of byte or character offsets (as
4016      opposed to ranges of fields), output OUTPUT_DELIM_STRING between
4017      non-overlapping ranges of selected bytes.
4018
4019 `--complement'
4020      This option is a GNU extension.  Select for printing the
4021      complement of the bytes, characters or fields selected with the
4022      `-b', `-c' or `-f' options.  In other words, do _not_ print the
4023      bytes, characters or fields specified via those options.  This
4024      option is useful when you have many fields and want to print all
4025      but a few of them.
4026
4027
4028    An exit status of zero indicates success, and a nonzero value
4029 indicates failure.
4030
4031 \1f
4032 File: coreutils.info,  Node: paste invocation,  Next: join invocation,  Prev: cut invocation,  Up: Operating on fields within a line
4033
4034 8.2 `paste': Merge lines of files
4035 =================================
4036
4037 `paste' writes to standard output lines consisting of sequentially
4038 corresponding lines of each given file, separated by a TAB character.
4039 Standard input is used for a file name of `-' or if no input files are
4040 given.
4041
4042    For example:
4043
4044      $ cat num2
4045      1
4046      2
4047      $ cat let3
4048      a
4049      b
4050      c
4051      $ paste num2 let3
4052      1       a
4053      2       b
4054              c
4055
4056    Synopsis:
4057
4058      paste [OPTION]... [FILE]...
4059
4060    The program accepts the following options.  Also see *Note Common
4061 options::.
4062
4063 `-s'
4064 `--serial'
4065      Paste the lines of one file at a time rather than one line from
4066      each file.  Using the above example data:
4067
4068           $ paste -s num2 let3
4069           1       2
4070           a       b       c
4071
4072 `-d DELIM-LIST'
4073 `--delimiters=DELIM-LIST'
4074      Consecutively use the characters in DELIM-LIST instead of TAB to
4075      separate merged lines.  When DELIM-LIST is exhausted, start again
4076      at its beginning.  Using the above example data:
4077
4078           $ paste -d '%_' num2 let3 num2
4079           1%a_1
4080           2%b_2
4081           %c_
4082
4083
4084    An exit status of zero indicates success, and a nonzero value
4085 indicates failure.
4086
4087 \1f
4088 File: coreutils.info,  Node: join invocation,  Prev: paste invocation,  Up: Operating on fields within a line
4089
4090 8.3 `join': Join lines on a common field
4091 ========================================
4092
4093 `join' writes to standard output a line for each pair of input lines
4094 that have identical join fields.  Synopsis:
4095
4096      join [OPTION]... FILE1 FILE2
4097
4098    Either FILE1 or FILE2 (but not both) can be `-', meaning standard
4099 input.  FILE1 and FILE2 should be sorted on the join fields.
4100
4101    Normally, the sort order is that of the collating sequence specified
4102 by the `LC_COLLATE' locale.  Unless the `-t' option is given, the sort
4103 comparison ignores blanks at the start of the join field, as in `sort
4104 -b'.  If the `--ignore-case' option is given, the sort comparison
4105 ignores the case of characters in the join field, as in `sort -f'.
4106
4107    The `sort' and `join' commands should use consistent locales and
4108 options if the output of `sort' is fed to `join'.  You can use a
4109 command like `sort -k 1b,1' to sort a file on its default join field,
4110 but if you select a non-default locale, join field, separator, or
4111 comparison options, then you should do so consistently between `join'
4112 and `sort'.
4113
4114    As a GNU extension, if the input has no unpairable lines the sort
4115 order can be any order that considers two fields to be equal if and
4116 only if the sort comparison described above considers them to be equal.
4117 For example:
4118
4119      $ cat file1
4120      a a1
4121      c c1
4122      b b1
4123      $ cat file2
4124      a a2
4125      c c2
4126      b b2
4127      $ join file1 file2
4128      a a1 a2
4129      c c1 c2
4130      b b1 b2
4131
4132    The defaults are:
4133    * the join field is the first field in each line;
4134
4135    * fields in the input are separated by one or more blanks, with
4136      leading       blanks on the line ignored;
4137
4138    * fields in the output are separated by a space;
4139
4140    * each output line consists of the join field, the remaining fields
4141      from FILE1, then the remaining fields from FILE2.
4142
4143    The program accepts the following options.  Also see *Note Common
4144 options::.
4145
4146 `-a FILE-NUMBER'
4147      Print a line for each unpairable line in file FILE-NUMBER (either
4148      `1' or `2'), in addition to the normal output.
4149
4150 `-e STRING'
4151      Replace those output fields that are missing in the input with
4152      STRING.
4153
4154 `-i'
4155 `--ignore-case'
4156      Ignore differences in case when comparing keys.  With this option,
4157      the lines of the input files must be ordered in the same way.  Use
4158      `sort -f' to produce this ordering.
4159
4160 `-1 FIELD'
4161      Join on field FIELD (a positive integer) of file 1.
4162
4163 `-2 FIELD'
4164      Join on field FIELD (a positive integer) of file 2.
4165
4166 `-j FIELD'
4167      Equivalent to `-1 FIELD -2 FIELD'.
4168
4169 `-o FIELD-LIST'
4170      Construct each output line according to the format in FIELD-LIST.
4171      Each element in FIELD-LIST is either the single character `0' or
4172      has the form M.N where the file number, M, is `1' or `2' and N is
4173      a positive field number.
4174
4175      A field specification of `0' denotes the join field.  In most
4176      cases, the functionality of the `0' field spec may be reproduced
4177      using the explicit M.N that corresponds to the join field.
4178      However, when printing unpairable lines (using either of the `-a'
4179      or `-v' options), there is no way to specify the join field using
4180      M.N in FIELD-LIST if there are unpairable lines in both files.  To
4181      give `join' that functionality, POSIX invented the `0' field
4182      specification notation.
4183
4184      The elements in FIELD-LIST are separated by commas or blanks.
4185      Blank separators typically need to be quoted for the shell.  For
4186      example, the commands `join -o 1.2,2.2' and `join -o '1.2 2.2''
4187      are equivalent.
4188
4189      All output lines--including those printed because of any -a or -v
4190      option--are subject to the specified FIELD-LIST.
4191
4192 `-t CHAR'
4193      Use character CHAR as the input and output field separator.  Treat
4194      as significant each occurrence of CHAR in the input file.  Use
4195      `sort -t CHAR', without the `-b' option of `sort', to produce this
4196      ordering.
4197
4198 `-v FILE-NUMBER'
4199      Print a line for each unpairable line in file FILE-NUMBER (either
4200      `1' or `2'), instead of the normal output.
4201
4202
4203    An exit status of zero indicates success, and a nonzero value
4204 indicates failure.
4205
4206 \1f
4207 File: coreutils.info,  Node: Operating on characters,  Next: Directory listing,  Prev: Operating on fields within a line,  Up: Top
4208
4209 9 Operating on characters
4210 *************************
4211
4212 This commands operate on individual characters.
4213
4214 * Menu:
4215
4216 * tr invocation::               Translate, squeeze, and/or delete characters.
4217 * expand invocation::           Convert tabs to spaces.
4218 * unexpand invocation::         Convert spaces to tabs.
4219
4220 \1f
4221 File: coreutils.info,  Node: tr invocation,  Next: expand invocation,  Up: Operating on characters
4222
4223 9.1 `tr': Translate, squeeze, and/or delete characters
4224 ======================================================
4225
4226 Synopsis:
4227
4228      tr [OPTION]... SET1 [SET2]
4229
4230    `tr' copies standard input to standard output, performing one of the
4231 following operations:
4232
4233    * translate, and optionally squeeze repeated characters in the
4234      result,
4235
4236    * squeeze repeated characters,
4237
4238    * delete characters,
4239
4240    * delete characters, then squeeze repeated characters from the
4241      result.
4242
4243    The SET1 and (if given) SET2 arguments define ordered sets of
4244 characters, referred to below as SET1 and SET2.  These sets are the
4245 characters of the input that `tr' operates on.  The `--complement'
4246 (`-c', `-C') option replaces SET1 with its complement (all of the
4247 characters that are not in SET1).
4248
4249    Currently `tr' fully supports only single-byte characters.
4250 Eventually it will support multibyte characters; when it does, the `-C'
4251 option will cause it to complement the set of characters, whereas `-c'
4252 will cause it to complement the set of values.  This distinction will
4253 matter only when some values are not characters, and this is possible
4254 only in locales using multibyte encodings when the input contains
4255 encoding errors.
4256
4257    The program accepts the `--help' and `--version' options.  *Note
4258 Common options::.  Options must precede operands.
4259
4260    An exit status of zero indicates success, and a nonzero value
4261 indicates failure.
4262
4263 * Menu:
4264
4265 * Character sets::              Specifying sets of characters.
4266 * Translating::                 Changing one set of characters to another.
4267 * Squeezing::                   Squeezing repeats and deleting.
4268
4269 \1f
4270 File: coreutils.info,  Node: Character sets,  Next: Translating,  Up: tr invocation
4271
4272 9.1.1 Specifying sets of characters
4273 -----------------------------------
4274
4275 The format of the SET1 and SET2 arguments resembles the format of
4276 regular expressions; however, they are not regular expressions, only
4277 lists of characters.  Most characters simply represent themselves in
4278 these strings, but the strings can contain the shorthands listed below,
4279 for convenience.  Some of them can be used only in SET1 or SET2, as
4280 noted below.
4281
4282 Backslash escapes
4283      The following backslash escape sequences are recognized:
4284
4285     `\a'
4286           Control-G.
4287
4288     `\b'
4289           Control-H.
4290
4291     `\f'
4292           Control-L.
4293
4294     `\n'
4295           Control-J.
4296
4297     `\r'
4298           Control-M.
4299
4300     `\t'
4301           Control-I.
4302
4303     `\v'
4304           Control-K.
4305
4306     `\OOO'
4307           The character with the value given by OOO, which is 1 to 3
4308           octal digits,
4309
4310     `\\'
4311           A backslash.
4312
4313      While a backslash followed by a character not listed above is
4314      interpreted as that character, the backslash also effectively
4315      removes any special significance, so it is useful to escape `[',
4316      `]', `*', and `-'.
4317
4318 Ranges
4319      The notation `M-N' expands to all of the characters from M through
4320      N, in ascending order.  M should collate before N; if it doesn't,
4321      an error results.  As an example, `0-9' is the same as
4322      `0123456789'.
4323
4324      GNU `tr' does not support the System V syntax that uses square
4325      brackets to enclose ranges.  Translations specified in that format
4326      sometimes work as expected, since the brackets are often
4327      transliterated to themselves.  However, they should be avoided
4328      because they sometimes behave unexpectedly.  For example, `tr -d
4329      '[0-9]'' deletes brackets as well as digits.
4330
4331      Many historically common and even accepted uses of ranges are not
4332      portable.  For example, on EBCDIC hosts using the `A-Z' range will
4333      not do what most would expect because `A' through `Z' are not
4334      contiguous as they are in ASCII.  If you can rely on a POSIX
4335      compliant version of `tr', then the best way to work around this
4336      is to use character classes (see below).  Otherwise, it is most
4337      portable (and most ugly) to enumerate the members of the ranges.
4338
4339 Repeated characters
4340      The notation `[C*N]' in SET2 expands to N copies of character C.
4341      Thus, `[y*6]' is the same as `yyyyyy'.  The notation `[C*]' in
4342      STRING2 expands to as many copies of C as are needed to make SET2
4343      as long as SET1.  If N begins with `0', it is interpreted in
4344      octal, otherwise in decimal.
4345
4346 Character classes
4347      The notation `[:CLASS:]' expands to all of the characters in the
4348      (predefined) class CLASS.  The characters expand in no particular
4349      order, except for the `upper' and `lower' classes, which expand in
4350      ascending order.  When the `--delete' (`-d') and
4351      `--squeeze-repeats' (`-s') options are both given, any character
4352      class can be used in SET2.  Otherwise, only the character classes
4353      `lower' and `upper' are accepted in SET2, and then only if the
4354      corresponding character class (`upper' and `lower', respectively)
4355      is specified in the same relative position in SET1.  Doing this
4356      specifies case conversion.  The class names are given below; an
4357      error results when an invalid class name is given.
4358
4359     `alnum'
4360           Letters and digits.
4361
4362     `alpha'
4363           Letters.
4364
4365     `blank'
4366           Horizontal whitespace.
4367
4368     `cntrl'
4369           Control characters.
4370
4371     `digit'
4372           Digits.
4373
4374     `graph'
4375           Printable characters, not including space.
4376
4377     `lower'
4378           Lowercase letters.
4379
4380     `print'
4381           Printable characters, including space.
4382
4383     `punct'
4384           Punctuation characters.
4385
4386     `space'
4387           Horizontal or vertical whitespace.
4388
4389     `upper'
4390           Uppercase letters.
4391
4392     `xdigit'
4393           Hexadecimal digits.
4394
4395 Equivalence classes
4396      The syntax `[=C=]' expands to all of the characters that are
4397      equivalent to C, in no particular order.  Equivalence classes are
4398      a relatively recent invention intended to support non-English
4399      alphabets.  But there seems to be no standard way to define them
4400      or determine their contents.  Therefore, they are not fully
4401      implemented in GNU `tr'; each character's equivalence class
4402      consists only of that character, which is of no particular use.
4403
4404
4405 \1f
4406 File: coreutils.info,  Node: Translating,  Next: Squeezing,  Prev: Character sets,  Up: tr invocation
4407
4408 9.1.2 Translating
4409 -----------------
4410
4411 `tr' performs translation when SET1 and SET2 are both given and the
4412 `--delete' (`-d') option is not given.  `tr' translates each character
4413 of its input that is in SET1 to the corresponding character in SET2.
4414 Characters not in SET1 are passed through unchanged.  When a character
4415 appears more than once in SET1 and the corresponding characters in SET2
4416 are not all the same, only the final one is used.  For example, these
4417 two commands are equivalent:
4418
4419      tr aaa xyz
4420      tr a z
4421
4422    A common use of `tr' is to convert lowercase characters to
4423 uppercase.  This can be done in many ways.  Here are three of them:
4424
4425      tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
4426      tr a-z A-Z
4427      tr '[:lower:]' '[:upper:]'
4428
4429 But note that using ranges like `a-z' above is not portable.
4430
4431    When `tr' is performing translation, SET1 and SET2 typically have
4432 the same length.  If SET1 is shorter than SET2, the extra characters at
4433 the end of SET2 are ignored.
4434
4435    On the other hand, making SET1 longer than SET2 is not portable;
4436 POSIX says that the result is undefined.  In this situation, BSD `tr'
4437 pads SET2 to the length of SET1 by repeating the last character of SET2
4438 as many times as necessary.  System V `tr' truncates SET1 to the length
4439 of SET2.
4440
4441    By default, GNU `tr' handles this case like BSD `tr'.  When the
4442 `--truncate-set1' (`-t') option is given, GNU `tr' handles this case
4443 like the System V `tr' instead.  This option is ignored for operations
4444 other than translation.
4445
4446    Acting like System V `tr' in this case breaks the relatively common
4447 BSD idiom:
4448
4449      tr -cs A-Za-z0-9 '\012'
4450
4451 because it converts only zero bytes (the first element in the
4452 complement of SET1), rather than all non-alphanumerics, to newlines.
4453
4454 By the way, the above idiom is not portable because it uses ranges, and
4455 it assumes that the octal code for newline is 012.  Assuming a POSIX
4456 compliant `tr', here is a better way to write it:
4457
4458      tr -cs '[:alnum:]' '[\n*]'
4459
4460 \1f
4461 File: coreutils.info,  Node: Squeezing,  Prev: Translating,  Up: tr invocation
4462
4463 9.1.3 Squeezing repeats and deleting
4464 ------------------------------------
4465
4466 When given just the `--delete' (`-d') option, `tr' removes any input
4467 characters that are in SET1.
4468
4469    When given just the `--squeeze-repeats' (`-s') option, `tr' replaces
4470 each input sequence of a repeated character that is in SET1 with a
4471 single occurrence of that character.
4472
4473    When given both `--delete' and `--squeeze-repeats', `tr' first
4474 performs any deletions using SET1, then squeezes repeats from any
4475 remaining characters using SET2.
4476
4477    The `--squeeze-repeats' option may also be used when translating, in
4478 which case `tr' first performs translation, then squeezes repeats from
4479 any remaining characters using SET2.
4480
4481    Here are some examples to illustrate various combinations of options:
4482
4483    * Remove all zero bytes:
4484
4485           tr -d '\0'
4486
4487    * Put all words on lines by themselves.  This converts all
4488      non-alphanumeric characters to newlines, then squeezes each string
4489      of repeated newlines into a single newline:
4490
4491           tr -cs '[:alnum:]' '[\n*]'
4492
4493    * Convert each sequence of repeated newlines to a single newline:
4494
4495           tr -s '\n'
4496
4497    * Find doubled occurrences of words in a document.  For example,
4498      people often write "the the" with the repeated words separated by
4499      a newline.  The Bourne shell script below works first by
4500      converting each sequence of punctuation and blank characters to a
4501      single newline.  That puts each "word" on a line by itself.  Next
4502      it maps all uppercase characters to lower case, and finally it
4503      runs `uniq' with the `-d' option to print out only the words that
4504      were repeated.
4505
4506           #!/bin/sh
4507           cat -- "$@" \
4508             | tr -s '[:punct:][:blank:]' '[\n*]' \
4509             | tr '[:upper:]' '[:lower:]' \
4510             | uniq -d
4511
4512    * Deleting a small set of characters is usually straightforward.
4513      For example, to remove all `a's, `x's, and `M's you would do this:
4514
4515           tr -d axM
4516
4517      However, when `-' is one of those characters, it can be tricky
4518      because `-' has special meanings.  Performing the same task as
4519      above but also removing all `-' characters, we might try `tr -d
4520      -axM', but that would fail because `tr' would try to interpret
4521      `-a' as a command-line option.  Alternatively, we could try
4522      putting the hyphen inside the string, `tr -d a-xM', but that
4523      wouldn't work either because it would make `tr' interpret `a-x' as
4524      the range of characters `a'...`x' rather than the three.  One way
4525      to solve the problem is to put the hyphen at the end of the list
4526      of characters:
4527
4528           tr -d axM-
4529
4530      Or you can use `--' to terminate option processing:
4531
4532           tr -d -- -axM
4533
4534      More generally, use the character class notation `[=c=]' with `-'
4535      (or any other character) in place of the `c':
4536
4537           tr -d '[=-=]axM'
4538
4539      Note how single quotes are used in the above example to protect the
4540      square brackets from interpretation by a shell.
4541
4542
4543 \1f
4544 File: coreutils.info,  Node: expand invocation,  Next: unexpand invocation,  Prev: tr invocation,  Up: Operating on characters
4545
4546 9.2 `expand': Convert tabs to spaces
4547 ====================================
4548
4549 `expand' writes the contents of each given FILE, or standard input if
4550 none are given or for a FILE of `-', to standard output, with tab
4551 characters converted to the appropriate number of spaces.  Synopsis:
4552
4553      expand [OPTION]... [FILE]...
4554
4555    By default, `expand' converts all tabs to spaces.  It preserves
4556 backspace characters in the output; they decrement the column count for
4557 tab calculations.  The default action is equivalent to `-t 8' (set tabs
4558 every 8 columns).
4559
4560    The program accepts the following options.  Also see *Note Common
4561 options::.
4562
4563 `-t TAB1[,TAB2]...'
4564 `--tabs=TAB1[,TAB2]...'
4565      If only one tab stop is given, set the tabs TAB1 spaces apart
4566      (default is 8).  Otherwise, set the tabs at columns TAB1, TAB2,
4567      ... (numbered from 0), and replace any tabs beyond the last tab
4568      stop given with single spaces.  Tab stops can be separated by
4569      blanks as well as by commas.
4570
4571      For compatibility, GNU `expand' also accepts the obsolete option
4572      syntax, `-T1[,T2]...'.  New scripts should use `-t T1[,T2]...'
4573      instead.
4574
4575 `-i'
4576 `--initial'
4577      Only convert initial tabs (those that precede all non-space or
4578      non-tab characters) on each line to spaces.
4579
4580
4581    An exit status of zero indicates success, and a nonzero value
4582 indicates failure.
4583
4584 \1f
4585 File: coreutils.info,  Node: unexpand invocation,  Prev: expand invocation,  Up: Operating on characters
4586
4587 9.3 `unexpand': Convert spaces to tabs
4588 ======================================
4589
4590 `unexpand' writes the contents of each given FILE, or standard input if
4591 none are given or for a FILE of `-', to standard output, converting
4592 blanks at the beginning of each line into as many tab characters as
4593 needed.  In the default POSIX locale, a "blank" is a space or a tab;
4594 other locales may specify additional blank characters.  Synopsis:
4595
4596      unexpand [OPTION]... [FILE]...
4597
4598    By default, `unexpand' converts only initial blanks (those that
4599 precede all non-blank characters) on each line.  It preserves backspace
4600 characters in the output; they decrement the column count for tab
4601 calculations.  By default, tabs are set at every 8th column.
4602
4603    The program accepts the following options.  Also see *Note Common
4604 options::.
4605
4606 `-t TAB1[,TAB2]...'
4607 `--tabs=TAB1[,TAB2]...'
4608      If only one tab stop is given, set the tabs TAB1 columns apart
4609      instead of the default 8.  Otherwise, set the tabs at columns
4610      TAB1, TAB2, ... (numbered from 0), and leave blanks beyond the tab
4611      stops given unchanged.  Tab stops can be separated by blanks as
4612      well as by commas.  This option implies the `-a' option.
4613
4614      For compatibility, GNU `unexpand' supports the obsolete option
4615      syntax, `-TAB1[,TAB2]...', where tab stops must be separated by
4616      commas.  (Unlike `-t', this obsolete option does not imply `-a'.)
4617      New scripts should use `--first-only -t TAB1[,TAB2]...' instead.
4618
4619 `-a'
4620 `--all'
4621      Also convert all sequences of two or more blanks just before a tab
4622      stop, even if they occur after non-blank characters in a line.
4623
4624
4625    An exit status of zero indicates success, and a nonzero value
4626 indicates failure.
4627
4628 \1f
4629 File: coreutils.info,  Node: Directory listing,  Next: Basic operations,  Prev: Operating on characters,  Up: Top
4630
4631 10 Directory listing
4632 ********************
4633
4634 This chapter describes the `ls' command and its variants `dir' and
4635 `vdir', which list information about files.
4636
4637 * Menu:
4638
4639 * ls invocation::               List directory contents.
4640 * dir invocation::              Briefly ls.
4641 * vdir invocation::             Verbosely ls.
4642 * dircolors invocation::        Color setup for ls, etc.
4643
4644 \1f
4645 File: coreutils.info,  Node: ls invocation,  Next: dir invocation,  Up: Directory listing
4646
4647 10.1 `ls': List directory contents
4648 ==================================
4649
4650 The `ls' program lists information about files (of any type, including
4651 directories).  Options and file arguments can be intermixed
4652 arbitrarily, as usual.
4653
4654    For non-option command-line arguments that are directories, by
4655 default `ls' lists the contents of directories, not recursively, and
4656 omitting files with names beginning with `.'.  For other non-option
4657 arguments, by default `ls' lists just the file name.  If no non-option
4658 argument is specified, `ls' operates on the current directory, acting
4659 as if it had been invoked with a single argument of `.'.
4660
4661    By default, the output is sorted alphabetically, according to the
4662 locale settings in effect.(1) If standard output is a terminal, the
4663 output is in columns (sorted vertically) and control characters are
4664 output as question marks; otherwise, the output is listed one per line
4665 and control characters are output as-is.
4666
4667    Because `ls' is such a fundamental program, it has accumulated many
4668 options over the years.  They are described in the subsections below;
4669 within each section, options are listed alphabetically (ignoring case).
4670 The division of options into the subsections is not absolute, since some
4671 options affect more than one aspect of `ls''s operation.
4672
4673    Exit status:
4674
4675      0 success
4676      1 minor problems (e.g., a subdirectory was not found)
4677      2 serious trouble (e.g., memory exhausted)
4678
4679    Also see *Note Common options::.
4680
4681 * Menu:
4682
4683 * Which files are listed::
4684 * What information is listed::
4685 * Sorting the output::
4686 * More details about version sort::
4687 * General output formatting::
4688 * Formatting file timestamps::
4689 * Formatting the file names::
4690
4691    ---------- Footnotes ----------
4692
4693    (1) If you use a non-POSIX locale (e.g., by setting `LC_ALL' to
4694 `en_US'), then `ls' may produce output that is sorted differently than
4695 you're accustomed to.  In that case, set the `LC_ALL' environment
4696 variable to `C'.
4697
4698 \1f
4699 File: coreutils.info,  Node: Which files are listed,  Next: What information is listed,  Up: ls invocation
4700
4701 10.1.1 Which files are listed
4702 -----------------------------
4703
4704 These options determine which files `ls' lists information for.  By
4705 default, `ls' lists files and the contents of any directories on the
4706 command line, except that in directories it ignores files whose names
4707 start with `.'.
4708
4709 `-a'
4710 `--all'
4711      In directories, do not ignore file names that start with `.'.
4712
4713 `-A'
4714 `--almost-all'
4715      In directories, do not ignore all file names that start with `.';
4716      ignore only `.' and `..'.  The `--all' (`-a') option overrides
4717      this option.
4718
4719 `-B'
4720 `--ignore-backups'
4721      In directories, ignore files that end with `~'.  This option is
4722      equivalent to `--ignore='*~' --ignore='.*~''.
4723
4724 `-d'
4725 `--directory'
4726      List just the names of directories, as with other types of files,
4727      rather than listing their contents.  Do not follow symbolic links
4728      listed on the command line unless the `--dereference-command-line'
4729      (`-H'), `--dereference' (`-L'), or
4730      `--dereference-command-line-symlink-to-dir' options are specified.
4731
4732 `-H'
4733 `--dereference-command-line'
4734      If a command line argument specifies a symbolic link, show
4735      information for the file the link references rather than for the
4736      link itself.
4737
4738 `--dereference-command-line-symlink-to-dir'
4739      Do not dereference symbolic links, with one exception: if a
4740      command line argument specifies a symbolic link that refers to a
4741      directory, show information for that directory rather than for the
4742      link itself.  This is the default behavior when no other
4743      dereferencing-related option has been specified (`--classify'
4744      (`-F'), `--directory' (`-d'), (`-l'), `--dereference' (`-L'), or
4745      `--dereference-command-line' (`-H')).
4746
4747 `--group-directories-first'
4748      Group all the directories before the files and then sort the
4749      directories and the files separately using the selected sort key
4750      (see -sort option).  That is, this option specifies a primary sort
4751      key, and the -sort option specifies a secondary key.
4752
4753 `--hide=PATTERN'
4754      In directories, ignore files whose names match the shell pattern
4755      PATTERN, unless the `--all' (`-a') or `--almost-all' (`-A') is
4756      also given.  This option acts like `--ignore=PATTERN' except that
4757      it has no effect if `--all' (`-a') or `--almost-all' (`-A') is
4758      also given.
4759
4760      This option can be useful in shell aliases.  For example, if `lx'
4761      is an alias for `ls --hide='*~'' and `ly' is an alias for `ls
4762      --ignore='*~'', then the command `lx -A' lists the file `README~'
4763      even though `ly -A' would not.
4764
4765 `-I PATTERN'
4766 `--ignore=PATTERN'
4767      In directories, ignore files whose names match the shell pattern
4768      (not regular expression) PATTERN.  As in the shell, an initial `.'
4769      in a file name does not match a wildcard at the start of PATTERN.
4770      Sometimes it is useful to give this option several times.  For
4771      example,
4772
4773           $ ls --ignore='.??*' --ignore='.[^.]' --ignore='#*'
4774
4775      The first option ignores names of length 3 or more that start with
4776      `.', the second ignores all two-character names that start with `.'
4777      except `..', and the third ignores names that start with `#'.
4778
4779 `-L'
4780 `--dereference'
4781      When showing file information for a symbolic link, show information
4782      for the file the link references rather than the link itself.
4783      However, even with this option, `ls' still prints the name of the
4784      link itself, not the name of the file that the link points to.
4785
4786 `-R'
4787 `--recursive'
4788      List the contents of all directories recursively.
4789
4790
4791 \1f
4792 File: coreutils.info,  Node: What information is listed,  Next: Sorting the output,  Prev: Which files are listed,  Up: ls invocation
4793
4794 10.1.2 What information is listed
4795 ---------------------------------
4796
4797 These options affect the information that `ls' displays.  By default,
4798 only file names are shown.
4799
4800 `--author'
4801      List each file's author when producing long format directory
4802      listings.  In GNU/Hurd, file authors can differ from their owners,
4803      but in other operating systems the two are the same.
4804
4805 `-D'
4806 `--dired'
4807      With the long listing (`-l') format, print an additional line after
4808      the main output:
4809
4810           //DIRED// BEG1 END1 BEG2 END2 ...
4811
4812      The BEGN and ENDN are unsigned integers that record the byte
4813      position of the beginning and end of each file name in the output.
4814      This makes it easy for Emacs to find the names, even when they
4815      contain unusual characters such as space or newline, without fancy
4816      searching.
4817
4818      If directories are being listed recursively (`-R'), output a
4819      similar line with offsets for each subdirectory name:
4820
4821           //SUBDIRED// BEG1 END1 ...
4822
4823      Finally, output a line of the form:
4824
4825           //DIRED-OPTIONS// --quoting-style=WORD
4826
4827      where WORD is the quoting style (*note Formatting the file
4828      names::).
4829
4830      Here is an actual example:
4831
4832           $ mkdir -p a/sub/deeper a/sub2
4833           $ touch a/f1 a/f2
4834           $ touch a/sub/deeper/file
4835           $ ls -gloRF --dired a
4836             a:
4837             total 8
4838             -rw-r--r-- 1    0 Jun 10 12:27 f1
4839             -rw-r--r-- 1    0 Jun 10 12:27 f2
4840             drwxr-xr-x 3 4096 Jun 10 12:27 sub/
4841             drwxr-xr-x 2 4096 Jun 10 12:27 sub2/
4842
4843             a/sub:
4844             total 4
4845             drwxr-xr-x 2 4096 Jun 10 12:27 deeper/
4846
4847             a/sub/deeper:
4848             total 0
4849             -rw-r--r-- 1 0 Jun 10 12:27 file
4850
4851             a/sub2:
4852             total 0
4853           //DIRED// 48 50 84 86 120 123 158 162 217 223 282 286
4854           //SUBDIRED// 2 3 167 172 228 240 290 296
4855           //DIRED-OPTIONS// --quoting-style=literal
4856
4857      Note that the pairs of offsets on the `//DIRED//' line above
4858      delimit these names: `f1', `f2', `sub', `sub2', `deeper', `file'.
4859      The offsets on the `//SUBDIRED//' line delimit the following
4860      directory names: `a', `a/sub', `a/sub/deeper', `a/sub2'.
4861
4862      Here is an example of how to extract the fifth entry name,
4863      `deeper', corresponding to the pair of offsets, 222 and 228:
4864
4865           $ ls -gloRF --dired a > out
4866           $ dd bs=1 skip=222 count=6 < out 2>/dev/null; echo
4867           deeper
4868
4869      Note that although the listing above includes a trailing slash for
4870      the `deeper' entry, the offsets select the name without the
4871      trailing slash.  However, if you invoke `ls' with `--dired' along
4872      with an option like `--escape' (aka `-b') and operate on a file
4873      whose name contains special characters, notice that the backslash
4874      _is_ included:
4875
4876           $ touch 'a b'
4877           $ ls -blog --dired 'a b'
4878             -rw-r--r-- 1 0 Jun 10 12:28 a\ b
4879           //DIRED// 30 34
4880           //DIRED-OPTIONS// --quoting-style=escape
4881
4882      If you use a quoting style that adds quote marks (e.g.,
4883      `--quoting-style=c'), then the offsets include the quote marks.
4884      So beware that the user may select the quoting style via the
4885      environment variable `QUOTING_STYLE'.  Hence, applications using
4886      `--dired' should either specify an explicit
4887      `--quoting-style=literal' option (aka `-N' or `--literal') on the
4888      command line, or else be prepared to parse the escaped names.
4889
4890 `--full-time'
4891      Produce long format directory listings, and list times in full.
4892      It is equivalent to using `--format=long' with
4893      `--time-style=full-iso' (*note Formatting file timestamps::).
4894
4895 `-g'
4896      Produce long format directory listings, but don't display owner
4897      information.
4898
4899 `-G'
4900 `--no-group'
4901      Inhibit display of group information in a long format directory
4902      listing.  (This is the default in some non-GNU versions of `ls',
4903      so we provide this option for compatibility.)
4904
4905 `-h'
4906 `--human-readable'
4907      Append a size letter to each size, such as `M' for mebibytes.
4908      Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes.
4909      Use the `--si' option if you prefer powers of 1000.
4910
4911 `-i'
4912 `--inode'
4913      Print the inode number (also called the file serial number and
4914      index number) of each file to the left of the file name.  (This
4915      number uniquely identifies each file within a particular file
4916      system.)
4917
4918 `-l'
4919 `--format=long'
4920 `--format=verbose'
4921      In addition to the name of each file, print the file type, file
4922      mode bits, number of hard links, owner name, group name, size, and
4923      timestamp (*note Formatting file timestamps::), normally the
4924      modification time.  Print question marks for information that
4925      cannot be determined.
4926
4927      Normally the size is printed as a byte count without punctuation,
4928      but this can be overridden (*note Block size::).  For example, `-h'
4929      prints an abbreviated, human-readable count, and
4930      `--block-size="'1"' prints a byte count with the thousands
4931      separator of the current locale.
4932
4933      For each directory that is listed, preface the files with a line
4934      `total BLOCKS', where BLOCKS is the total disk allocation for all
4935      files in that directory.  The block size currently defaults to 1024
4936      bytes, but this can be overridden (*note Block size::).  The
4937      BLOCKS computed counts each hard link separately; this is arguably
4938      a deficiency.
4939
4940      The file type is one of the following characters:
4941
4942     `-'
4943           regular file
4944
4945     `b'
4946           block special file
4947
4948     `c'
4949           character special file
4950
4951     `C'
4952           high performance ("contiguous data") file
4953
4954     `d'
4955           directory
4956
4957     `D'
4958           door (Solaris 2.5 and up)
4959
4960     `l'
4961           symbolic link
4962
4963     `M'
4964           off-line ("migrated") file (Cray DMF)
4965
4966     `n'
4967           network special file (HP-UX)
4968
4969     `p'
4970           FIFO (named pipe)
4971
4972     `P'
4973           port (Solaris 10 and up)
4974
4975     `s'
4976           socket
4977
4978     `?'
4979           some other file type
4980
4981      The file mode bits listed are similar to symbolic mode
4982      specifications (*note Symbolic Modes::).  But `ls' combines
4983      multiple bits into the third character of each set of permissions
4984      as follows:
4985
4986     `s'
4987           If the set-user-ID or set-group-ID bit and the corresponding
4988           executable bit are both set.
4989
4990     `S'
4991           If the set-user-ID or set-group-ID bit is set but the
4992           corresponding executable bit is not set.
4993
4994     `t'
4995           If the restricted deletion flag or sticky bit, and the
4996           other-executable bit, are both set.  The restricted deletion
4997           flag is another name for the sticky bit.  *Note Mode
4998           Structure::.
4999
5000     `T'
5001           If the restricted deletion flag or sticky bit is set but the
5002           other-executable bit is not set.
5003
5004     `x'
5005           If the executable bit is set and none of the above apply.
5006
5007     `-'
5008           Otherwise.
5009
5010      Following the file mode bits is a single character that specifies
5011      whether an alternate access method such as an access control list
5012      applies to the file.  When the character following the file mode
5013      bits is a space, there is no alternate access method.  When it is
5014      a printing character, then there is such a method.
5015
5016      For a file with an extended access control list, a `+' character is
5017      listed.  Basic access control lists are equivalent to the
5018      permissions listed, and are not considered an alternate access
5019      method.
5020
5021 `-n'
5022 `--numeric-uid-gid'
5023      Produce long format directory listings, but display numeric user
5024      and group IDs instead of the owner and group names.
5025
5026 `-o'
5027      Produce long format directory listings, but don't display group
5028      information.  It is equivalent to using `--format=long' with
5029      `--no-group' .
5030
5031 `-s'
5032 `--size'
5033      Print the disk allocation of each file to the left of the file
5034      name.  This is the amount of disk space used by the file, which is
5035      usually a bit more than the file's size, but it can be less if the
5036      file has holes.
5037
5038      Normally the disk allocation is printed in units of 1024 bytes,
5039      but this can be overridden (*note Block size::).
5040
5041      For files that are NFS-mounted from an HP-UX system to a BSD
5042      system, this option reports sizes that are half the correct
5043      values.  On HP-UX systems, it reports sizes that are twice the
5044      correct values for files that are NFS-mounted from BSD systems.
5045      This is due to a flaw in HP-UX; it also affects the HP-UX `ls'
5046      program.
5047
5048 `--si'
5049      Append an SI-style abbreviation to each size, such as `M' for
5050      megabytes.  Powers of 1000 are used, not 1024; `M' stands for
5051      1,000,000 bytes.  This option is equivalent to `--block-size=si'.
5052      Use the `-h' or `--human-readable' option if you prefer powers of
5053      1024.
5054
5055
5056 \1f
5057 File: coreutils.info,  Node: Sorting the output,  Next: More details about version sort,  Prev: What information is listed,  Up: ls invocation
5058
5059 10.1.3 Sorting the output
5060 -------------------------
5061
5062 These options change the order in which `ls' sorts the information it
5063 outputs.  By default, sorting is done by character code (e.g., ASCII
5064 order).
5065
5066 `-c'
5067 `--time=ctime'
5068 `--time=status'
5069      If the long listing format (e.g., `-l', `-o') is being used, print
5070      the status change time (the `ctime' in the inode) instead of the
5071      modification time.  When explicitly sorting by time (`--sort=time'
5072      or `-t') or when not using a long listing format, sort according
5073      to the status change time.
5074
5075 `-f'
5076      Primarily, like `-U'--do not sort; list the files in whatever
5077      order they are stored in the directory.  But also enable `-a' (list
5078      all files) and disable `-l', `--color', and `-s' (if they were
5079      specified before the `-f').
5080
5081 `-r'
5082 `--reverse'
5083      Reverse whatever the sorting method is--e.g., list files in reverse
5084      alphabetical order, youngest first, smallest first, or whatever.
5085
5086 `-S'
5087 `--sort=size'
5088      Sort by file size, largest first.
5089
5090 `-t'
5091 `--sort=time'
5092      Sort by modification time (the `mtime' in the inode), newest first.
5093
5094 `-u'
5095 `--time=atime'
5096 `--time=access'
5097 `--time=use'
5098      If the long listing format (e.g., `--format=long') is being used,
5099      print the last access time (the `atime' in the inode).  When
5100      explicitly sorting by time (`--sort=time' or `-t') or when not
5101      using a long listing format, sort according to the access time.
5102
5103 `-U'
5104 `--sort=none'
5105      Do not sort; list the files in whatever order they are stored in
5106      the directory.  (Do not do any of the other unrelated things that
5107      `-f' does.)  This is especially useful when listing very large
5108      directories, since not doing any sorting can be noticeably faster.
5109
5110 `-v'
5111 `--sort=version'
5112      Sort by version name and number, lowest first.  It behaves like a
5113      default sort, except that each sequence of decimal digits is
5114      treated numerically as an index/version number.  (*Note More
5115      details about version sort::.)
5116
5117 `-X'
5118 `--sort=extension'
5119      Sort directory contents alphabetically by file extension
5120      (characters after the last `.'); files with no extension are
5121      sorted first.
5122
5123
5124 \1f
5125 File: coreutils.info,  Node: More details about version sort,  Next: General output formatting,  Prev: Sorting the output,  Up: ls invocation
5126
5127 10.1.4 More details about version sort
5128 --------------------------------------
5129
5130 The version sort takes into account the fact that file names frequently
5131 include indices or version numbers.  Standard sorting functions usually
5132 do not produce the ordering that people expect because comparisons are
5133 made on a character-by-character basis.  The version sort addresses
5134 this problem, and is especially useful when browsing directories that
5135 contain many files with indices/version numbers in their names:
5136
5137      $ ls -1            $ ls -1v
5138      foo.zml-1.gz       foo.zml-1.gz
5139      foo.zml-100.gz     foo.zml-2.gz
5140      foo.zml-12.gz      foo.zml-6.gz
5141      foo.zml-13.gz      foo.zml-12.gz
5142      foo.zml-2.gz       foo.zml-13.gz
5143      foo.zml-25.gz      foo.zml-25.gz
5144      foo.zml-6.gz       foo.zml-100.gz
5145
5146    Note also that numeric parts with leading zeros are considered as
5147 fractional one:
5148
5149      $ ls -1            $ ls -1v
5150      abc-1.007.tgz      abc-1.007.tgz
5151      abc-1.012b.tgz     abc-1.01a.tgz
5152      abc-1.01a.tgz      abc-1.012b.tgz
5153
5154    This functionality is implemented using the `strverscmp' function.
5155 *Note String/Array Comparison: (libc)String/Array Comparison.  One
5156 result of that implementation decision is that `ls -v' does not use the
5157 locale category, `LC_COLLATE'.  As a result, non-numeric prefixes are
5158 sorted as if `LC_COLLATE' were set to `C'.
5159
5160 \1f
5161 File: coreutils.info,  Node: General output formatting,  Next: Formatting file timestamps,  Prev: More details about version sort,  Up: ls invocation
5162
5163 10.1.5 General output formatting
5164 --------------------------------
5165
5166 These options affect the appearance of the overall output.
5167
5168 `-1'
5169 `--format=single-column'
5170      List one file per line.  This is the default for `ls' when standard
5171      output is not a terminal.
5172
5173 `-C'
5174 `--format=vertical'
5175      List files in columns, sorted vertically.  This is the default for
5176      `ls' if standard output is a terminal.  It is always the default
5177      for the `dir' program.  GNU `ls' uses variable width columns to
5178      display as many files as possible in the fewest lines.
5179
5180 `--color [=WHEN]'
5181      Specify whether to use color for distinguishing file types.  WHEN
5182      may be omitted, or one of:
5183         * none - Do not use color at all.  This is the default.
5184
5185         * auto - Only use color if standard output is a terminal.
5186
5187         * always - Always use color.
5188      Specifying `--color' and no WHEN is equivalent to `--color=always'.
5189      Piping a colorized listing through a pager like `more' or `less'
5190      usually produces unreadable results.  However, using `more -f'
5191      does seem to work.
5192
5193 `-F'
5194 `--classify'
5195 `--indicator-style=classify'
5196      Append a character to each file name indicating the file type.
5197      Also, for regular files that are executable, append `*'.  The file
5198      type indicators are `/' for directories, `@' for symbolic links,
5199      `|' for FIFOs, `=' for sockets, `>' for doors, and nothing for
5200      regular files.  Do not follow symbolic links listed on the command
5201      line unless the `--dereference-command-line' (`-H'),
5202      `--dereference' (`-L'), or
5203      `--dereference-command-line-symlink-to-dir' options are specified.
5204
5205 `--file-type'
5206 `--indicator-style=file-type'
5207      Append a character to each file name indicating the file type.
5208      This is like `-F', except that executables are not marked.
5209
5210 `--indicator-style=WORD'
5211      Append a character indicator with style WORD to entry names, as
5212      follows:
5213
5214     `none'
5215           Do not append any character indicator; this is the default.
5216
5217     `slash'
5218           Append `/' for directories.  This is the same as the `-p'
5219           option.
5220
5221     `file-type'
5222           Append `/' for directories, `@' for symbolic links, `|' for
5223           FIFOs, `=' for sockets, and nothing for regular files.  This
5224           is the same as the `--file-type' option.
5225
5226     `classify'
5227           Append `*' for executable regular files, otherwise behave as
5228           for `file-type'.  This is the same as the `-F' or
5229           `--classify' option.
5230
5231 `-k'
5232      Print file sizes in 1024-byte blocks, overriding the default block
5233      size (*note Block size::).  This option is equivalent to
5234      `--block-size=1K'.
5235
5236 `-m'
5237 `--format=commas'
5238      List files horizontally, with as many as will fit on each line,
5239      separated by `, ' (a comma and a space).
5240
5241 `-p'
5242 `--indicator-style=slash'
5243      Append a `/' to directory names.
5244
5245 `-x'
5246 `--format=across'
5247 `--format=horizontal'
5248      List the files in columns, sorted horizontally.
5249
5250 `-T COLS'
5251 `--tabsize=COLS'
5252      Assume that each tab stop is COLS columns wide.  The default is 8.
5253      `ls' uses tabs where possible in the output, for efficiency.  If
5254      COLS is zero, do not use tabs at all.
5255
5256      Some terminal emulators (at least Apple Terminal 1.5 (133) from
5257      Mac OS X 10.4.8) do not properly align columns to the right of a
5258      TAB following a non-ASCII byte.  If you use such a terminal
5259      emulator, use the `-T0' option or put `TABSIZE=0' in your
5260      environment to tell `ls' to align using spaces, not tabs.
5261
5262 `-w'
5263 `--width=COLS'
5264      Assume the screen is COLS columns wide.  The default is taken from
5265      the terminal settings if possible; otherwise the environment
5266      variable `COLUMNS' is used if it is set; otherwise the default is
5267      80.
5268
5269
5270 \1f
5271 File: coreutils.info,  Node: Formatting file timestamps,  Next: Formatting the file names,  Prev: General output formatting,  Up: ls invocation
5272
5273 10.1.6 Formatting file timestamps
5274 ---------------------------------
5275
5276 By default, file timestamps are listed in abbreviated form.  Most
5277 locales use a timestamp like `2002-03-30 23:45'.  However, the default
5278 POSIX locale uses a date like `Mar 30  2002' for non-recent timestamps,
5279 and a date-without-year and time like `Mar 30 23:45' for recent
5280 timestamps.
5281
5282    A timestamp is considered to be "recent" if it is less than six
5283 months old, and is not dated in the future.  If a timestamp dated today
5284 is not listed in recent form, the timestamp is in the future, which
5285 means you probably have clock skew problems which may break programs
5286 like `make' that rely on file timestamps.
5287
5288    Time stamps are listed according to the time zone rules specified by
5289 the `TZ' environment variable, or by the system default rules if `TZ'
5290 is not set.  *Note Specifying the Time Zone with `TZ': (libc)TZ
5291 Variable.
5292
5293    The following option changes how file timestamps are printed.
5294
5295 `--time-style=STYLE'
5296      List timestamps in style STYLE.  The STYLE should be one of the
5297      following:
5298
5299     `+FORMAT'
5300           List timestamps using FORMAT, where FORMAT is interpreted
5301           like the format argument of `date' (*note date invocation::).
5302           For example, `--time-style="+%Y-%m-%d %H:%M:%S"' causes `ls'
5303           to list timestamps like `2002-03-30 23:45:56'.  As with
5304           `date', FORMAT's interpretation is affected by the `LC_TIME'
5305           locale category.
5306
5307           If FORMAT contains two format strings separated by a newline,
5308           the former is used for non-recent files and the latter for
5309           recent files; if you want output columns to line up, you may
5310           need to insert spaces in one of the two formats.
5311
5312     `full-iso'
5313           List timestamps in full using ISO 8601 date, time, and time
5314           zone format with nanosecond precision, e.g., `2002-03-30
5315           23:45:56.477817180 -0700'.  This style is equivalent to
5316           `+%Y-%m-%d %H:%M:%S.%N %z'.
5317
5318           This is useful because the time output includes all the
5319           information that is available from the operating system.  For
5320           example, this can help explain `make''s behavior, since GNU
5321           `make' uses the full timestamp to determine whether a file is
5322           out of date.
5323
5324     `long-iso'
5325           List ISO 8601 date and time in minutes, e.g., `2002-03-30
5326           23:45'.  These timestamps are shorter than `full-iso'
5327           timestamps, and are usually good enough for everyday work.
5328           This style is equivalent to `+%Y-%m-%d %H:%M'.
5329
5330     `iso'
5331           List ISO 8601 dates for non-recent timestamps (e.g.,
5332           `2002-03-30 '), and ISO 8601 month, day, hour, and minute for
5333           recent timestamps (e.g., `03-30 23:45').  These timestamps
5334           are uglier than `long-iso' timestamps, but they carry nearly
5335           the same information in a smaller space and their brevity
5336           helps `ls' output fit within traditional 80-column output
5337           lines.  The following two `ls' invocations are equivalent:
5338
5339                newline='
5340                '
5341                ls -l --time-style="+%Y-%m-%d $newline%m-%d %H:%M"
5342                ls -l --time-style="iso"
5343
5344     `locale'
5345           List timestamps in a locale-dependent form.  For example, a
5346           Finnish locale might list non-recent timestamps like `maalis
5347           30  2002' and recent timestamps like `maalis 30 23:45'.
5348           Locale-dependent timestamps typically consume more space than
5349           `iso' timestamps and are harder for programs to parse because
5350           locale conventions vary so widely, but they are easier for
5351           many people to read.
5352
5353           The `LC_TIME' locale category specifies the timestamp format.
5354           The default POSIX locale uses timestamps like `Mar 30  2002'
5355           and `Mar 30 23:45'; in this locale, the following two `ls'
5356           invocations are equivalent:
5357
5358                newline='
5359                '
5360                ls -l --time-style="+%b %e  %Y$newline%b %e %H:%M"
5361                ls -l --time-style="locale"
5362
5363           Other locales behave differently.  For example, in a German
5364           locale, `--time-style="locale"' might be equivalent to
5365           `--time-style="+%e. %b %Y $newline%e. %b %H:%M"' and might
5366           generate timestamps like `30. Ma"r 2002 ' and `30. Ma"r
5367           23:45'.
5368
5369     `posix-STYLE'
5370           List POSIX-locale timestamps if the `LC_TIME' locale category
5371           is POSIX, STYLE timestamps otherwise.  For example, the
5372           `posix-long-iso' style lists timestamps like `Mar 30  2002'
5373           and `Mar 30 23:45' when in the POSIX locale, and like
5374           `2002-03-30 23:45' otherwise.
5375
5376    You can specify the default value of the `--time-style' option with
5377 the environment variable `TIME_STYLE'; if `TIME_STYLE' is not set the
5378 default style is `locale'.  GNU Emacs 21.3 and later use the `--dired'
5379 option and therefore can parse any date format, but if you are using
5380 Emacs 21.1 or 21.2 and specify a non-POSIX locale you may need to set
5381 `TIME_STYLE="posix-long-iso"'.
5382
5383    To avoid certain denial-of-service attacks, timestamps that would be
5384 longer than 1000 bytes may be treated as errors.
5385
5386 \1f
5387 File: coreutils.info,  Node: Formatting the file names,  Prev: Formatting file timestamps,  Up: ls invocation
5388
5389 10.1.7 Formatting the file names
5390 --------------------------------
5391
5392 These options change how file names themselves are printed.
5393
5394 `-b'
5395 `--escape'
5396 `--quoting-style=escape'
5397      Quote nongraphic characters in file names using alphabetic and
5398      octal backslash sequences like those used in C.
5399
5400 `-N'
5401 `--literal'
5402 `--quoting-style=literal'
5403      Do not quote file names.  However, with `ls' nongraphic characters
5404      are still printed as question marks if the output is a terminal
5405      and you do not specify the `--show-control-chars' option.
5406
5407 `-q'
5408 `--hide-control-chars'
5409      Print question marks instead of nongraphic characters in file
5410      names.  This is the default if the output is a terminal and the
5411      program is `ls'.
5412
5413 `-Q'
5414 `--quote-name'
5415 `--quoting-style=c'
5416      Enclose file names in double quotes and quote nongraphic
5417      characters as in C.
5418
5419 `--quoting-style=WORD'
5420      Use style WORD to quote file names and other strings that may
5421      contain arbitrary characters.  The WORD should be one of the
5422      following:
5423
5424     `literal'
5425           Output strings as-is; this is the same as the `-N' or
5426           `--literal' option.
5427
5428     `shell'
5429           Quote strings for the shell if they contain shell
5430           metacharacters or would cause ambiguous output.  The quoting
5431           is suitable for POSIX-compatible shells like `bash', but it
5432           does not always work for incompatible shells like `csh'.
5433
5434     `shell-always'
5435           Quote strings for the shell, even if they would normally not
5436           require quoting.
5437
5438     `c'
5439           Quote strings as for C character string literals, including
5440           the surrounding double-quote characters; this is the same as
5441           the `-Q' or `--quote-name' option.
5442
5443     `escape'
5444           Quote strings as for C character string literals, except omit
5445           the surrounding double-quote characters; this is the same as
5446           the `-b' or `--escape' option.
5447
5448     `clocale'
5449           Quote strings as for C character string literals, except use
5450           surrounding quotation marks appropriate for the locale.
5451
5452     `locale'
5453           Quote strings as for C character string literals, except use
5454           surrounding quotation marks appropriate for the locale, and
5455           quote `like this' instead of "like this" in the default C
5456           locale.  This looks nicer on many displays.
5457
5458      You can specify the default value of the `--quoting-style' option
5459      with the environment variable `QUOTING_STYLE'.  If that environment
5460      variable is not set, the default value is `literal', but this
5461      default may change to `shell' in a future version of this package.
5462
5463 `--show-control-chars'
5464      Print nongraphic characters as-is in file names.  This is the
5465      default unless the output is a terminal and the program is `ls'.
5466
5467
5468 \1f
5469 File: coreutils.info,  Node: dir invocation,  Next: vdir invocation,  Prev: ls invocation,  Up: Directory listing
5470
5471 10.2 `dir': Briefly list directory contents
5472 ===========================================
5473
5474 `dir' is equivalent to `ls -C -b'; that is, by default files are listed
5475 in columns, sorted vertically, and special characters are represented
5476 by backslash escape sequences.
5477
5478    *Note `ls': ls invocation.
5479
5480 \1f
5481 File: coreutils.info,  Node: vdir invocation,  Next: dircolors invocation,  Prev: dir invocation,  Up: Directory listing
5482
5483 10.3 `vdir': Verbosely list directory contents
5484 ==============================================
5485
5486 `vdir' is equivalent to `ls -l -b'; that is, by default files are
5487 listed in long format and special characters are represented by
5488 backslash escape sequences.
5489
5490 \1f
5491 File: coreutils.info,  Node: dircolors invocation,  Prev: vdir invocation,  Up: Directory listing
5492
5493 10.4 `dircolors': Color setup for `ls'
5494 ======================================
5495
5496 `dircolors' outputs a sequence of shell commands to set up the terminal
5497 for color output from `ls' (and `dir', etc.).  Typical usage:
5498
5499      eval "`dircolors [OPTION]... [FILE]`"
5500
5501    If FILE is specified, `dircolors' reads it to determine which colors
5502 to use for which file types and extensions.  Otherwise, a precompiled
5503 database is used.  For details on the format of these files, run
5504 `dircolors --print-database'.
5505
5506    The output is a shell command to set the `LS_COLORS' environment
5507 variable.  You can specify the shell syntax to use on the command line,
5508 or `dircolors' will guess it from the value of the `SHELL' environment
5509 variable.
5510
5511    The program accepts the following options.  Also see *Note Common
5512 options::.
5513
5514 `-b'
5515 `--sh'
5516 `--bourne-shell'
5517      Output Bourne shell commands.  This is the default if the `SHELL'
5518      environment variable is set and does not end with `csh' or `tcsh'.
5519
5520 `-c'
5521 `--csh'
5522 `--c-shell'
5523      Output C shell commands.  This is the default if `SHELL' ends with
5524      `csh' or `tcsh'.
5525
5526 `-p'
5527 `--print-database'
5528      Print the (compiled-in) default color configuration database.  This
5529      output is itself a valid configuration file, and is fairly
5530      descriptive of the possibilities.
5531
5532
5533    An exit status of zero indicates success, and a nonzero value
5534 indicates failure.
5535
5536 \1f
5537 File: coreutils.info,  Node: Basic operations,  Next: Special file types,  Prev: Directory listing,  Up: Top
5538
5539 11 Basic operations
5540 *******************
5541
5542 This chapter describes the commands for basic file manipulation:
5543 copying, moving (renaming), and deleting (removing).
5544
5545 * Menu:
5546
5547 * cp invocation::               Copy files.
5548 * dd invocation::               Convert and copy a file.
5549 * install invocation::          Copy files and set attributes.
5550 * mv invocation::               Move (rename) files.
5551 * rm invocation::               Remove files or directories.
5552 * shred invocation::            Remove files more securely.
5553
5554 \1f
5555 File: coreutils.info,  Node: cp invocation,  Next: dd invocation,  Up: Basic operations
5556
5557 11.1 `cp': Copy files and directories
5558 =====================================
5559
5560 `cp' copies files (or, optionally, directories).  The copy is
5561 completely independent of the original.  You can either copy one file to
5562 another, or copy arbitrarily many files to a destination directory.
5563 Synopses:
5564
5565      cp [OPTION]... [-T] SOURCE DEST
5566      cp [OPTION]... SOURCE... DIRECTORY
5567      cp [OPTION]... -t DIRECTORY SOURCE...
5568
5569    * If two file names are given, `cp' copies the first file to the
5570      second.
5571
5572    * If the `--target-directory' (`-t') option is given, or failing
5573      that if the last file is a directory and the
5574      `--no-target-directory' (`-T') option is not given, `cp' copies
5575      each SOURCE file to the specified directory, using the SOURCEs'
5576      names.
5577
5578    Generally, files are written just as they are read.  For exceptions,
5579 see the `--sparse' option below.
5580
5581    By default, `cp' does not copy directories.  However, the `-R',
5582 `-a', and `-r' options cause `cp' to copy recursively by descending
5583 into source directories and copying files to corresponding destination
5584 directories.
5585
5586    By default, `cp' follows symbolic links only when not copying
5587 recursively.  This default can be overridden with the `--archive'
5588 (`-a'), `-d', `--dereference' (`-L'), `--no-dereference' (`-P'), and
5589 `-H' options.  If more than one of these options is specified, the last
5590 one silently overrides the others.
5591
5592    By default, `cp' copies the contents of special files only when not
5593 copying recursively.  This default can be overridden with the
5594 `--copy-contents' option.
5595
5596    `cp' generally refuses to copy a file onto itself, with the
5597 following exception: if `--force --backup' is specified with SOURCE and
5598 DEST identical, and referring to a regular file, `cp' will make a
5599 backup file, either regular or numbered, as specified in the usual ways
5600 (*note Backup options::).  This is useful when you simply want to make
5601 a backup of an existing file before changing it.
5602
5603    The program accepts the following options.  Also see *Note Common
5604 options::.
5605
5606 `-a'
5607 `--archive'
5608      Preserve as much as possible of the structure and attributes of the
5609      original files in the copy (but do not attempt to preserve internal
5610      directory structure; i.e., `ls -U' may list the entries in a copied
5611      directory in a different order).  Equivalent to `-dpPR'.
5612
5613 `-b'
5614 `--backup[=METHOD]'
5615      *Note Backup options::.  Make a backup of each file that would
5616      otherwise be overwritten or removed.  As a special case, `cp'
5617      makes a backup of SOURCE when the force and backup options are
5618      given and SOURCE and DEST are the same name for an existing,
5619      regular file.  One useful application of this combination of
5620      options is this tiny Bourne shell script:
5621
5622           #!/bin/sh
5623           # Usage: backup FILE...
5624           # Create a GNU-style backup of each listed FILE.
5625           for i; do
5626             cp --backup --force -- "$i" "$i"
5627           done
5628
5629 `--copy-contents'
5630      If copying recursively, copy the contents of any special files
5631      (e.g., FIFOs and device files) as if they were regular files.
5632      This means trying to read the data in each source file and writing
5633      it to the destination.  It is usually a mistake to use this
5634      option, as it normally has undesirable effects on special files
5635      like FIFOs and the ones typically found in the `/dev' directory.
5636      In most cases, `cp -R --copy-contents' will hang indefinitely
5637      trying to read from FIFOs and special files like `/dev/console',
5638      and it will fill up your destination disk if you use it to copy
5639      `/dev/zero'.  This option has no effect unless copying
5640      recursively, and it does not affect the copying of symbolic links.
5641
5642 `-d'
5643      Copy symbolic links as symbolic links rather than copying the
5644      files that they point to, and preserve hard links between source
5645      files in the copies.  Equivalent to `--no-dereference
5646      --preserve=links'.
5647
5648 `-f'
5649 `--force'
5650      When copying without this option and an existing destination file
5651      cannot be opened for writing, the copy fails.  However, with
5652      `--force'), when a destination file cannot be opened, `cp' then
5653      unlinks it and tries to open it again.  Contrast this behavior
5654      with that enabled by `--link' and `--symbolic-link', whereby the
5655      destination file is never opened but rather is unlinked
5656      unconditionally.  Also see the description of
5657      `--remove-destination'.
5658
5659      This option is independent of the `--interactive' or `-i' option:
5660      neither cancels the effect of the other.
5661
5662 `-H'
5663      If a command line argument specifies a symbolic link, then copy the
5664      file it points to rather than the symbolic link itself.  However,
5665      copy (preserving its nature) any symbolic link that is encountered
5666      via recursive traversal.
5667
5668 `-i'
5669 `--interactive'
5670      When copying a file other than a directory, prompt whether to
5671      overwrite an existing destination file.
5672
5673 `-l'
5674 `--link'
5675      Make hard links instead of copies of non-directories.
5676
5677 `-L'
5678 `--dereference'
5679      Always follow symbolic links.
5680
5681 `-P'
5682 `--no-dereference'
5683      Copy symbolic links as symbolic links rather than copying the
5684      files that they point to.
5685
5686 `-p'
5687 `--preserve[=ATTRIBUTE_LIST]'
5688      Preserve the specified attributes of the original files.  If
5689      specified, the ATTRIBUTE_LIST must be a comma-separated list of
5690      one or more of the following strings:
5691
5692     `mode'
5693           Preserve the file mode bits and access control lists.
5694
5695     `ownership'
5696           Preserve the owner and group.  On most modern systems, only
5697           users with appropriate privileges may change the owner of a
5698           file, and ordinary users may preserve the group ownership of
5699           a file only if they happen to be a member of the desired
5700           group.
5701
5702     `timestamps'
5703           Preserve the times of last access and last modification, when
5704           possible.  In general, it is not possible to preserve these
5705           attributes when the affected file is a symbolic link.
5706           However, FreeBSD now provides the `lutimes' function, which
5707           makes it possibile even for symbolic links.  However, this
5708           implementation does not yet take advantage of that.
5709
5710     `links'
5711           Preserve in the destination files any links between
5712           corresponding source files.
5713
5714     `all'
5715           Preserve all file attributes.  Equivalent to specifying all
5716           of the above.
5717
5718      Using `--preserve' with no ATTRIBUTE_LIST is equivalent to
5719      `--preserve=mode,ownership,timestamps'.
5720
5721      In the absence of this option, each destination file is created
5722      with the mode bits of the corresponding source file, minus the
5723      bits set in the umask and minus the set-user-ID and set-group-ID
5724      bits.  *Note File permissions::.
5725
5726 `--no-preserve=ATTRIBUTE_LIST'
5727      Do not preserve the specified attributes.  The ATTRIBUTE_LIST has
5728      the same form as for `--preserve'.
5729
5730 `--parents'
5731      Form the name of each destination file by appending to the target
5732      directory a slash and the specified name of the source file.  The
5733      last argument given to `cp' must be the name of an existing
5734      directory.  For example, the command:
5735
5736           cp --parents a/b/c existing_dir
5737
5738      copies the file `a/b/c' to `existing_dir/a/b/c', creating any
5739      missing intermediate directories.
5740
5741 `--reply=HOW'
5742      *Deprecated: to be removed in 2008.*
5743      Using `--reply=yes' makes `cp' act as if `yes' were given as a
5744      response to every prompt about a destination file.  That
5745      effectively cancels any preceding `--interactive' or `-i' option.
5746      Specify `--reply=no' to make `cp' act as if `no' were given as a
5747      response to every prompt about a destination file.  Specify
5748      `--reply=query' to make `cp' prompt the user about each existing
5749      destination file.
5750
5751 `-R'
5752 `-r'
5753 `--recursive'
5754      Copy directories recursively.  Symbolic links are not followed by
5755      default; see the `--archive' (`-a'), `-d', `--dereference' (`-L'),
5756      `--no-dereference' (`-P'), and `-H' options.  Special files are
5757      copied by creating a destination file of the same type as the
5758      source; see the `--copy-contents' option.  It is not portable to
5759      use `-r' to copy symbolic links or special files.  On some non-GNU
5760      systems, `-r' implies the equivalent of `-L' and `--copy-contents'
5761      for historical reasons.  Also, it is not portable to use `-R' to
5762      copy symbolic links unless you also specify `-P', as POSIX allows
5763      implementations that dereference symbolic links by default.
5764
5765 `--remove-destination'
5766      Remove each existing destination file before attempting to open it
5767      (contrast with `-f' above).
5768
5769 `--sparse=WHEN'
5770      A "sparse file" contains "holes"--a sequence of zero bytes that
5771      does not occupy any physical disk blocks; the `read' system call
5772      reads these as zeros.  This can both save considerable disk space
5773      and increase speed, since many binary files contain lots of
5774      consecutive zero bytes.  By default, `cp' detects holes in input
5775      source files via a crude heuristic and makes the corresponding
5776      output file sparse as well.  Only regular files may be sparse.
5777
5778      The WHEN value can be one of the following:
5779
5780     `auto'
5781           The default behavior: if the input file is sparse, attempt to
5782           make the output file sparse, too.  However, if an output file
5783           exists but refers to a non-regular file, then do not attempt
5784           to make it sparse.
5785
5786     `always'
5787           For each sufficiently long sequence of zero bytes in the
5788           input file, attempt to create a corresponding hole in the
5789           output file, even if the input file does not appear to be
5790           sparse.  This is useful when the input file resides on a file
5791           system that does not support sparse files (for example,
5792           `efs' file systems in SGI IRIX 5.3 and earlier), but the
5793           output file is on a type of file system that does support
5794           them.  Holes may be created only in regular files, so if the
5795           destination file is of some other type, `cp' does not even
5796           try to make it sparse.
5797
5798     `never'
5799           Never make the output file sparse.  This is useful in
5800           creating a file for use with the `mkswap' command, since such
5801           a file must not have any holes.
5802
5803 `--strip-trailing-slashes'
5804      Remove any trailing slashes from each SOURCE argument.  *Note
5805      Trailing slashes::.
5806
5807 `-s'
5808 `--symbolic-link'
5809      Make symbolic links instead of copies of non-directories.  All
5810      source file names must be absolute (starting with `/') unless the
5811      destination files are in the current directory.  This option merely
5812      results in an error message on systems that do not support
5813      symbolic links.
5814
5815 `-S SUFFIX'
5816 `--suffix=SUFFIX'
5817      Append SUFFIX to each backup file made with `-b'.  *Note Backup
5818      options::.
5819
5820 `-t DIRECTORY'
5821 `--target-directory=DIRECTORY'
5822      Specify the destination DIRECTORY.  *Note Target directory::.
5823
5824 `-T'
5825 `--no-target-directory'
5826      Do not treat the last operand specially when it is a directory or a
5827      symbolic link to a directory.  *Note Target directory::.
5828
5829 `-u'
5830 `--update'
5831      Do not copy a non-directory that has an existing destination with
5832      the same or newer modification time.  If time stamps are being
5833      preserved, the comparison is to the source time stamp truncated to
5834      the resolutions of the destination file system and of the system
5835      calls used to update time stamps; this avoids duplicate work if
5836      several `cp -pu' commands are executed with the same source and
5837      destination.
5838
5839 `-v'
5840 `--verbose'
5841      Print the name of each file before copying it.
5842
5843 `-x'
5844 `--one-file-system'
5845      Skip subdirectories that are on different file systems from the
5846      one that the copy started on.  However, mount point directories
5847      _are_ copied.
5848
5849
5850    An exit status of zero indicates success, and a nonzero value
5851 indicates failure.
5852
5853 \1f
5854 File: coreutils.info,  Node: dd invocation,  Next: install invocation,  Prev: cp invocation,  Up: Basic operations
5855
5856 11.2 `dd': Convert and copy a file
5857 ==================================
5858
5859 `dd' copies a file (from standard input to standard output, by default)
5860 with a changeable I/O block size, while optionally performing
5861 conversions on it.  Synopses:
5862
5863      dd [OPERAND]...
5864      dd OPTION
5865
5866    The only options are `--help' and `--version'.  *Note Common
5867 options::.  `dd' accepts the following operands.
5868
5869 `if=FILE'
5870      Read from FILE instead of standard input.
5871
5872 `of=FILE'
5873      Write to FILE instead of standard output.  Unless `conv=notrunc'
5874      is given, `dd' truncates FILE to zero bytes (or the size specified
5875      with `seek=').
5876
5877 `ibs=BYTES'
5878      Set the input block size to BYTES.  This makes `dd' read BYTES per
5879      block.
5880
5881 `obs=BYTES'
5882      Set the output block size to BYTES.  This makes `dd' write BYTES
5883      per block.
5884
5885 `bs=BYTES'
5886      Set both input and output block sizes to BYTES.  This makes `dd'
5887      read and write BYTES per block, overriding any `ibs' and `obs'
5888      settings.
5889
5890 `cbs=BYTES'
5891      Set the conversion block size to BYTES.  When converting
5892      variable-length records to fixed-length ones (`conv=block') or the
5893      reverse (`conv=unblock'), use BYTES as the fixed record length.
5894
5895 `skip=BLOCKS'
5896      Skip BLOCKS `ibs'-byte blocks in the input file before copying.
5897
5898 `seek=BLOCKS'
5899      Skip BLOCKS `obs'-byte blocks in the output file before copying.
5900
5901 `count=BLOCKS'
5902      Copy BLOCKS `ibs'-byte blocks from the input file, instead of
5903      everything until the end of the file.
5904
5905 `conv=CONVERSION[,CONVERSION]...'
5906      Convert the file as specified by the CONVERSION argument(s).  (No
5907      spaces around any comma(s).)
5908
5909      Conversions:
5910
5911     `ascii'
5912           Convert EBCDIC to ASCII, using the conversion table specified
5913           by POSIX.  This provides a 1:1 translation for all 256 bytes.
5914
5915     `ebcdic'
5916           Convert ASCII to EBCDIC.  This is the inverse of the `ascii'
5917           conversion.
5918
5919     `ibm'
5920           Convert ASCII to alternate EBCDIC, using the alternate
5921           conversion table specified by POSIX.  This is not a 1:1
5922           translation, but reflects common historical practice for `~',
5923           `[', and `]'.
5924
5925           The `ascii', `ebcdic', and `ibm' conversions are mutually
5926           exclusive.
5927
5928     `block'
5929           For each line in the input, output `cbs' bytes, replacing the
5930           input newline with a space and padding with spaces as
5931           necessary.
5932
5933     `unblock'
5934           Replace trailing spaces in each `cbs'-sized input block with a
5935           newline.
5936
5937           The `block' and `unblock' conversions are mutually exclusive.
5938
5939     `lcase'
5940           Change uppercase letters to lowercase.
5941
5942     `ucase'
5943           Change lowercase letters to uppercase.
5944
5945           The `lcase' and `ucase' conversions are mutually exclusive.
5946
5947     `swab'
5948           Swap every pair of input bytes.  GNU `dd', unlike others,
5949           works when an odd number of bytes are read--the last byte is
5950           simply copied (since there is nothing to swap it with).
5951
5952     `noerror'
5953           Continue after read errors.
5954
5955     `nocreat'
5956           Do not create the output file; the output file must already
5957           exist.
5958
5959     `excl'
5960           Fail if the output file already exists; `dd' must create the
5961           output file itself.
5962
5963           The `excl' and `nocreat' conversions are mutually exclusive.
5964
5965     `notrunc'
5966           Do not truncate the output file.
5967
5968     `sync'
5969           Pad every input block to size of `ibs' with trailing zero
5970           bytes.  When used with `block' or `unblock', pad with spaces
5971           instead of zero bytes.
5972
5973     `fdatasync'
5974           Synchronize output data just before finishing.  This forces a
5975           physical write of output data.
5976
5977     `fsync'
5978           Synchronize output data and metadata just before finishing.
5979           This forces a physical write of output data and metadata.
5980
5981
5982 `iflag=FLAG[,FLAG]...'
5983      Access the input file using the flags specified by the FLAG
5984      argument(s).  (No spaces around any comma(s).)
5985
5986 `oflag=FLAG[,FLAG]...'
5987      Access the output file using the flags specified by the FLAG
5988      argument(s).  (No spaces around any comma(s).)
5989
5990      Here are the flags.  Not every flag is supported on every operating
5991      system.
5992
5993     `append'
5994           Write in append mode, so that even if some other process is
5995           writing to this file, every `dd' write will append to the
5996           current contents of the file.  This flag makes sense only for
5997           output.  If you combine this flag with the `of=FILE' operand,
5998           you should also specify `conv=notrunc' unless you want the
5999           output file to be truncated before being appended to.
6000
6001     `direct'
6002           Use direct I/O for data, avoiding the buffer cache.
6003
6004     `directory'
6005           Fail unless the file is a directory.  Most operating systems
6006           do not allow I/O to a directory, so this flag has limited
6007           utility.
6008
6009     `dsync'
6010           Use synchronized I/O for data.  For the output file, this
6011           forces a physical write of output data on each write.  For
6012           the input file, this flag can matter when reading from a
6013           remote file that has been written to synchronously by some
6014           other process.  Metadata (e.g., last-access and last-modified
6015           time) is not necessarily synchronized.
6016
6017     `sync'
6018           Use synchronized I/O for both data and metadata.
6019
6020     `nonblock'
6021           Use non-blocking I/O.
6022
6023     `noatime'
6024           Do not update the file's access time.  Some older file
6025           systems silently ignore this flag, so it is a good idea to
6026           test it on your files before relying on it.
6027
6028     `noctty'
6029           Do not assign the file to be a controlling terminal for `dd'.
6030           This has no effect when the file is not a terminal.  On many
6031           hosts (e.g., GNU/Linux hosts), this option has no effect at
6032           all.
6033
6034     `nofollow'
6035           Do not follow symbolic links.
6036
6037     `nolinks'
6038           Fail if the file has multiple hard links.
6039
6040     `binary'
6041           Use binary I/O.  This option has an effect only on nonstandard
6042           platforms that distinguish binary from text I/O.
6043
6044     `text'
6045           Use text I/O.  Like `binary', this option has no effect on
6046           standard platforms.
6047
6048
6049      These flags are not supported on all systems, and `dd' rejects
6050      attempts to use them when they are not supported.  When reading
6051      from standard input or writing to standard output, the `nofollow'
6052      and `noctty' flags should not be specified, and the other flags
6053      (e.g., `nonblock') can affect how other processes behave with the
6054      affected file descriptors, even after `dd' exits.
6055
6056
6057    The numeric-valued strings above (BYTES and BLOCKS) can be followed
6058 by a multiplier: `b'=512, `c'=1, `w'=2, `xM'=M, or any of the standard
6059 block size suffixes like `k'=1024 (*note Block size::).
6060
6061    Use different `dd' invocations to use different block sizes for
6062 skipping and I/O.  For example, the following shell commands copy data
6063 in 512 KiB blocks between a disk and a tape, but do not save or restore
6064 a 4 KiB label at the start of the disk:
6065
6066      disk=/dev/rdsk/c0t1d0s2
6067      tape=/dev/rmt/0
6068
6069      # Copy all but the label from disk to tape.
6070      (dd bs=4k skip=1 count=0 && dd bs=512k) <$disk >$tape
6071
6072      # Copy from tape back to disk, but leave the disk label alone.
6073      (dd bs=4k seek=1 count=0 && dd bs=512k) <$tape >$disk
6074
6075    Sending an `INFO' signal to a running `dd' process makes it print
6076 I/O statistics to standard error and then resume copying.  In the
6077 example below, `dd' is run in the background to copy 10 million blocks.
6078 The `kill' command makes it output intermediate I/O statistics, and
6079 when `dd' completes, it outputs the final statistics.
6080
6081      $ dd if=/dev/zero of=/dev/null count=10MB & pid=$!
6082      $ kill -s INFO $pid; wait $pid
6083      3385223+0 records in
6084      3385223+0 records out
6085      1733234176 bytes (1.7 GB) copied, 6.42173 seconds, 270 MB/s
6086      10000000+0 records in
6087      10000000+0 records out
6088      5120000000 bytes (5.1 GB) copied, 18.913 seconds, 271 MB/s
6089
6090    On systems lacking the `INFO' signal `dd' responds to the `USR1'
6091 signal instead, unless the `POSIXLY_CORRECT' environment variable is
6092 set.
6093
6094    An exit status of zero indicates success, and a nonzero value
6095 indicates failure.
6096
6097 \1f
6098 File: coreutils.info,  Node: install invocation,  Next: mv invocation,  Prev: dd invocation,  Up: Basic operations
6099
6100 11.3 `install': Copy files and set attributes
6101 =============================================
6102
6103 `install' copies files while setting their file mode bits and, if
6104 possible, their owner and group.  Synopses:
6105
6106      install [OPTION]... [-T] SOURCE DEST
6107      install [OPTION]... SOURCE... DIRECTORY
6108      install [OPTION]... -t DIRECTORY SOURCE...
6109      install [OPTION]... -d DIRECTORY...
6110
6111    * If two file names are given, `install' copies the first file to the
6112      second.
6113
6114    * If the `--target-directory' (`-t') option is given, or failing
6115      that if the last file is a directory and the
6116      `--no-target-directory' (`-T') option is not given, `install'
6117      copies each SOURCE file to the specified directory, using the
6118      SOURCEs' names.
6119
6120    * If the `--directory' (`-d') option is given, `install' creates
6121      each DIRECTORY and any missing parent directories.  Parent
6122      directories are created with mode `u=rwx,go=rx' (755), regardless
6123      of the `-m' option or the current umask.  *Note Directory Setuid
6124      and Setgid::, for how the set-user-ID and set-group-ID bits of
6125      parent directories are inherited.
6126
6127    `install' is similar to `cp', but allows you to control the
6128 attributes of destination files.  It is typically used in Makefiles to
6129 copy programs into their destination directories.  It refuses to copy
6130 files onto themselves.
6131
6132    The program accepts the following options.  Also see *Note Common
6133 options::.
6134
6135 `-b'
6136 `--backup[=METHOD]'
6137      *Note Backup options::.  Make a backup of each file that would
6138      otherwise be overwritten or removed.
6139
6140 `-c'
6141      Ignored; for compatibility with old Unix versions of `install'.
6142
6143 `-d'
6144 `--directory'
6145      Create any missing parent directories, giving them the default
6146      attributes.  Then create each given directory, setting their owner,
6147      group and mode as given on the command line or to the defaults.
6148
6149 `-g GROUP'
6150 `--group=GROUP'
6151      Set the group ownership of installed files or directories to
6152      GROUP.  The default is the process's current group.  GROUP may be
6153      either a group name or a numeric group ID.
6154
6155 `-m MODE'
6156 `--mode=MODE'
6157      Set the file mode bits for the installed file or directory to MODE,
6158      which can be either an octal number, or a symbolic mode as in
6159      `chmod', with `a=' (no access allowed to anyone) as the point of
6160      departure (*note File permissions::).  The default mode is
6161      `u=rwx,go=rx,a-s'--read, write, and execute for the owner, read
6162      and execute for group and other, and with set-user-ID and
6163      set-group-ID disabled.  This default is not quite the same as
6164      `755', since it disables instead of preserving set-user-ID and
6165      set-group-ID on directories.  *Note Directory Setuid and Setgid::.
6166
6167 `-o OWNER'
6168 `--owner=OWNER'
6169      If `install' has appropriate privileges (is run as root), set the
6170      ownership of installed files or directories to OWNER.  The default
6171      is `root'.  OWNER may be either a user name or a numeric user ID.
6172
6173 `-p'
6174 `--preserve-timestamps'
6175      Set the time of last access and the time of last modification of
6176      each installed file to match those of each corresponding original
6177      file.  When a file is installed without this option, its last
6178      access and last modification times are both set to the time of
6179      installation.  This option is useful if you want to use the last
6180      modification times of installed files to keep track of when they
6181      were last built as opposed to when they were last installed.
6182
6183 `-s'
6184 `--strip'
6185      Strip the symbol tables from installed binary executables.
6186
6187 `-S SUFFIX'
6188 `--suffix=SUFFIX'
6189      Append SUFFIX to each backup file made with `-b'.  *Note Backup
6190      options::.
6191
6192 `-t DIRECTORY'
6193 `--target-directory=DIRECTORY'
6194      Specify the destination DIRECTORY.  *Note Target directory::.
6195
6196 `-T'
6197 `--no-target-directory'
6198      Do not treat the last operand specially when it is a directory or a
6199      symbolic link to a directory.  *Note Target directory::.
6200
6201 `-v'
6202 `--verbose'
6203      Print the name of each file before copying it.
6204
6205
6206    An exit status of zero indicates success, and a nonzero value
6207 indicates failure.
6208
6209 \1f
6210 File: coreutils.info,  Node: mv invocation,  Next: rm invocation,  Prev: install invocation,  Up: Basic operations
6211
6212 11.4 `mv': Move (rename) files
6213 ==============================
6214
6215 `mv' moves or renames files (or directories).  Synopses:
6216
6217      mv [OPTION]... [-T] SOURCE DEST
6218      mv [OPTION]... SOURCE... DIRECTORY
6219      mv [OPTION]... -t DIRECTORY SOURCE...
6220
6221    * If two file names are given, `mv' moves the first file to the
6222      second.
6223
6224    * If the `--target-directory' (`-t') option is given, or failing
6225      that if the last file is a directory and the
6226      `--no-target-directory' (`-T') option is not given, `mv' moves
6227      each SOURCE file to the specified directory, using the SOURCEs'
6228      names.
6229
6230    `mv' can move any type of file from one file system to another.
6231 Prior to version `4.0' of the fileutils, `mv' could move only regular
6232 files between file systems.  For example, now `mv' can move an entire
6233 directory hierarchy including special device files from one partition
6234 to another.  It first uses some of the same code that's used by `cp -a'
6235 to copy the requested directories and files, then (assuming the copy
6236 succeeded) it removes the originals.  If the copy fails, then the part
6237 that was copied to the destination partition is removed.  If you were
6238 to copy three directories from one partition to another and the copy of
6239 the first directory succeeded, but the second didn't, the first would
6240 be left on the destination partition and the second and third would be
6241 left on the original partition.
6242
6243    If a destination file exists but is normally unwritable, standard
6244 input is a terminal, and the `-f' or `--force' option is not given,
6245 `mv' prompts the user for whether to replace the file.  (You might own
6246 the file, or have write permission on its directory.)  If the response
6247 is not affirmative, the file is skipped.
6248
6249    _Warning_: If you try to move a symlink that points to a directory,
6250 and you specify the symlink with a trailing slash, then `mv' doesn't
6251 move the symlink but instead moves the directory referenced by the
6252 symlink.  *Note Trailing slashes::.
6253
6254    The program accepts the following options.  Also see *Note Common
6255 options::.
6256
6257 `-b'
6258 `--backup[=METHOD]'
6259      *Note Backup options::.  Make a backup of each file that would
6260      otherwise be overwritten or removed.
6261
6262 `-f'
6263 `--force'
6264      Do not prompt the user before removing a destination file.
6265
6266 `-i'
6267 `--interactive'
6268      Prompt whether to overwrite each existing destination file,
6269      regardless of its permissions.  If the response is not
6270      affirmative, the file is skipped.
6271
6272 `--reply=HOW'
6273      *Deprecated: to be removed in 2008.*
6274      Specifying `--reply=yes' is equivalent to using `--force'.
6275      Specify `--reply=no' to make `mv' act as if `no' were given as a
6276      response to every prompt about a destination file.  Specify
6277      `--reply=query' to make `mv' prompt the user about each existing
6278      destination file.  Note that `--reply=no' has an effect only when
6279      `mv' would prompt without `-i' or equivalent, i.e., when a
6280      destination file exists and is not writable, standard input is a
6281      terminal, and no `-f' (or equivalent) option is specified.
6282
6283 `-u'
6284 `--update'
6285      Do not move a non-directory that has an existing destination with
6286      the same or newer modification time.  If the move is across file
6287      system boundaries, the comparison is to the source time stamp
6288      truncated to the resolutions of the destination file system and of
6289      the system calls used to update time stamps; this avoids duplicate
6290      work if several `mv -u' commands are executed with the same source
6291      and destination.
6292
6293 `-v'
6294 `--verbose'
6295      Print the name of each file before moving it.
6296
6297 `--strip-trailing-slashes'
6298      Remove any trailing slashes from each SOURCE argument.  *Note
6299      Trailing slashes::.
6300
6301 `-S SUFFIX'
6302 `--suffix=SUFFIX'
6303      Append SUFFIX to each backup file made with `-b'.  *Note Backup
6304      options::.
6305
6306 `-t DIRECTORY'
6307 `--target-directory=DIRECTORY'
6308      Specify the destination DIRECTORY.  *Note Target directory::.
6309
6310 `-T'
6311 `--no-target-directory'
6312      Do not treat the last operand specially when it is a directory or a
6313      symbolic link to a directory.  *Note Target directory::.
6314
6315
6316    An exit status of zero indicates success, and a nonzero value
6317 indicates failure.
6318
6319 \1f
6320 File: coreutils.info,  Node: rm invocation,  Next: shred invocation,  Prev: mv invocation,  Up: Basic operations
6321
6322 11.5 `rm': Remove files or directories
6323 ======================================
6324
6325 `rm' removes each given FILE.  By default, it does not remove
6326 directories.  Synopsis:
6327
6328      rm [OPTION]... [FILE]...
6329
6330    If the `-I' or `--interactive=once' option is given, and there are
6331 more than three files or the `-r', `-R', or `--recursive' are given,
6332 then `rm' prompts the user for whether to proceed with the entire
6333 operation.  If the response is not affirmative, the entire command is
6334 aborted.
6335
6336    Otherwise, if a file is unwritable, standard input is a terminal, and
6337 the `-f' or `--force' option is not given, or the `-i' or
6338 `--interactive=always' option _is_ given, `rm' prompts the user for
6339 whether to remove the file.  If the response is not affirmative, the
6340 file is skipped.
6341
6342    Any attempt to remove a file whose last file name component is `.'
6343 or `..' is rejected without any prompting.
6344
6345    _Warning_: If you use `rm' to remove a file, it is usually possible
6346 to recover the contents of that file.  If you want more assurance that
6347 the contents are truly unrecoverable, consider using `shred'.
6348
6349    The program accepts the following options.  Also see *Note Common
6350 options::.
6351
6352 `-f'
6353 `--force'
6354      Ignore nonexistent files and never prompt the user.  Ignore any
6355      previous `--interactive' (`-i') option.
6356
6357 `-i'
6358      Prompt whether to remove each file.  If the response is not
6359      affirmative, the file is skipped.  Ignore any previous `--force'
6360      (`-f') option.  Equivalent to `--interactive=always'.
6361
6362 `-I'
6363      Prompt once whether to proceed with the command, if more than three
6364      files are named or if a recursive removal is requested.  Ignore any
6365      previous `--force' (`-f') option.  Equivalent to
6366      `--interactive=once'.
6367
6368 `--interactive [=WHEN]'
6369      Specify when to issue an interactive prompt.  WHEN may be omitted,
6370      or one of:
6371         * never - Do not prompt at all.
6372
6373         * once - Prompt once if more than three files are named or if a
6374           recursive removal is requested.  Equivalent to `-I'.
6375
6376         * always - Prompt for every file being removed.  Equivalent to
6377           `-i'.
6378      Specifying `--interactive' and no WHEN is equivalent to
6379      `--interactive=always'.
6380
6381 `--one-file-system'
6382      When removing a hierarchy recursively, skip any directory that is
6383      on a file system different from that of the corresponding command
6384      line argument.
6385
6386      This option is useful when removing a build "chroot" hierarchy,
6387      which normally contains no valuable data.  However, it is not
6388      uncommon to bind-mount `/home' into such a hierarchy, to make it
6389      easier to use one's start-up file.  The catch is that it's easy to
6390      forget to unmount `/home'.  Then, when you use `rm -rf' to remove
6391      your normally throw-away chroot, that command will remove
6392      everything under `/home', too.  Use the `--one-file-system'
6393      option, and it will warn about and skip directories on other file
6394      systems.  Of course, this will not save your `/home' if it and your
6395      chroot happen to be on the same file system.
6396
6397 `--preserve-root'
6398      Fail upon any attempt to remove the root directory, `/', when used
6399      with the `--recursive' option.  This is the default behavior.
6400      *Note Treating / specially::.
6401
6402 `--no-preserve-root'
6403      Do not treat `/' specially when removing recursively.  This option
6404      is not recommended unless you really want to remove all the files
6405      on your computer.  *Note Treating / specially::.
6406
6407 `-r'
6408 `-R'
6409 `--recursive'
6410      Remove the listed directories and their contents recursively.
6411
6412 `-v'
6413 `--verbose'
6414      Print the name of each file before removing it.
6415
6416
6417    One common question is how to remove files whose names begin with a
6418 `-'.  GNU `rm', like every program that uses the `getopt' function to
6419 parse its arguments, lets you use the `--' option to indicate that all
6420 following arguments are non-options.  To remove a file called `-f' in
6421 the current directory, you could type either:
6422
6423      rm -- -f
6424
6425 or:
6426
6427      rm ./-f
6428
6429    The Unix `rm' program's use of a single `-' for this purpose
6430 predates the development of the getopt standard syntax.
6431
6432    An exit status of zero indicates success, and a nonzero value
6433 indicates failure.
6434
6435 \1f
6436 File: coreutils.info,  Node: shred invocation,  Prev: rm invocation,  Up: Basic operations
6437
6438 11.6 `shred': Remove files more securely
6439 ========================================
6440
6441 `shred' overwrites devices or files, to help prevent even very
6442 expensive hardware from recovering the data.
6443
6444    Ordinarily when you remove a file (*note rm invocation::), the data
6445 is not actually destroyed.  Only the index listing where the file is
6446 stored is destroyed, and the storage is made available for reuse.
6447 There are undelete utilities that will attempt to reconstruct the index
6448 and can bring the file back if the parts were not reused.
6449
6450    On a busy system with a nearly-full drive, space can get reused in a
6451 few seconds.  But there is no way to know for sure.  If you have
6452 sensitive data, you may want to be sure that recovery is not possible
6453 by actually overwriting the file with non-sensitive data.
6454
6455    However, even after doing that, it is possible to take the disk back
6456 to a laboratory and use a lot of sensitive (and expensive) equipment to
6457 look for the faint "echoes" of the original data underneath the
6458 overwritten data.  If the data has only been overwritten once, it's not
6459 even that hard.
6460
6461    The best way to remove something irretrievably is to destroy the
6462 media it's on with acid, melt it down, or the like.  For cheap
6463 removable media like floppy disks, this is the preferred method.
6464 However, hard drives are expensive and hard to melt, so the `shred'
6465 utility tries to achieve a similar effect non-destructively.
6466
6467    This uses many overwrite passes, with the data patterns chosen to
6468 maximize the damage they do to the old data.  While this will work on
6469 floppies, the patterns are designed for best effect on hard drives.
6470 For more details, see the source code and Peter Gutmann's paper `Secure
6471 Deletion of Data from Magnetic and Solid-State Memory'
6472 (http://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html), from the
6473 proceedings of the Sixth USENIX Security Symposium (San Jose,
6474 California, July 22-25, 1996).
6475
6476    *Please note* that `shred' relies on a very important assumption:
6477 that the file system overwrites data in place.  This is the traditional
6478 way to do things, but many modern file system designs do not satisfy
6479 this assumption.  Exceptions include:
6480
6481    * Log-structured or journaled file systems, such as those supplied
6482      with AIX and Solaris, and JFS, ReiserFS, XFS, Ext3 (in
6483      `data=journal' mode), BFS, NTFS, etc. when they are configured to
6484      journal _data_.
6485
6486    * File systems that write redundant data and carry on even if some
6487      writes fail, such as RAID-based file systems.
6488
6489    * File systems that make snapshots, such as Network Appliance's NFS
6490      server.
6491
6492    * File systems that cache in temporary locations, such as NFS
6493      version 3 clients.
6494
6495    * Compressed file systems.
6496
6497    In the particular case of ext3 file systems, the above disclaimer
6498 applies (and `shred' is thus of limited effectiveness) only in
6499 `data=journal' mode, which journals file data in addition to just
6500 metadata. In both the `data=ordered' (default) and `data=writeback'
6501 modes, `shred' works as usual.  Ext3 journaling modes can be changed by
6502 adding the `data=something' option to the mount options for a
6503 particular file system in the `/etc/fstab' file, as documented in the
6504 mount man page (man mount).
6505
6506    If you are not sure how your file system operates, then you should
6507 assume that it does not overwrite data in place, which means that shred
6508 cannot reliably operate on regular files in your file system.
6509
6510    Generally speaking, it is more reliable to shred a device than a
6511 file, since this bypasses the problem of file system design mentioned
6512 above.  However, even shredding devices is not always completely
6513 reliable.  For example, most disks map out bad sectors invisibly to the
6514 application; if the bad sectors contain sensitive data, `shred' won't
6515 be able to destroy it.
6516
6517    `shred' makes no attempt to detect or report this problem, just as
6518 it makes no attempt to do anything about backups.  However, since it is
6519 more reliable to shred devices than files, `shred' by default does not
6520 truncate or remove the output file.  This default is more suitable for
6521 devices, which typically cannot be truncated and should not be removed.
6522
6523    Finally, consider the risk of backups and mirrors.  File system
6524 backups and remote mirrors may contain copies of the file that cannot
6525 be removed, and that will allow a shredded file to be recovered later.
6526 So if you keep any data you may later want to destroy using `shred', be
6527 sure that it is not backed up or mirrored.
6528
6529      shred [OPTION]... FILE[...]
6530
6531    The program accepts the following options.  Also see *Note Common
6532 options::.
6533
6534 `-f'
6535 `--force'
6536      Override file permissions if necessary to allow overwriting.
6537
6538 `-NUMBER'
6539 `-n NUMBER'
6540 `--iterations=NUMBER'
6541      By default, `shred' uses 25 passes of overwrite.  This is enough
6542      for all of the useful overwrite patterns to be used at least once.
6543      You can reduce this to save time, or increase it if you have a lot
6544      of time to waste.
6545
6546 `--random-source=FILE'
6547      Use FILE as a source of random data used to overwrite and to
6548      choose pass ordering.  *Note Random sources::.
6549
6550 `-s BYTES'
6551 `--size=BYTES'
6552      Shred the first BYTES bytes of the file.  The default is to shred
6553      the whole file.  BYTES can be followed by a size specification like
6554      `K', `M', or `G' to specify a multiple.  *Note Block size::.
6555
6556 `-u'
6557 `--remove'
6558      After shredding a file, truncate it (if possible) and then remove
6559      it.  If a file has multiple links, only the named links will be
6560      removed.
6561
6562 `-v'
6563 `--verbose'
6564      Display status updates as sterilization proceeds.
6565
6566 `-x'
6567 `--exact'
6568      By default, `shred' rounds the size of a regular file up to the
6569      next multiple of the file system block size to fully erase the
6570      last block of the file.  Use `--exact' to suppress that behavior.
6571      Thus, by default if you shred a 10-byte regular file on a system
6572      with 512-byte blocks, the resulting file will be 512 bytes long.
6573      With this option, shred does not increase the apparent size of the
6574      file.
6575
6576 `-z'
6577 `--zero'
6578      Normally, the last pass that `shred' writes is made up of random
6579      data.  If this would be conspicuous on your hard drive (for
6580      example, because it looks like encrypted data), or you just think
6581      it's tidier, the `--zero' option adds an additional overwrite pass
6582      with all zero bits.  This is in addition to the number of passes
6583      specified by the `--iterations' option.
6584
6585
6586    You might use the following command to erase all trace of the file
6587 system you'd created on the floppy disk in your first drive.  That
6588 command takes about 20 minutes to erase a "1.44MB" (actually 1440 KiB)
6589 floppy.
6590
6591      shred --verbose /dev/fd0
6592
6593    Similarly, to erase all data on a selected partition of your hard
6594 disk, you could give a command like this:
6595
6596      shred --verbose /dev/sda5
6597
6598    A FILE of `-' denotes standard output.  The intended use of this is
6599 to shred a removed temporary file.  For example:
6600
6601      i=`tempfile -m 0600`
6602      exec 3<>"$i"
6603      rm -- "$i"
6604      echo "Hello, world" >&3
6605      shred - >&3
6606      exec 3>-
6607
6608    However, the command `shred - >file' does not shred the contents of
6609 FILE, since the shell truncates FILE before invoking `shred'.  Use the
6610 command `shred file' or (if using a Bourne-compatible shell) the
6611 command `shred - 1<>file' instead.
6612
6613    An exit status of zero indicates success, and a nonzero value
6614 indicates failure.
6615
6616 \1f
6617 File: coreutils.info,  Node: Special file types,  Next: Changing file attributes,  Prev: Basic operations,  Up: Top
6618
6619 12 Special file types
6620 *********************
6621
6622 This chapter describes commands which create special types of files (and
6623 `rmdir', which removes directories, one special file type).
6624
6625    Although Unix-like operating systems have markedly fewer special file
6626 types than others, not _everything_ can be treated only as the
6627 undifferentiated byte stream of "normal files".  For example, when a
6628 file is created or removed, the system must record this information,
6629 which it does in a "directory"--a special type of file.  Although you
6630 can read directories as normal files, if you're curious, in order for
6631 the system to do its job it must impose a structure, a certain order,
6632 on the bytes of the file.  Thus it is a "special" type of file.
6633
6634    Besides directories, other special file types include named pipes
6635 (FIFOs), symbolic links, sockets, and so-called "special files".
6636
6637 * Menu:
6638
6639 * link invocation::             Make a hard link via the link syscall
6640 * ln invocation::               Make links between files.
6641 * mkdir invocation::            Make directories.
6642 * mkfifo invocation::           Make FIFOs (named pipes).
6643 * mknod invocation::            Make block or character special files.
6644 * readlink invocation::         Print the referent of a symbolic link.
6645 * rmdir invocation::            Remove empty directories.
6646 * unlink invocation::           Remove files via the unlink syscall
6647
6648 \1f
6649 File: coreutils.info,  Node: link invocation,  Next: ln invocation,  Up: Special file types
6650
6651 12.1 `link': Make a hard link via the link syscall
6652 ==================================================
6653
6654 `link' creates a single hard link at a time.  It is a minimalist
6655 interface to the system-provided `link' function.  *Note Hard Links:
6656 (libc)Hard Links.  It avoids the bells and whistles of the more
6657 commonly-used `ln' command (*note ln invocation::).  Synopsis:
6658
6659      link FILENAME LINKNAME
6660
6661    FILENAME must specify an existing file, and LINKNAME must specify a
6662 nonexistent entry in an existing directory.  `link' simply calls `link
6663 (FILENAME, LINKNAME)' to create the link.
6664
6665    On a GNU system, this command acts like `ln --directory
6666 --no-target-directory FILENAME LINKNAME'.  However, the `--directory'
6667 and `--no-target-directory' options are not specified by POSIX, and the
6668 `link' command is more portable in practice.
6669
6670    An exit status of zero indicates success, and a nonzero value
6671 indicates failure.
6672
6673 \1f
6674 File: coreutils.info,  Node: ln invocation,  Next: mkdir invocation,  Prev: link invocation,  Up: Special file types
6675
6676 12.2 `ln': Make links between files
6677 ===================================
6678
6679 `ln' makes links between files.  By default, it makes hard links; with
6680 the `-s' option, it makes symbolic (or "soft") links.  Synopses:
6681
6682      ln [OPTION]... [-T] TARGET LINKNAME
6683      ln [OPTION]... TARGET
6684      ln [OPTION]... TARGET... DIRECTORY
6685      ln [OPTION]... -t DIRECTORY TARGET...
6686
6687    * If two file names are given, `ln' creates a link to the first file
6688      from the second.
6689
6690    * If one TARGET is given, `ln' creates a link to that file in the
6691      current directory.
6692
6693    * If the `--target-directory' (`-t') option is given, or failing
6694      that if the last file is a directory and the
6695      `--no-target-directory' (`-T') option is not given, `ln' creates a
6696      link to each TARGET file in the specified directory, using the
6697      TARGETs' names.
6698
6699
6700    Normally `ln' does not remove existing files.  Use the `--force'
6701 (`-f') option to remove them unconditionally, the `--interactive'
6702 (`-i') option to remove them conditionally, and the `--backup' (`-b')
6703 option to rename them.
6704
6705    A "hard link" is another name for an existing file; the link and the
6706 original are indistinguishable.  Technically speaking, they share the
6707 same inode, and the inode contains all the information about a
6708 file--indeed, it is not incorrect to say that the inode _is_ the file.
6709 On all existing implementations, you cannot make a hard link to a
6710 directory, and hard links cannot cross file system boundaries.  (These
6711 restrictions are not mandated by POSIX, however.)
6712
6713    "Symbolic links" ("symlinks" for short), on the other hand, are a
6714 special file type (which not all kernels support: System V release 3
6715 (and older) systems lack symlinks) in which the link file actually
6716 refers to a different file, by name.  When most operations (opening,
6717 reading, writing, and so on) are passed the symbolic link file, the
6718 kernel automatically "dereferences" the link and operates on the target
6719 of the link.  But some operations (e.g., removing) work on the link
6720 file itself, rather than on its target.  *Note Symbolic Links:
6721 (libc)Symbolic Links.
6722
6723    The program accepts the following options.  Also see *Note Common
6724 options::.
6725
6726 `-b'
6727 `--backup[=METHOD]'
6728      *Note Backup options::.  Make a backup of each file that would
6729      otherwise be overwritten or removed.
6730
6731 `-d'
6732 `-F'
6733 `--directory'
6734      Allow users with appropriate privileges to attempt to make hard
6735      links to directories.  However, note that this will probably fail
6736      due to system restrictions, even for the super-user.
6737
6738 `-f'
6739 `--force'
6740      Remove existing destination files.
6741
6742 `-i'
6743 `--interactive'
6744      Prompt whether to remove existing destination files.
6745
6746 `-n'
6747 `--no-dereference'
6748      Do not treat the last operand specially when it is a symbolic link
6749      to a directory.  Instead, treat it as if it were a normal file.
6750
6751      When the destination is an actual directory (not a symlink to one),
6752      there is no ambiguity.  The link is created in that directory.
6753      But when the specified destination is a symlink to a directory,
6754      there are two ways to treat the user's request.  `ln' can treat
6755      the destination just as it would a normal directory and create the
6756      link in it.  On the other hand, the destination can be viewed as a
6757      non-directory--as the symlink itself.  In that case, `ln' must
6758      delete or backup that symlink before creating the new link.  The
6759      default is to treat a destination that is a symlink to a directory
6760      just like a directory.
6761
6762      This option is weaker than the `--no-target-directory' (`-T')
6763      option, so it has no effect if both options are given.
6764
6765 `-s'
6766 `--symbolic'
6767      Make symbolic links instead of hard links.  This option merely
6768      produces an error message on systems that do not support symbolic
6769      links.
6770
6771 `-S SUFFIX'
6772 `--suffix=SUFFIX'
6773      Append SUFFIX to each backup file made with `-b'.  *Note Backup
6774      options::.
6775
6776 `-t DIRECTORY'
6777 `--target-directory=DIRECTORY'
6778      Specify the destination DIRECTORY.  *Note Target directory::.
6779
6780 `-T'
6781 `--no-target-directory'
6782      Do not treat the last operand specially when it is a directory or a
6783      symbolic link to a directory.  *Note Target directory::.
6784
6785 `-v'
6786 `--verbose'
6787      Print the name of each file after linking it successfully.
6788
6789
6790    An exit status of zero indicates success, and a nonzero value
6791 indicates failure.
6792
6793    Examples:
6794
6795      Bad Example:
6796
6797      # Create link ../a pointing to a in that directory.
6798      # Not really useful because it points to itself.
6799      ln -s a ..
6800
6801      Better Example:
6802
6803      # Change to the target before creating symlinks to avoid being confused.
6804      cd ..
6805      ln -s adir/a .
6806
6807      Bad Example:
6808
6809      # Hard coded file names don't move well.
6810      ln -s $(pwd)/a /some/dir/
6811
6812      Better Example:
6813
6814      # Relative file names survive directory moves and also
6815      # work across networked file systems.
6816      ln -s afile anotherfile
6817      ln -s ../adir/afile yetanotherfile
6818
6819 \1f
6820 File: coreutils.info,  Node: mkdir invocation,  Next: mkfifo invocation,  Prev: ln invocation,  Up: Special file types
6821
6822 12.3 `mkdir': Make directories
6823 ==============================
6824
6825 `mkdir' creates directories with the specified names.  Synopsis:
6826
6827      mkdir [OPTION]... NAME...
6828
6829    `mkdir' creates each directory NAME in the order given.  It reports
6830 an error if NAME already exists, unless the `-p' option is given and
6831 NAME is a directory.
6832
6833    The program accepts the following options.  Also see *Note Common
6834 options::.
6835
6836 `-m MODE'
6837 `--mode=MODE'
6838      Set the file permission bits of created directories to MODE, which
6839      uses the same syntax as in `chmod' and uses `a=rwx' (read, write
6840      and execute allowed for everyone) for the point of the departure.
6841      *Note File permissions::.
6842
6843      Normally the directory has the desired file mode bits at the
6844      moment it is created.  As a GNU extension, MODE may also mention
6845      special mode bits, but in this case there may be a temporary window
6846      during which the directory exists but its special mode bits are
6847      incorrect.  *Note Directory Setuid and Setgid::, for how the
6848      set-user-ID and set-group-ID bits of directories are inherited
6849      unless overridden in this way.
6850
6851 `-p'
6852 `--parents'
6853      Make any missing parent directories for each argument, setting
6854      their file permission bits to the umask modified by `u+wx'.  Ignore
6855      existing parent directories, and do not change their file
6856      permission bits.
6857
6858      To set the file permission bits of any newly-created parent
6859      directories to a value that includes `u+wx', you can set the umask
6860      before invoking `mkdir'.  For example, if the shell command
6861      `(umask u=rwx,go=rx; mkdir -p P/Q)' creates the parent `P' it sets
6862      the parent's permission bits to `u=rwx,go=rx'.  To set a parent's
6863      special mode bits as well, you can invoke `chmod' after `mkdir'.
6864      *Note Directory Setuid and Setgid::, for how the set-user-ID and
6865      set-group-ID bits of newly-created parent directories are
6866      inherited.
6867
6868 `-v'
6869 `--verbose'
6870      Print a message for each created directory.  This is most useful
6871      with `--parents'.
6872
6873    An exit status of zero indicates success, and a nonzero value
6874 indicates failure.
6875
6876 \1f
6877 File: coreutils.info,  Node: mkfifo invocation,  Next: mknod invocation,  Prev: mkdir invocation,  Up: Special file types
6878
6879 12.4 `mkfifo': Make FIFOs (named pipes)
6880 =======================================
6881
6882 `mkfifo' creates FIFOs (also called "named pipes") with the specified
6883 names.  Synopsis:
6884
6885      mkfifo [OPTION] NAME...
6886
6887    A "FIFO" is a special file type that permits independent processes
6888 to communicate.  One process opens the FIFO file for writing, and
6889 another for reading, after which data can flow as with the usual
6890 anonymous pipe in shells or elsewhere.
6891
6892    The program accepts the following option.  Also see *Note Common
6893 options::.
6894
6895 `-m MODE'
6896 `--mode=MODE'
6897      Set the mode of created FIFOs to MODE, which is symbolic as in
6898      `chmod' and uses `a=rw' (read and write allowed for everyone) for
6899      the point of departure.  MODE should specify only file permission
6900      bits.  *Note File permissions::.
6901
6902
6903    An exit status of zero indicates success, and a nonzero value
6904 indicates failure.
6905
6906 \1f
6907 File: coreutils.info,  Node: mknod invocation,  Next: readlink invocation,  Prev: mkfifo invocation,  Up: Special file types
6908
6909 12.5 `mknod': Make block or character special files
6910 ===================================================
6911
6912 `mknod' creates a FIFO, character special file, or block special file
6913 with the specified name.  Synopsis:
6914
6915      mknod [OPTION]... NAME TYPE [MAJOR MINOR]
6916
6917    Unlike the phrase "special file type" above, the term "special file"
6918 has a technical meaning on Unix: something that can generate or receive
6919 data.  Usually this corresponds to a physical piece of hardware, e.g.,
6920 a printer or a disk.  (These files are typically created at
6921 system-configuration time.)  The `mknod' command is what creates files
6922 of this type.  Such devices can be read either a character at a time or
6923 a "block" (many characters) at a time, hence we say there are "block
6924 special" files and "character special" files.
6925
6926    The arguments after NAME specify the type of file to make:
6927
6928 `p'
6929      for a FIFO
6930
6931 `b'
6932      for a block special file
6933
6934 `c'
6935      for a character special file
6936
6937
6938    When making a block or character special file, the major and minor
6939 device numbers must be given after the file type.  If a major or minor
6940 device number begins with `0x' or `0X', it is interpreted as
6941 hexadecimal; otherwise, if it begins with `0', as octal; otherwise, as
6942 decimal.
6943
6944    The program accepts the following option.  Also see *Note Common
6945 options::.
6946
6947 `-m MODE'
6948 `--mode=MODE'
6949      Set the mode of created files to MODE, which is symbolic as in
6950      `chmod' and uses `a=rw' as the point of departure.  MODE should
6951      specify only file permission bits.  *Note File permissions::.
6952
6953
6954    An exit status of zero indicates success, and a nonzero value
6955 indicates failure.
6956
6957 \1f
6958 File: coreutils.info,  Node: readlink invocation,  Next: rmdir invocation,  Prev: mknod invocation,  Up: Special file types
6959
6960 12.6 `readlink': Print the referent of a symbolic link
6961 ======================================================
6962
6963 `readlink' may work in one of two supported modes:
6964
6965 `Readlink mode'
6966      `readlink' outputs the value of the given symbolic link.  If
6967      `readlink' is invoked with an argument other than the name of a
6968      symbolic link, it produces no output and exits with a nonzero exit
6969      code.
6970
6971 `Canonicalize mode'
6972      `readlink' outputs the absolute name of the given file which
6973      contains no `.', `..' components nor any repeated separators (`/')
6974      or symbolic links.
6975
6976
6977      readlink [OPTION] FILE
6978
6979    By default, `readlink' operates in readlink mode.
6980
6981    The program accepts the following options.  Also see *Note Common
6982 options::.
6983
6984 `-f'
6985 `--canonicalize'
6986      Activate canonicalize mode.  If any component of the file name
6987      except the last one is missing or unavailable, `readlink' produces
6988      no output and exits with a nonzero exit code.
6989
6990 `-e'
6991 `--canonicalize-existing'
6992      Activate canonicalize mode.  If any component is missing or
6993      unavailable, `readlink' produces no output and exits with a
6994      nonzero exit code.
6995
6996 `-m'
6997 `--canonicalize-missing'
6998      Activate canonicalize mode.  If any component is missing or
6999      unavailable, `readlink' treats it as a directory.
7000
7001 `-n'
7002 `--no-newline'
7003      Do not output the trailing newline.
7004
7005 `-s'
7006 `-q'
7007 `--silent'
7008 `--quiet'
7009      Suppress most error messages.
7010
7011 `-v'
7012 `--verbose'
7013      Report error messages.
7014
7015
7016    The `readlink' utility first appeared in OpenBSD 2.1.
7017
7018    An exit status of zero indicates success, and a nonzero value
7019 indicates failure.
7020
7021 \1f
7022 File: coreutils.info,  Node: rmdir invocation,  Next: unlink invocation,  Prev: readlink invocation,  Up: Special file types
7023
7024 12.7 `rmdir': Remove empty directories
7025 ======================================
7026
7027 `rmdir' removes empty directories.  Synopsis:
7028
7029      rmdir [OPTION]... DIRECTORY...
7030
7031    If any DIRECTORY argument does not refer to an existing empty
7032 directory, it is an error.
7033
7034    The program accepts the following option.  Also see *Note Common
7035 options::.
7036
7037 `--ignore-fail-on-non-empty'
7038      Ignore each failure to remove a directory that is solely because
7039      the directory is non-empty.
7040
7041 `-p'
7042 `--parents'
7043      Remove DIRECTORY, then try to remove each component of DIRECTORY.
7044      So, for example, `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b
7045      a'.  As such, it fails if any of those directories turns out not
7046      to be empty.  Use the `--ignore-fail-on-non-empty' option to make
7047      it so such a failure does not evoke a diagnostic and does not
7048      cause `rmdir' to exit unsuccessfully.
7049
7050 `-v'
7051 `--verbose'
7052      Give a diagnostic for each successful removal.  DIRECTORY is
7053      removed.
7054
7055
7056    *Note rm invocation::, for how to remove non-empty directories
7057 (recursively).
7058
7059    An exit status of zero indicates success, and a nonzero value
7060 indicates failure.
7061
7062 \1f
7063 File: coreutils.info,  Node: unlink invocation,  Prev: rmdir invocation,  Up: Special file types
7064
7065 12.8 `unlink': Remove files via the unlink syscall
7066 ==================================================
7067
7068 `unlink' deletes a single specified file name.  It is a minimalist
7069 interface to the system-provided `unlink' function.  *Note Deleting
7070 Files: (libc)Deleting Files.  Synopsis: It avoids the bells and
7071 whistles of the more commonly-used `rm' command (*note rm invocation::).
7072
7073      unlink FILENAME
7074
7075    On some systems `unlink' can be used to delete the name of a
7076 directory.  On others, it can be used that way only by a privileged
7077 user.  In the GNU system `unlink' can never delete the name of a
7078 directory.
7079
7080    The `unlink' command honors the `--help' and `--version' options.
7081 To remove a file whose name begins with `-', prefix the name with `./',
7082 e.g., `unlink ./--help'.
7083
7084    An exit status of zero indicates success, and a nonzero value
7085 indicates failure.
7086
7087 \1f
7088 File: coreutils.info,  Node: Changing file attributes,  Next: Disk usage,  Prev: Special file types,  Up: Top
7089
7090 13 Changing file attributes
7091 ***************************
7092
7093 A file is not merely its contents, a name, and a file type (*note
7094 Special file types::).  A file also has an owner (a user ID), a group
7095 (a group ID), permissions (what the owner can do with the file, what
7096 people in the group can do, and what everyone else can do), various
7097 timestamps, and other information.  Collectively, we call these a file's
7098 "attributes".
7099
7100    These commands change file attributes.
7101
7102 * Menu:
7103
7104 * chgrp invocation::            Change file groups.
7105 * chmod invocation::            Change access permissions.
7106 * chown invocation::            Change file owners and groups.
7107 * touch invocation::            Change file timestamps.
7108
7109 \1f
7110 File: coreutils.info,  Node: chown invocation,  Next: touch invocation,  Prev: chmod invocation,  Up: Changing file attributes
7111
7112 13.1 `chown': Change file owner and group
7113 =========================================
7114
7115 `chown' changes the user and/or group ownership of each given FILE to
7116 NEW-OWNER or to the user and group of an existing reference file.
7117 Synopsis:
7118
7119      chown [OPTION]... {NEW-OWNER | --reference=REF_FILE} FILE...
7120
7121    If used, NEW-OWNER specifies the new owner and/or group as follows
7122 (with no embedded white space):
7123
7124      [OWNER] [ : [GROUP] ]
7125
7126    Specifically:
7127
7128 OWNER
7129      If only an OWNER (a user name or numeric user ID) is given, that
7130      user is made the owner of each given file, and the files' group is
7131      not changed.
7132
7133 OWNER`:'GROUP
7134      If the OWNER is followed by a colon and a GROUP (a group name or
7135      numeric group ID), with no spaces between them, the group
7136      ownership of the files is changed as well (to GROUP).
7137
7138 OWNER`:'
7139      If a colon but no group name follows OWNER, that user is made the
7140      owner of the files and the group of the files is changed to
7141      OWNER's login group.
7142
7143 `:'GROUP
7144      If the colon and following GROUP are given, but the owner is
7145      omitted, only the group of the files is changed; in this case,
7146      `chown' performs the same function as `chgrp'.
7147
7148 `:'
7149      If only a colon is given, or if NEW-OWNER is empty, neither the
7150      owner nor the group is changed.
7151
7152
7153    If OWNER or GROUP is intended to represent a numeric user or group
7154 ID, then you may specify it with a leading `+'.  *Note Disambiguating
7155 names and IDs::.
7156
7157    Some older scripts may still use `.' in place of the `:' separator.
7158 POSIX 1003.1-2001 (*note Standards conformance::) does not require
7159 support for that, but for backward compatibility GNU `chown' supports
7160 `.' so long as no ambiguity results.  New scripts should avoid the use
7161 of `.' because it is not portable, and because it has undesirable
7162 results if the entire OWNER`.'GROUP happens to identify a user whose
7163 name contains `.'.
7164
7165    The `chown' command sometimes clears the set-user-ID or set-group-ID
7166 permission bits.  This behavior depends on the policy and functionality
7167 of the underlying `chown' system call, which may make system-dependent
7168 file mode modifications outside the control of the `chown' command.
7169 For example, the `chown' command might not affect those bits when
7170 invoked by a user with appropriate privileges, or when the bits signify
7171 some function other than executable permission (e.g., mandatory
7172 locking).  When in doubt, check the underlying system behavior.
7173
7174    The program accepts the following options.  Also see *Note Common
7175 options::.
7176
7177 `-c'
7178 `--changes'
7179      Verbosely describe the action for each FILE whose ownership
7180      actually changes.
7181
7182 `-f'
7183 `--silent'
7184 `--quiet'
7185      Do not print error messages about files whose ownership cannot be
7186      changed.
7187
7188 `--from=OLD-OWNER'
7189      Change a FILE's ownership only if it has current attributes
7190      specified by OLD-OWNER.  OLD-OWNER has the same form as NEW-OWNER
7191      described above.  This option is useful primarily from a security
7192      standpoint in that it narrows considerably the window of potential
7193      abuse.  For example, to reflect a user ID numbering change for one
7194      user's files without an option like this, `root' might run
7195
7196           find / -owner OLDUSER -print0 | xargs -0 chown -h NEWUSER
7197
7198      But that is dangerous because the interval between when the `find'
7199      tests the existing file's owner and when the `chown' is actually
7200      run may be quite large.  One way to narrow the gap would be to
7201      invoke chown for each file as it is found:
7202
7203           find / -owner OLDUSER -exec chown -h NEWUSER {} \;
7204
7205      But that is very slow if there are many affected files.  With this
7206      option, it is safer (the gap is narrower still) though still not
7207      perfect:
7208
7209           chown -h -R --from=OLDUSER NEWUSER /
7210
7211 `--dereference'
7212      Do not act on symbolic links themselves but rather on what they
7213      point to.  This is the default.
7214
7215 `-h'
7216 `--no-dereference'
7217      Act on symbolic links themselves instead of what they point to.
7218      This mode relies on the `lchown' system call.  On systems that do
7219      not provide the `lchown' system call, `chown' fails when a file
7220      specified on the command line is a symbolic link.  By default, no
7221      diagnostic is issued for symbolic links encountered during a
7222      recursive traversal, but see `--verbose'.
7223
7224 `--preserve-root'
7225      Fail upon any attempt to recursively change the root directory,
7226      `/'.  Without `--recursive', this option has no effect.  *Note
7227      Treating / specially::.
7228
7229 `--no-preserve-root'
7230      Cancel the effect of any preceding `--preserve-root' option.
7231      *Note Treating / specially::.
7232
7233 `--reference=REF_FILE'
7234      Change the user and group of each FILE to be the same as those of
7235      REF_FILE.  If REF_FILE is a symbolic link, do not use the user and
7236      group of the symbolic link, but rather those of the file it refers
7237      to.
7238
7239 `-v'
7240 `--verbose'
7241      Output a diagnostic for every file processed.  If a symbolic link
7242      is encountered during a recursive traversal on a system without
7243      the `lchown' system call, and `--no-dereference' is in effect,
7244      then issue a diagnostic saying neither the symbolic link nor its
7245      referent is being changed.
7246
7247 `-R'
7248 `--recursive'
7249      Recursively change ownership of directories and their contents.
7250
7251 `-H'
7252      If `--recursive' (`-R') is specified and a command line argument
7253      is a symbolic link to a directory, traverse it.  *Note Traversing
7254      symlinks::.
7255
7256 `-L'
7257      In a recursive traversal, traverse every symbolic link to a
7258      directory that is encountered.  *Note Traversing symlinks::.
7259
7260 `-P'
7261      Do not traverse any symbolic links.  This is the default if none
7262      of `-H', `-L', or `-P' is specified.  *Note Traversing symlinks::.
7263
7264
7265    An exit status of zero indicates success, and a nonzero value
7266 indicates failure.
7267
7268    Examples:
7269
7270      # Change the owner of /u to "root".
7271      chown root /u
7272
7273      # Likewise, but also change its group to "staff".
7274      chown root:staff /u
7275
7276      # Change the owner of /u and subfiles to "root".
7277      chown -hR root /u
7278
7279 \1f
7280 File: coreutils.info,  Node: chgrp invocation,  Next: chmod invocation,  Up: Changing file attributes
7281
7282 13.2 `chgrp': Change group ownership
7283 ====================================
7284
7285 `chgrp' changes the group ownership of each given FILE to GROUP (which
7286 can be either a group name or a numeric group ID) or to the group of an
7287 existing reference file.  Synopsis:
7288
7289      chgrp [OPTION]... {GROUP | --reference=REF_FILE} FILE...
7290
7291    If GROUP is intended to represent a numeric group ID, then you may
7292 specify it with a leading `+'.  *Note Disambiguating names and IDs::.
7293
7294    The program accepts the following options.  Also see *Note Common
7295 options::.
7296
7297 `-c'
7298 `--changes'
7299      Verbosely describe the action for each FILE whose group actually
7300      changes.
7301
7302 `-f'
7303 `--silent'
7304 `--quiet'
7305      Do not print error messages about files whose group cannot be
7306      changed.
7307
7308 `--dereference'
7309      Do not act on symbolic links themselves but rather on what they
7310      point to.  This is the default.
7311
7312 `-h'
7313 `--no-dereference'
7314      Act on symbolic links themselves instead of what they point to.
7315      This mode relies on the `lchown' system call.  On systems that do
7316      not provide the `lchown' system call, `chgrp' fails when a file
7317      specified on the command line is a symbolic link.  By default, no
7318      diagnostic is issued for symbolic links encountered during a
7319      recursive traversal, but see `--verbose'.
7320
7321 `--preserve-root'
7322      Fail upon any attempt to recursively change the root directory,
7323      `/'.  Without `--recursive', this option has no effect.  *Note
7324      Treating / specially::.
7325
7326 `--no-preserve-root'
7327      Cancel the effect of any preceding `--preserve-root' option.
7328      *Note Treating / specially::.
7329
7330 `--reference=REF_FILE'
7331      Change the group of each FILE to be the same as that of REF_FILE.
7332      If REF_FILE is a symbolic link, do not use the group of the
7333      symbolic link, but rather that of the file it refers to.
7334
7335 `-v'
7336 `--verbose'
7337      Output a diagnostic for every file processed.  If a symbolic link
7338      is encountered during a recursive traversal on a system without
7339      the `lchown' system call, and `--no-dereference' is in effect,
7340      then issue a diagnostic saying neither the symbolic link nor its
7341      referent is being changed.
7342
7343 `-R'
7344 `--recursive'
7345      Recursively change the group ownership of directories and their
7346      contents.
7347
7348 `-H'
7349      If `--recursive' (`-R') is specified and a command line argument
7350      is a symbolic link to a directory, traverse it.  *Note Traversing
7351      symlinks::.
7352
7353 `-L'
7354      In a recursive traversal, traverse every symbolic link to a
7355      directory that is encountered.  *Note Traversing symlinks::.
7356
7357 `-P'
7358      Do not traverse any symbolic links.  This is the default if none
7359      of `-H', `-L', or `-P' is specified.  *Note Traversing symlinks::.
7360
7361
7362    An exit status of zero indicates success, and a nonzero value
7363 indicates failure.
7364
7365    Examples:
7366
7367      # Change the group of /u to "staff".
7368      chgrp staff /u
7369
7370      # Change the group of /u and subfiles to "staff".
7371      chgrp -hR staff /u
7372
7373 \1f
7374 File: coreutils.info,  Node: chmod invocation,  Next: chown invocation,  Prev: chgrp invocation,  Up: Changing file attributes
7375
7376 13.3 `chmod': Change access permissions
7377 =======================================
7378
7379 `chmod' changes the access permissions of the named files.  Synopsis:
7380
7381      chmod [OPTION]... {MODE | --reference=REF_FILE} FILE...
7382
7383    `chmod' never changes the permissions of symbolic links, since the
7384 `chmod' system call cannot change their permissions.  This is not a
7385 problem since the permissions of symbolic links are never used.
7386 However, for each symbolic link listed on the command line, `chmod'
7387 changes the permissions of the pointed-to file.  In contrast, `chmod'
7388 ignores symbolic links encountered during recursive directory
7389 traversals.
7390
7391    A successful use of `chmod' clears the set-group-ID bit of a regular
7392 file if the file's group ID does not match the user's effective group
7393 ID or one of the user's supplementary group IDs, unless the user has
7394 appropriate privileges.  Additional restrictions may cause the
7395 set-user-ID and set-group-ID bits of MODE or REF_FILE to be ignored.
7396 This behavior depends on the policy and functionality of the underlying
7397 `chmod' system call.  When in doubt, check the underlying system
7398 behavior.
7399
7400    If used, MODE specifies the new file mode bits.  For details, see
7401 the section on *Note File permissions::.  If you really want MODE to
7402 have a leading `-', you should use `--' first, e.g., `chmod -- -w
7403 file'.  Typically, though, `chmod a-w file' is preferable, and `chmod -w
7404 file' (without the `--') complains if it behaves differently from what
7405 `chmod a-w file' would do.
7406
7407    The program accepts the following options.  Also see *Note Common
7408 options::.
7409
7410 `-c'
7411 `--changes'
7412      Verbosely describe the action for each FILE whose permissions
7413      actually changes.
7414
7415 `-f'
7416 `--silent'
7417 `--quiet'
7418      Do not print error messages about files whose permissions cannot be
7419      changed.
7420
7421 `--preserve-root'
7422      Fail upon any attempt to recursively change the root directory,
7423      `/'.  Without `--recursive', this option has no effect.  *Note
7424      Treating / specially::.
7425
7426 `--no-preserve-root'
7427      Cancel the effect of any preceding `--preserve-root' option.
7428      *Note Treating / specially::.
7429
7430 `-v'
7431 `--verbose'
7432      Verbosely describe the action or non-action taken for every FILE.
7433
7434 `--reference=REF_FILE'
7435      Change the mode of each FILE to be the same as that of REF_FILE.
7436      *Note File permissions::.  If REF_FILE is a symbolic link, do not
7437      use the mode of the symbolic link, but rather that of the file it
7438      refers to.
7439
7440 `-R'
7441 `--recursive'
7442      Recursively change permissions of directories and their contents.
7443
7444
7445    An exit status of zero indicates success, and a nonzero value
7446 indicates failure.
7447
7448 \1f
7449 File: coreutils.info,  Node: touch invocation,  Prev: chown invocation,  Up: Changing file attributes
7450
7451 13.4 `touch': Change file timestamps
7452 ====================================
7453
7454 `touch' changes the access and/or modification times of the specified
7455 files.  Synopsis:
7456
7457      touch [OPTION]... FILE...
7458
7459    Any FILE that does not exist is created empty.
7460
7461    A FILE of `-' causes `touch' to change the times of the file
7462 associated with standard output.
7463
7464    If changing both the access and modification times to the current
7465 time, `touch' can change the timestamps for files that the user running
7466 it does not own but has write permission for.  Otherwise, the user must
7467 own the files.
7468
7469    Although `touch' provides options for changing two of the times--the
7470 times of last access and modification--of a file, there is actually a
7471 third one as well: the inode change time.  This is often referred to as
7472 a file's `ctime'.  The inode change time represents the time when the
7473 file's meta-information last changed.  One common example of this is
7474 when the permissions of a file change.  Changing the permissions
7475 doesn't access the file, so the atime doesn't change, nor does it
7476 modify the file, so the mtime doesn't change.  Yet, something about the
7477 file itself has changed, and this must be noted somewhere.  This is the
7478 job of the ctime field.  This is necessary, so that, for example, a
7479 backup program can make a fresh copy of the file, including the new
7480 permissions value.  Another operation that modifies a file's ctime
7481 without affecting the others is renaming.  In any case, it is not
7482 possible, in normal operations, for a user to change the ctime field to
7483 a user-specified value.
7484
7485    Time stamps assume the time zone rules specified by the `TZ'
7486 environment variable, or by the system default rules if `TZ' is not
7487 set.  *Note Specifying the Time Zone with `TZ': (libc)TZ Variable.  You
7488 can avoid ambiguities during daylight saving transitions by using UTC
7489 time stamps.
7490
7491    The program accepts the following options.  Also see *Note Common
7492 options::.
7493
7494 `-a'
7495 `--time=atime'
7496 `--time=access'
7497 `--time=use'
7498      Change the access time only.
7499
7500 `-c'
7501 `--no-create'
7502      Do not create files that do not exist.
7503
7504 `-d'
7505 `--date=TIME'
7506      Use TIME instead of the current time.  It can contain month names,
7507      time zones, `am' and `pm', `yesterday', etc.  For example,
7508      `--date="2004-02-27 14:19:13.489392193 +0530"' specifies the
7509      instant of time that is 489,392,193 nanoseconds after February 27,
7510      2004 at 2:19:13 PM in a time zone that is 5 hours and 30 minutes
7511      east of UTC.  *Note Date input formats::.  File systems that do
7512      not support high-resolution time stamps silently ignore any excess
7513      precision here.
7514
7515 `-f'
7516      Ignored; for compatibility with BSD versions of `touch'.
7517
7518 `-m'
7519 `--time=mtime'
7520 `--time=modify'
7521      Change the modification time only.
7522
7523 `-r FILE'
7524 `--reference=FILE'
7525      Use the times of the reference FILE instead of the current time.
7526      If this option is combined with the `--date=TIME' (`-d TIME')
7527      option, the reference FILE's time is the origin for any relative
7528      TIMEs given, but is otherwise ignored.  For example, `-r foo -d
7529      '-5 seconds'' specifies a time stamp equal to five seconds before
7530      the corresponding time stamp for `foo'.
7531
7532 `-t [[CC]YY]MMDDHHMM[.SS]'
7533      Use the argument (optional four-digit or two-digit years, months,
7534      days, hours, minutes, optional seconds) instead of the current
7535      time.  If the year is specified with only two digits, then CC is
7536      20 for years in the range 0 ... 68, and 19 for years in 69 ... 99.
7537      If no digits of the year are specified, the argument is
7538      interpreted as a date in the current year.
7539
7540
7541    On older systems, `touch' supports an obsolete syntax, as follows.
7542 If no timestamp is given with any of the `-d', `-r', or `-t' options,
7543 and if there are two or more FILEs and the first FILE is of the form
7544 `MMDDHHMM[YY]' and this would be a valid argument to the `-t' option
7545 (if the YY, if any, were moved to the front), and if the represented
7546 year is in the range 1969-1999, that argument is interpreted as the time
7547 for the other files instead of as a file name.  This obsolete behavior
7548 can be enabled or disabled with the `_POSIX2_VERSION' environment
7549 variable (*note Standards conformance::), but portable scripts should
7550 avoid commands whose behavior depends on this variable.  For example,
7551 use `touch ./12312359 main.c' or `touch -t 12312359 main.c' rather than
7552 the ambiguous `touch 12312359 main.c'.
7553
7554    An exit status of zero indicates success, and a nonzero value
7555 indicates failure.
7556
7557 \1f
7558 File: coreutils.info,  Node: Disk usage,  Next: Printing text,  Prev: Changing file attributes,  Up: Top
7559
7560 14 Disk usage
7561 *************
7562
7563 No disk can hold an infinite amount of data.  These commands report how
7564 much disk storage is in use or available, report other file and file
7565 status information, and write buffers to disk.
7566
7567 * Menu:
7568
7569 * df invocation::               Report file system disk space usage.
7570 * du invocation::               Estimate file space usage.
7571 * stat invocation::             Report file or file system status.
7572 * sync invocation::             Synchronize memory and disk.
7573
7574 \1f
7575 File: coreutils.info,  Node: df invocation,  Next: du invocation,  Up: Disk usage
7576
7577 14.1 `df': Report file system disk space usage
7578 ==============================================
7579
7580 `df' reports the amount of disk space used and available on file
7581 systems.  Synopsis:
7582
7583      df [OPTION]... [FILE]...
7584
7585    With no arguments, `df' reports the space used and available on all
7586 currently mounted file systems (of all types).  Otherwise, `df' reports
7587 on the file system containing each argument FILE.
7588
7589    Normally the disk space is printed in units of 1024 bytes, but this
7590 can be overridden (*note Block size::).  Non-integer quantities are
7591 rounded up to the next higher unit.
7592
7593    If an argument FILE is a disk device file containing a mounted file
7594 system, `df' shows the space available on that file system rather than
7595 on the file system containing the device node (i.e., the root file
7596 system).  GNU `df' does not attempt to determine the disk usage on
7597 unmounted file systems, because on most kinds of systems doing so
7598 requires extremely nonportable intimate knowledge of file system
7599 structures.
7600
7601    The program accepts the following options.  Also see *Note Common
7602 options::.
7603
7604 `-a'
7605 `--all'
7606      Include in the listing dummy file systems, which are omitted by
7607      default.  Such file systems are typically special-purpose
7608      pseudo-file-systems, such as automounter entries.
7609
7610 `-B SIZE'
7611 `--block-size=SIZE'
7612      Scale sizes by SIZE before printing them (*note Block size::).
7613      For example, `-BG' prints sizes in units of 1,073,741,824 bytes.
7614
7615 `-h'
7616 `--human-readable'
7617      Append a size letter to each size, such as `M' for mebibytes.
7618      Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes.
7619      Use the `--si' option if you prefer powers of 1000.
7620
7621 `-H'
7622      Equivalent to `--si'.
7623
7624 `-i'
7625 `--inodes'
7626      List inode usage information instead of block usage.  An inode
7627      (short for index node) contains information about a file such as
7628      its owner, permissions, timestamps, and location on the disk.
7629
7630 `-k'
7631      Print sizes in 1024-byte blocks, overriding the default block size
7632      (*note Block size::).  This option is equivalent to
7633      `--block-size=1K'.
7634
7635 `-l'
7636 `--local'
7637      Limit the listing to local file systems.  By default, remote file
7638      systems are also listed.
7639
7640 `--no-sync'
7641      Do not invoke the `sync' system call before getting any usage data.
7642      This may make `df' run significantly faster on systems with many
7643      disks, but on some systems (notably SunOS) the results may be
7644      slightly out of date.  This is the default.
7645
7646 `-P'
7647 `--portability'
7648      Use the POSIX output format.  This is like the default format
7649      except for the following:
7650
7651        1. The information about each file system is always printed on
7652           exactly one line; a mount device is never put on a line by
7653           itself.  This means that if the mount device name is more
7654           than 20 characters long (e.g., for some network mounts), the
7655           columns are misaligned.
7656
7657        2. The labels in the header output line are changed to conform
7658           to POSIX.
7659
7660        3. The default block size and output format are unaffected by the
7661           `DF_BLOCK_SIZE', `BLOCK_SIZE' and `BLOCKSIZE' environment
7662           variables.  However, the default block size is still affected
7663           by `POSIXLY_CORRECT': it is 512 if `POSIXLY_CORRECT' is set,
7664           1024 otherwise.  *Note Block size::.
7665
7666 `--si'
7667      Append an SI-style abbreviation to each size, such as `M' for
7668      megabytes.  Powers of 1000 are used, not 1024; `M' stands for
7669      1,000,000 bytes.  This option is equivalent to `--block-size=si'.
7670      Use the `-h' or `--human-readable' option if you prefer powers of
7671      1024.
7672
7673 `--sync'
7674      Invoke the `sync' system call before getting any usage data.  On
7675      some systems (notably SunOS), doing this yields more up to date
7676      results, but in general this option makes `df' much slower,
7677      especially when there are many or very busy file systems.
7678
7679 `-t FSTYPE'
7680 `--type=FSTYPE'
7681      Limit the listing to file systems of type FSTYPE.  Multiple file
7682      system types can be specified by giving multiple `-t' options.  By
7683      default, nothing is omitted.
7684
7685 `-T'
7686 `--print-type'
7687      Print each file system's type.  The types printed here are the
7688      same ones you can include or exclude with `-t' and `-x'.  The
7689      particular types printed are whatever is supported by the system.
7690      Here are some of the common names (this list is certainly not
7691      exhaustive):
7692
7693     `nfs'
7694           An NFS file system, i.e., one mounted over a network from
7695           another machine.  This is the one type name which seems to be
7696           used uniformly by all systems.
7697
7698     `4.2, ufs, efs...'
7699           A file system on a locally-mounted hard disk.  (The system
7700           might even support more than one type here; Linux does.)
7701
7702     `hsfs, cdfs'
7703           A file system on a CD-ROM drive.  HP-UX uses `cdfs', most
7704           other systems use `hsfs' (`hs' for "High Sierra").
7705
7706     `pcfs'
7707           An MS-DOS file system, usually on a diskette.
7708
7709
7710 `-x FSTYPE'
7711 `--exclude-type=FSTYPE'
7712      Limit the listing to file systems not of type FSTYPE.  Multiple
7713      file system types can be eliminated by giving multiple `-x'
7714      options.  By default, no file system types are omitted.
7715
7716 `-v'
7717      Ignored; for compatibility with System V versions of `df'.
7718
7719
7720    An exit status of zero indicates success, and a nonzero value
7721 indicates failure.  Failure includes the case where no output is
7722 generated, so you can inspect the exit status of a command like `df -t
7723 ext3 -t reiserfs DIR' to test whether DIR is on a file system of type
7724 `ext3' or `reiserfs'.
7725
7726 \1f
7727 File: coreutils.info,  Node: du invocation,  Next: stat invocation,  Prev: df invocation,  Up: Disk usage
7728
7729 14.2 `du': Estimate file space usage
7730 ====================================
7731
7732 `du' reports the amount of disk space used by the specified files and
7733 for each subdirectory (of directory arguments).  Synopsis:
7734
7735      du [OPTION]... [FILE]...
7736
7737    With no arguments, `du' reports the disk space for the current
7738 directory.  Normally the disk space is printed in units of 1024 bytes,
7739 but this can be overridden (*note Block size::).  Non-integer
7740 quantities are rounded up to the next higher unit.
7741
7742    The program accepts the following options.  Also see *Note Common
7743 options::.
7744
7745 `-a'
7746 `--all'
7747      Show counts for all files, not just directories.
7748
7749 `--apparent-size'
7750      Print apparent sizes, rather than disk usage.  The apparent size
7751      of a file is the number of bytes reported by `wc -c' on regular
7752      files, or more generally, `ls -l --block-size=1' or `stat
7753      --format=%s'.  For example, a file containing the word `zoo' with
7754      no newline would, of course, have an apparent size of 3.  Such a
7755      small file may require anywhere from 0 to 16 KiB or more of disk
7756      space, depending on the type and configuration of the file system
7757      on which the file resides.  However, a sparse file created with
7758      this command:
7759
7760           dd bs=1 seek=2GiB if=/dev/null of=big
7761
7762      has an apparent size of 2 GiB, yet on most modern systems, it
7763      actually uses almost no disk space.
7764
7765 `-b'
7766 `--bytes'
7767      Equivalent to `--apparent-size --block-size=1'.
7768
7769 `-B SIZE'
7770 `--block-size=SIZE'
7771      Scale sizes by SIZE before printing them (*note Block size::).
7772      For example, `-BG' prints sizes in units of 1,073,741,824 bytes.
7773
7774 `-c'
7775 `--total'
7776      Print a grand total of all arguments after all arguments have been
7777      processed.  This can be used to find out the total disk usage of a
7778      given set of files or directories.
7779
7780 `-D'
7781 `--dereference-args'
7782      Dereference symbolic links that are command line arguments.  Does
7783      not affect other symbolic links.  This is helpful for finding out
7784      the disk usage of directories, such as `/usr/tmp', which are often
7785      symbolic links.
7786
7787 `--files0-from=FILE'
7788      Rather than processing files named on the command line, process
7789      those named in file FILE; each name is terminated by a null byte.
7790      This is useful with the `--total' (`-c') option when the list of
7791      file names is so long that it may exceed a command line length
7792      limitation.  In such cases, running `du' via `xargs' is undesirable
7793      because it splits the list into pieces and makes `du' print a
7794      total for each sublist rather than for the entire list.  One way
7795      to produce a list of null-byte-terminated file names is with GNU
7796      `find', using its `-print0' predicate.  Do not specify any FILE on
7797      the command line when using this option.
7798
7799 `-h'
7800 `--human-readable'
7801      Append a size letter to each size, such as `M' for mebibytes.
7802      Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes.
7803      Use the `--si' option if you prefer powers of 1000.
7804
7805 `-H'
7806      Currently, `-H' is the same as `--si', except that `-H' evokes a
7807      warning.  This option will be changed to be equivalent to
7808      `--dereference-args' (`-D').
7809
7810 `-k'
7811      Print sizes in 1024-byte blocks, overriding the default block size
7812      (*note Block size::).  This option is equivalent to
7813      `--block-size=1K'.
7814
7815 `-l'
7816 `--count-links'
7817      Count the size of all files, even if they have appeared already
7818      (as a hard link).
7819
7820 `-L'
7821 `--dereference'
7822      Dereference symbolic links (show the disk space used by the file
7823      or directory that the link points to instead of the space used by
7824      the link).
7825
7826 `-m'
7827      Print sizes in 1,048,576-byte blocks, overriding the default block
7828      size (*note Block size::).  This option is equivalent to
7829      `--block-size=1M'.
7830
7831 `-P'
7832 `--no-dereference'
7833      For each symbolic links encountered by `du', consider the disk
7834      space used by the symbolic link.
7835
7836 `--max-depth=DEPTH'
7837      Show the total for each directory (and file if -all) that is at
7838      most MAX_DEPTH levels down from the root of the hierarchy.  The
7839      root is at level 0, so `du --max-depth=0' is equivalent to `du -s'.
7840
7841 `-0'
7842 `--null'
7843      Output a null byte at the end of each line, rather than a newline.
7844      This option enables other programs to parse the output of `du'
7845      even when that output would contain file names with embedded
7846      newlines.
7847
7848 `--si'
7849      Append an SI-style abbreviation to each size, such as `MB' for
7850      megabytes.  Powers of 1000 are used, not 1024; `MB' stands for
7851      1,000,000 bytes.  Use the `-h' or `--human-readable' option if you
7852      prefer powers of 1024.
7853
7854 `-s'
7855 `--summarize'
7856      Display only a total for each argument.
7857
7858 `-S'
7859 `--separate-dirs'
7860      Report the size of each directory separately, not including the
7861      sizes of subdirectories.
7862
7863 `--time'
7864      Show time of the most recent modification of any file in the
7865      directory, or any of its subdirectories.
7866
7867 `--time=ctime'
7868 `--time=status'
7869 `--time=use'
7870      Show the most recent status change time (the `ctime' in the inode)
7871      of any file in the directory, instead of the modification time.
7872
7873 `--time=atime'
7874 `--time=access'
7875      Show the most recent access time (the `atime' in the inode) of any
7876      file in the directory, instead of the modification time.
7877
7878 `--time-style=STYLE'
7879      List timestamps in style STYLE.  This option has an effect only if
7880      the `--time' option is also specified.  The STYLE should be one of
7881      the following:
7882
7883     `+FORMAT'
7884           List timestamps using FORMAT, where FORMAT is interpreted
7885           like the format argument of `date' (*note date invocation::).
7886           For example, `--time-style="+%Y-%m-%d %H:%M:%S"' causes `du'
7887           to list timestamps like `2002-03-30 23:45:56'.  As with
7888           `date', FORMAT's interpretation is affected by the `LC_TIME'
7889           locale category.
7890
7891     `full-iso'
7892           List timestamps in full using ISO 8601 date, time, and time
7893           zone format with nanosecond precision, e.g., `2002-03-30
7894           23:45:56.477817180 -0700'.  This style is equivalent to
7895           `+%Y-%m-%d %H:%M:%S.%N %z'.
7896
7897     `long-iso'
7898           List ISO 8601 date and time in minutes, e.g., `2002-03-30
7899           23:45'.  These timestamps are shorter than `full-iso'
7900           timestamps, and are usually good enough for everyday work.
7901           This style is equivalent to `+%Y-%m-%d %H:%M'.
7902
7903     `iso'
7904           List ISO 8601 dates for timestamps, e.g., `2002-03-30'.  This
7905           style is equivalent to `+%Y-%m-%d'.
7906
7907      You can specify the default value of the `--time-style' option
7908      with the environment variable `TIME_STYLE'; if `TIME_STYLE' is not
7909      set the default style is `long-iso'.  For compatibility with `ls',
7910      if `TIME_STYLE' begins with `+' and contains a newline, the
7911      newline and any later characters are ignored; if `TIME_STYLE'
7912      begins with `posix-' the `posix-' is ignored; and if `TIME_STYLE'
7913      is `locale' it is ignored.
7914
7915 `-x'
7916 `--one-file-system'
7917      Skip directories that are on different file systems from the one
7918      that the argument being processed is on.
7919
7920 `--exclude=PATTERN'
7921      When recursing, skip subdirectories or files matching PATTERN.
7922      For example, `du --exclude='*.o'' excludes files whose names end
7923      in `.o'.
7924
7925 `-X FILE'
7926 `--exclude-from=FILE'
7927      Like `--exclude', except take the patterns to exclude from FILE,
7928      one per line.  If FILE is `-', take the patterns from standard
7929      input.
7930
7931
7932    On BSD systems, `du' reports sizes that are half the correct values
7933 for files that are NFS-mounted from HP-UX systems.  On HP-UX systems,
7934 it reports sizes that are twice the correct values for files that are
7935 NFS-mounted from BSD systems.  This is due to a flaw in HP-UX; it also
7936 affects the HP-UX `du' program.
7937
7938    An exit status of zero indicates success, and a nonzero value
7939 indicates failure.
7940
7941 \1f
7942 File: coreutils.info,  Node: stat invocation,  Next: sync invocation,  Prev: du invocation,  Up: Disk usage
7943
7944 14.3 `stat': Report file or file system status
7945 ==============================================
7946
7947 `stat' displays information about the specified file(s).  Synopsis:
7948
7949      stat [OPTION]... [FILE]...
7950
7951    With no option, `stat' reports all information about the given files.
7952 But it also can be used to report the information of the file systems
7953 the given files are located on.  If the files are links, `stat' can
7954 also give information about the files the links point to.
7955
7956 `-L'
7957 `--dereference'
7958      Change how `stat' treats symbolic links.  With this option, `stat'
7959      acts on the file referenced by each symbolic link argument.
7960      Without it, `stat' acts on any symbolic link argument directly.
7961
7962 `-f'
7963 `--file-system'
7964      Report information about the file systems where the given files
7965      are located instead of information about the files themselves.
7966
7967 `-c'
7968 `--format=FORMAT'
7969      Use FORMAT rather than the default format.  FORMAT is
7970      automatically newline-terminated, so running a command like the
7971      following with two or more FILE operands produces a line of output
7972      for each operand:
7973           $ stat --format=%d:%i / /usr
7974           2050:2
7975           2057:2
7976
7977 `--printf=FORMAT'
7978      Use FORMAT rather than the default format.  Like `--format', but
7979      interpret backslash escapes, and do not output a mandatory
7980      trailing newline.  If you want a newline, include `\n' in the
7981      FORMAT.  Here's how you would use `--printf' to print the device
7982      and inode numbers of `/' and `/usr':
7983           $ stat --printf='%d:%i\n' / /usr
7984           2050:2
7985           2057:2
7986
7987 `-t'
7988 `--terse'
7989      Print the information in terse form, suitable for parsing by other
7990      programs.
7991
7992      The valid format sequences for files are:
7993
7994         * %a - Access rights in octal
7995
7996         * %A - Access rights in human readable form
7997
7998         * %b - Number of blocks allocated (see `%B')
7999
8000         * %B - The size in bytes of each block reported by `%b'
8001
8002         * %d - Device number in decimal
8003
8004         * %D - Device number in hex
8005
8006         * %f - Raw mode in hex
8007
8008         * %F - File type
8009
8010         * %g - Group ID of owner
8011
8012         * %G - Group name of owner
8013
8014         * %h - Number of hard links
8015
8016         * %i - Inode number
8017
8018         * %n - File name
8019
8020         * %N - Quoted file name with dereference if symbolic link
8021
8022         * %o - I/O block size
8023
8024         * %s - Total size, in bytes
8025
8026         * %t - Major device type in hex
8027
8028         * %T - Minor device type in hex
8029
8030         * %u - User ID of owner
8031
8032         * %U - User name of owner
8033
8034         * %x - Time of last access
8035
8036         * %X - Time of last access as seconds since Epoch
8037
8038         * %y - Time of last modification
8039
8040         * %Y - Time of last modification as seconds since Epoch
8041
8042         * %z - Time of last change
8043
8044         * %Z - Time of last change as seconds since Epoch
8045
8046      The valid format sequences for file systems are:
8047
8048         * %a - Free blocks available to non-super-user
8049
8050         * %b - Total data blocks in file system
8051
8052         * %c - Total file nodes in file system
8053
8054         * %d - Free file nodes in file system
8055
8056         * %f - Free blocks in file system
8057
8058         * %i - File System ID in hex
8059
8060         * %l - Maximum length of file names
8061
8062         * %n - File name
8063
8064         * %s - Block size (for faster transfers)
8065
8066         * %S - Fundamental block size (for block counts)
8067
8068         * %t - Type in hex
8069
8070         * %T - Type in human readable form
8071
8072      Time stamps are listed according to the time zone rules specified
8073      by the `TZ' environment variable, or by the system default rules if
8074      `TZ' is not set.  *Note Specifying the Time Zone with `TZ':
8075      (libc)TZ Variable.
8076
8077    An exit status of zero indicates success, and a nonzero value
8078 indicates failure.
8079
8080 \1f
8081 File: coreutils.info,  Node: sync invocation,  Prev: stat invocation,  Up: Disk usage
8082
8083 14.4 `sync': Synchronize data on disk with memory
8084 =================================================
8085
8086 `sync' writes any data buffered in memory out to disk.  This can
8087 include (but is not limited to) modified superblocks, modified inodes,
8088 and delayed reads and writes.  This must be implemented by the kernel;
8089 The `sync' program does nothing but exercise the `sync' system call.
8090
8091    The kernel keeps data in memory to avoid doing (relatively slow) disk
8092 reads and writes.  This improves performance, but if the computer
8093 crashes, data may be lost or the file system corrupted as a result.
8094 The `sync' command ensures everything in memory is written to disk.
8095
8096    Any arguments are ignored, except for a lone `--help' or `--version'
8097 (*note Common options::).
8098
8099    An exit status of zero indicates success, and a nonzero value
8100 indicates failure.
8101
8102 \1f
8103 File: coreutils.info,  Node: Printing text,  Next: Conditions,  Prev: Disk usage,  Up: Top
8104
8105 15 Printing text
8106 ****************
8107
8108 This section describes commands that display text strings.
8109
8110 * Menu:
8111
8112 * echo invocation::             Print a line of text.
8113 * printf invocation::           Format and print data.
8114 * yes invocation::              Print a string until interrupted.
8115
8116 \1f
8117 File: coreutils.info,  Node: echo invocation,  Next: printf invocation,  Up: Printing text
8118
8119 15.1 `echo': Print a line of text
8120 =================================
8121
8122 `echo' writes each given STRING to standard output, with a space
8123 between each and a newline after the last one.  Synopsis:
8124
8125      echo [OPTION]... [STRING]...
8126
8127    The program accepts the following options.  Also see *Note Common
8128 options::.  Options must precede operands, and the normally-special
8129 argument `--' has no special meaning and is treated like any other
8130 STRING.
8131
8132 `-n'
8133      Do not output the trailing newline.
8134
8135 `-e'
8136      Enable interpretation of the following backslash-escaped
8137      characters in each STRING:
8138
8139     `\a'
8140           alert (bell)
8141
8142     `\b'
8143           backspace
8144
8145     `\c'
8146           suppress trailing newline
8147
8148     `\f'
8149           form feed
8150
8151     `\n'
8152           new line
8153
8154     `\r'
8155           carriage return
8156
8157     `\t'
8158           horizontal tab
8159
8160     `\v'
8161           vertical tab
8162
8163     `\\'
8164           backslash
8165
8166     `\0NNN'
8167           the eight-bit value that is the octal number NNN (zero to
8168           three octal digits)
8169
8170     `\NNN'
8171           the eight-bit value that is the octal number NNN (one to
8172           three octal digits)
8173
8174     `\xHH'
8175           the eight-bit value that is the hexadecimal number HH (one or
8176           two hexadecimal digits)
8177
8178 `-E'
8179      Disable interpretation of backslash escapes in each STRING.  This
8180      is the default.  If `-e' and `-E' are both specified, the last one
8181      given takes effect.
8182
8183
8184    If the `POSIXLY_CORRECT' environment variable is set, then when
8185 `echo''s first argument is not `-n' it outputs option-like arguments
8186 instead of treating them as options.  For example, `echo -ne hello'
8187 outputs `-ne hello' instead of plain `hello'.
8188
8189    POSIX does not require support for any options, and says that the
8190 behavior of `echo' is implementation-defined if any STRING contains a
8191 backslash or if the first argument is `-n'.  Portable programs can use
8192 the `printf' command if they need to omit trailing newlines or output
8193 control characters or backslashes.  *Note printf invocation::.
8194
8195    An exit status of zero indicates success, and a nonzero value
8196 indicates failure.
8197
8198 \1f
8199 File: coreutils.info,  Node: printf invocation,  Next: yes invocation,  Prev: echo invocation,  Up: Printing text
8200
8201 15.2 `printf': Format and print data
8202 ====================================
8203
8204 `printf' does formatted printing of text.  Synopsis:
8205
8206      printf FORMAT [ARGUMENT]...
8207
8208    `printf' prints the FORMAT string, interpreting `%' directives and
8209 `\' escapes to format numeric and string arguments in a way that is
8210 mostly similar to the C `printf' function.  The differences are as
8211 follows:
8212
8213    * The FORMAT argument is reused as necessary to convert all the
8214      given ARGUMENTs.  For example, the command `printf %s a b' outputs
8215      `ab'.
8216
8217    * Missing ARGUMENTs are treated as null strings or as zeros,
8218      depending on whether the context expects a string or a number.  For
8219      example, the command `printf %sx%d' prints `x0'.
8220
8221    * An additional escape, `\c', causes `printf' to produce no further
8222      output.  For example, the command `printf 'A%sC\cD%sF' B E' prints
8223      `ABC'.
8224
8225    * The hexadecimal escape sequence `\xHH' has at most two digits, as
8226      opposed to C where it can have an unlimited number of digits.  For
8227      example, the command `printf '\x07e'' prints two bytes, whereas
8228      the C statement `printf ("\x07e")' prints just one.
8229
8230    * `printf' has an additional directive, `%b', which prints its
8231      argument string with `\' escapes interpreted in the same way as in
8232      the FORMAT string, except that octal escapes are of the form
8233      `\0OOO' where OOO is 0 to 3 octal digits.  If a precision is also
8234      given, it limits the number of bytes printed from the converted
8235      string.
8236
8237    * Numeric arguments must be single C constants, possibly with leading
8238      `+' or `-'.  For example, `printf %.4d -3' outputs `-0003'.
8239
8240    * If the leading character of a numeric argument is `"' or `'' then
8241      its value is the numeric value of the immediately following
8242      character.  Any remaining characters are silently ignored if the
8243      `POSIXLY_CORRECT' environment variable is set; otherwise, a
8244      warning is printed.  For example, `printf "%d" "'a"' outputs `97'
8245      on hosts that use the ASCII character set, since `a' has the
8246      numeric value 97 in ASCII.
8247
8248
8249    A floating-point argument must use a period before any fractional
8250 digits, but is printed according to the `LC_NUMERIC' category of the
8251 current locale.  For example, in a locale whose radix character is a
8252 comma, the command `printf %g 3.14' outputs `3,14' whereas the command
8253 `printf %g 3,14' is an error.
8254
8255    `printf' interprets `\OOO' in FORMAT as an octal number (if OOO is 1
8256 to 3 octal digits) specifying a character to print, and `\xHH' as a
8257 hexadecimal number (if HH is 1 to 2 hex digits) specifying a character
8258 to print.
8259
8260    `printf' interprets two character syntaxes introduced in ISO C 99:
8261 `\u' for 16-bit Unicode (ISO/IEC 10646) characters, specified as four
8262 hexadecimal digits HHHH, and `\U' for 32-bit Unicode characters,
8263 specified as eight hexadecimal digits HHHHHHHH.  `printf' outputs the
8264 Unicode characters according to the `LC_CTYPE' locale.
8265
8266    The processing of `\u' and `\U' requires a full-featured `iconv'
8267 facility.  It is activated on systems with glibc 2.2 (or newer), or
8268 when `libiconv' is installed prior to this package.  Otherwise `\u' and
8269 `\U' will print as-is.
8270
8271    The only options are a lone `--help' or `--version'.  *Note Common
8272 options::.  Options must precede operands.
8273
8274    The Unicode character syntaxes are useful for writing strings in a
8275 locale independent way.  For example, a string containing the Euro
8276 currency symbol
8277
8278      $ /usr/local/bin/printf '\u20AC 14.95'
8279
8280 will be output correctly in all locales supporting the Euro symbol
8281 (ISO-8859-15, UTF-8, and others).  Similarly, a Chinese string
8282
8283      $ /usr/local/bin/printf '\u4e2d\u6587'
8284
8285 will be output correctly in all Chinese locales (GB2312, BIG5, UTF-8,
8286 etc).
8287
8288    Note that in these examples, the full name of `printf' has been
8289 given, to distinguish it from the GNU `bash' built-in function `printf'.
8290
8291    For larger strings, you don't need to look up the hexadecimal code
8292 values of each character one by one.  ASCII characters mixed with \u
8293 escape sequences is also known as the JAVA source file encoding.  You
8294 can use GNU recode 3.5c (or newer) to convert strings to this encoding.
8295 Here is how to convert a piece of text into a shell script which will
8296 output this text in a locale-independent way:
8297
8298      $ LC_CTYPE=zh_CN.big5 /usr/local/bin/printf \
8299          '\u4e2d\u6587\n' > sample.txt
8300      $ recode BIG5..JAVA < sample.txt \
8301          | sed -e "s|^|/usr/local/bin/printf '|" -e "s|$|\\\\n'|" \
8302          > sample.sh
8303
8304    An exit status of zero indicates success, and a nonzero value
8305 indicates failure.
8306
8307 \1f
8308 File: coreutils.info,  Node: yes invocation,  Prev: printf invocation,  Up: Printing text
8309
8310 15.3 `yes': Print a string until interrupted
8311 ============================================
8312
8313 `yes' prints the command line arguments, separated by spaces and
8314 followed by a newline, forever until it is killed.  If no arguments are
8315 given, it prints `y' followed by a newline forever until killed.
8316
8317    Upon a write error, `yes' exits with status `1'.
8318
8319    The only options are a lone `--help' or `--version'.  To output an
8320 argument that begins with `-', precede it with `--', e.g., `yes --
8321 --help'.  *Note Common options::.
8322
8323 \1f
8324 File: coreutils.info,  Node: Conditions,  Next: Redirection,  Prev: Printing text,  Up: Top
8325
8326 16 Conditions
8327 *************
8328
8329 This section describes commands that are primarily useful for their exit
8330 status, rather than their output.  Thus, they are often used as the
8331 condition of shell `if' statements, or as the last command in a
8332 pipeline.
8333
8334 * Menu:
8335
8336 * false invocation::            Do nothing, unsuccessfully.
8337 * true invocation::             Do nothing, successfully.
8338 * test invocation::             Check file types and compare values.
8339 * expr invocation::             Evaluate expressions.
8340
8341 \1f
8342 File: coreutils.info,  Node: false invocation,  Next: true invocation,  Up: Conditions
8343
8344 16.1 `false': Do nothing, unsuccessfully
8345 ========================================
8346
8347 `false' does nothing except return an exit status of 1, meaning
8348 "failure".  It can be used as a place holder in shell scripts where an
8349 unsuccessful command is needed.  In most modern shells, `false' is a
8350 built-in command, so when you use `false' in a script, you're probably
8351 using the built-in command, not the one documented here.
8352
8353    `false' honors the `--help' and `--version' options.
8354
8355    This version of `false' is implemented as a C program, and is thus
8356 more secure and faster than a shell script implementation, and may
8357 safely be used as a dummy shell for the purpose of disabling accounts.
8358
8359    Note that `false' (unlike all other programs documented herein)
8360 exits unsuccessfully, even when invoked with `--help' or `--version'.
8361
8362    Portable programs should not assume that the exit status of `false'
8363 is 1, as it is greater than 1 on some non-GNU hosts.
8364
8365 \1f
8366 File: coreutils.info,  Node: true invocation,  Next: test invocation,  Prev: false invocation,  Up: Conditions
8367
8368 16.2 `true': Do nothing, successfully
8369 =====================================
8370
8371 `true' does nothing except return an exit status of 0, meaning
8372 "success".  It can be used as a place holder in shell scripts where a
8373 successful command is needed, although the shell built-in command `:'
8374 (colon) may do the same thing faster.  In most modern shells, `true' is
8375 a built-in command, so when you use `true' in a script, you're probably
8376 using the built-in command, not the one documented here.
8377
8378    `true' honors the `--help' and `--version' options.
8379
8380    Note, however, that it is possible to cause `true' to exit with
8381 nonzero status: with the `--help' or `--version' option, and with
8382 standard output already closed or redirected to a file that evokes an
8383 I/O error.  For example, using a Bourne-compatible shell:
8384
8385      $ ./true --version >&-
8386      ./true: write error: Bad file number
8387      $ ./true --version > /dev/full
8388      ./true: write error: No space left on device
8389
8390    This version of `true' is implemented as a C program, and is thus
8391 more secure and faster than a shell script implementation, and may
8392 safely be used as a dummy shell for the purpose of disabling accounts.
8393
8394 \1f
8395 File: coreutils.info,  Node: test invocation,  Next: expr invocation,  Prev: true invocation,  Up: Conditions
8396
8397 16.3 `test': Check file types and compare values
8398 ================================================
8399
8400 `test' returns a status of 0 (true) or 1 (false) depending on the
8401 evaluation of the conditional expression EXPR.  Each part of the
8402 expression must be a separate argument.
8403
8404    `test' has file status checks, string operators, and numeric
8405 comparison operators.
8406
8407    `test' has an alternate form that uses opening and closing square
8408 brackets instead a leading `test'.  For example, instead of `test -d
8409 /', you can write `[ -d / ]'.  The square brackets must be separate
8410 arguments; for example, `[-d /]' does not have the desired effect.
8411 Since `test EXPR' and `[ EXPR ]' have the same meaning, only the former
8412 form is discussed below.
8413
8414    Synopses:
8415
8416      test EXPRESSION
8417      test
8418      [ EXPRESSION ]
8419      [ ]
8420      [ OPTION
8421
8422    Because most shells have a built-in `test' command, using an
8423 unadorned `test' in a script or interactively may get you different
8424 functionality than that described here.
8425
8426    If EXPRESSION is omitted, `test' returns false.  If EXPRESSION is a
8427 single argument, `test' returns false if the argument is null and true
8428 otherwise.  The argument can be any string, including strings like
8429 `-d', `-1', `--', `--help', and `--version' that most other programs
8430 would treat as options.  To get help and version information, invoke
8431 the commands `[ --help' and `[ --version', without the usual closing
8432 brackets.  *Note Common options::.
8433
8434    Exit status:
8435
8436      0 if the expression is true,
8437      1 if the expression is false,
8438      2 if an error occurred.
8439
8440 * Menu:
8441
8442 * File type tests::             -[bcdfhLpSt]
8443 * Access permission tests::     -[gkruwxOG]
8444 * File characteristic tests::   -e -s -nt -ot -ef
8445 * String tests::                -z -n = !=
8446 * Numeric tests::               -eq -ne -lt -le -gt -ge
8447 * Connectives for test::        ! -a -o
8448
8449 \1f
8450 File: coreutils.info,  Node: File type tests,  Next: Access permission tests,  Up: test invocation
8451
8452 16.3.1 File type tests
8453 ----------------------
8454
8455 These options test for particular types of files.  (Everything's a file,
8456 but not all files are the same!)
8457
8458 `-b FILE'
8459      True if FILE exists and is a block special device.
8460
8461 `-c FILE'
8462      True if FILE exists and is a character special device.
8463
8464 `-d FILE'
8465      True if FILE exists and is a directory.
8466
8467 `-f FILE'
8468      True if FILE exists and is a regular file.
8469
8470 `-h FILE'
8471 `-L FILE'
8472      True if FILE exists and is a symbolic link.  Unlike all other
8473      file-related tests, this test does not dereference FILE if it is a
8474      symbolic link.
8475
8476 `-p FILE'
8477      True if FILE exists and is a named pipe.
8478
8479 `-S FILE'
8480      True if FILE exists and is a socket.
8481
8482 `-t FD'
8483      True if FD is a file descriptor that is associated with a terminal.
8484
8485
8486 \1f
8487 File: coreutils.info,  Node: Access permission tests,  Next: File characteristic tests,  Prev: File type tests,  Up: test invocation
8488
8489 16.3.2 Access permission tests
8490 ------------------------------
8491
8492 These options test for particular access permissions.
8493
8494 `-g FILE'
8495      True if FILE exists and has its set-group-ID bit set.
8496
8497 `-k FILE'
8498      True if FILE exists and has its "sticky" bit set.
8499
8500 `-r FILE'
8501      True if FILE exists and read permission is granted.
8502
8503 `-u FILE'
8504      True if FILE exists and has its set-user-ID bit set.
8505
8506 `-w FILE'
8507      True if FILE exists and write permission is granted.
8508
8509 `-x FILE'
8510      True if FILE exists and execute permission is granted (or search
8511      permission, if it is a directory).
8512
8513 `-O FILE'
8514      True if FILE exists and is owned by the current effective user ID.
8515
8516 `-G FILE'
8517      True if FILE exists and is owned by the current effective group ID.
8518
8519
8520 \1f
8521 File: coreutils.info,  Node: File characteristic tests,  Next: String tests,  Prev: Access permission tests,  Up: test invocation
8522
8523 16.3.3 File characteristic tests
8524 --------------------------------
8525
8526 These options test other file characteristics.
8527
8528 `-e FILE'
8529      True if FILE exists.
8530
8531 `-s FILE'
8532      True if FILE exists and has a size greater than zero.
8533
8534 `FILE1 -nt FILE2'
8535      True if FILE1 is newer (according to modification date) than
8536      FILE2, or if FILE1 exists and FILE2 does not.
8537
8538 `FILE1 -ot FILE2'
8539      True if FILE1 is older (according to modification date) than
8540      FILE2, or if FILE2 exists and FILE1 does not.
8541
8542 `FILE1 -ef FILE2'
8543      True if FILE1 and FILE2 have the same device and inode numbers,
8544      i.e., if they are hard links to each other.
8545
8546
8547 \1f
8548 File: coreutils.info,  Node: String tests,  Next: Numeric tests,  Prev: File characteristic tests,  Up: test invocation
8549
8550 16.3.4 String tests
8551 -------------------
8552
8553 These options test string characteristics.  You may need to quote
8554 STRING arguments for the shell.  For example:
8555
8556      test -n "$V"
8557
8558    The quotes here prevent the wrong arguments from being passed to
8559 `test' if `$V' is empty or contains special characters.
8560
8561 `-z STRING'
8562      True if the length of STRING is zero.
8563
8564 `-n STRING'
8565 `STRING'
8566      True if the length of STRING is nonzero.
8567
8568 `STRING1 = STRING2'
8569      True if the strings are equal.
8570
8571 `STRING1 != STRING2'
8572      True if the strings are not equal.
8573
8574
8575 \1f
8576 File: coreutils.info,  Node: Numeric tests,  Next: Connectives for test,  Prev: String tests,  Up: test invocation
8577
8578 16.3.5 Numeric tests
8579 --------------------
8580
8581 Numeric relationals.  The arguments must be entirely numeric (possibly
8582 negative), or the special expression `-l STRING', which evaluates to
8583 the length of STRING.
8584
8585 `ARG1 -eq ARG2'
8586 `ARG1 -ne ARG2'
8587 `ARG1 -lt ARG2'
8588 `ARG1 -le ARG2'
8589 `ARG1 -gt ARG2'
8590 `ARG1 -ge ARG2'
8591      These arithmetic binary operators return true if ARG1 is equal,
8592      not-equal, less-than, less-than-or-equal, greater-than, or
8593      greater-than-or-equal than ARG2, respectively.
8594
8595
8596    For example:
8597
8598      test -1 -gt -2 && echo yes
8599      => yes
8600      test -l abc -gt 1 && echo yes
8601      => yes
8602      test 0x100 -eq 1
8603      error--> test: integer expression expected before -eq
8604
8605 \1f
8606 File: coreutils.info,  Node: Connectives for test,  Prev: Numeric tests,  Up: test invocation
8607
8608 16.3.6 Connectives for `test'
8609 -----------------------------
8610
8611 The usual logical connectives.
8612
8613 `! EXPR'
8614      True if EXPR is false.
8615
8616 `EXPR1 -a EXPR2'
8617      True if both EXPR1 and EXPR2 are true.
8618
8619 `EXPR1 -o EXPR2'
8620      True if either EXPR1 or EXPR2 is true.
8621
8622
8623 \1f
8624 File: coreutils.info,  Node: expr invocation,  Prev: test invocation,  Up: Conditions
8625
8626 16.4 `expr': Evaluate expressions
8627 =================================
8628
8629 `expr' evaluates an expression and writes the result on standard
8630 output.  Each token of the expression must be a separate argument.
8631
8632    Operands are either integers or strings.  Integers consist of one or
8633 more decimal digits, with an optional leading `-'.  `expr' converts
8634 anything appearing in an operand position to an integer or a string
8635 depending on the operation being applied to it.
8636
8637    Strings are not quoted for `expr' itself, though you may need to
8638 quote them to protect characters with special meaning to the shell,
8639 e.g., spaces.  However, regardless of whether it is quoted, a string
8640 operand should not be a parenthesis or any of `expr''s operators like
8641 `+', so you cannot safely pass an arbitrary string `$str' to expr
8642 merely by quoting it to the shell.  One way to work around this is to
8643 use the GNU extension `+', (e.g., `+ "$str" = foo'); a more portable
8644 way is to use `" $str"' and to adjust the rest of the expression to take
8645 the leading space into account (e.g., `" $str" = " foo"').
8646
8647    You should not pass a negative integer or a string with leading `-'
8648 as `expr''s first argument, as it might be misinterpreted as an option;
8649 this can be avoided by parenthesization.  Also, portable scripts should
8650 not use a string operand that happens to take the form of an integer;
8651 this can be worked around by inserting leading spaces as mentioned
8652 above.
8653
8654    Operators may be given as infix symbols or prefix keywords.
8655 Parentheses may be used for grouping in the usual manner.  You must
8656 quote parentheses and many operators to avoid the shell evaluating them,
8657 however.
8658
8659    The only options are `--help' and `--version'.  *Note Common
8660 options::.  Options must precede operands.
8661
8662    Exit status:
8663
8664      0 if the expression is neither null nor 0,
8665      1 if the expression is null or 0,
8666      2 if the expression is invalid,
8667      3 if an internal error occurred (e.g., arithmetic overflow).
8668
8669 * Menu:
8670
8671 * String expressions::          + : match substr index length
8672 * Numeric expressions::         + - * / %
8673 * Relations for expr::          | & < <= = == != >= >
8674 * Examples of expr::            Examples.
8675
8676 \1f
8677 File: coreutils.info,  Node: String expressions,  Next: Numeric expressions,  Up: expr invocation
8678
8679 16.4.1 String expressions
8680 -------------------------
8681
8682 `expr' supports pattern matching and other string operators.  These
8683 have lower precedence than both the numeric and relational operators (in
8684 the next sections).
8685
8686 `STRING : REGEX'
8687      Perform pattern matching.  The arguments are converted to strings
8688      and the second is considered to be a (basic, a la GNU `grep')
8689      regular expression, with a `^' implicitly prepended.  The first
8690      argument is then matched against this regular expression.
8691
8692      If the match succeeds and REGEX uses `\(' and `\)', the `:'
8693      expression returns the part of STRING that matched the
8694      subexpression; otherwise, it returns the number of characters
8695      matched.
8696
8697      If the match fails, the `:' operator returns the null string if
8698      `\(' and `\)' are used in REGEX, otherwise 0.
8699
8700      Only the first `\( ... \)' pair is relevant to the return value;
8701      additional pairs are meaningful only for grouping the regular
8702      expression operators.
8703
8704      In the regular expression, `\+', `\?', and `\|' are operators
8705      which respectively match one or more, zero or one, or separate
8706      alternatives.  SunOS and other `expr''s treat these as regular
8707      characters.  (POSIX allows either behavior.)  *Note Regular
8708      Expression Library: (regex)Top, for details of regular expression
8709      syntax.  Some examples are in *Note Examples of expr::.
8710
8711 `match STRING REGEX'
8712      An alternative way to do pattern matching.  This is the same as
8713      `STRING : REGEX'.
8714
8715 `substr STRING POSITION LENGTH'
8716      Returns the substring of STRING beginning at POSITION with length
8717      at most LENGTH.  If either POSITION or LENGTH is negative, zero,
8718      or non-numeric, returns the null string.
8719
8720 `index STRING CHARSET'
8721      Returns the first position in STRING where the first character in
8722      CHARSET was found.  If no character in CHARSET is found in STRING,
8723      return 0.
8724
8725 `length STRING'
8726      Returns the length of STRING.
8727
8728 `+ TOKEN'
8729      Interpret TOKEN as a string, even if it is a keyword like MATCH or
8730      an operator like `/'.  This makes it possible to test `expr length
8731      + "$x"' or `expr + "$x" : '.*/\(.\)'' and have it do the right
8732      thing even if the value of $X happens to be (for example) `/' or
8733      `index'.  This operator is a GNU extension.  Portable shell
8734      scripts should use `" $token" : ' \(.*\)'' instead of `+ "$token"'.
8735
8736
8737    To make `expr' interpret keywords as strings, you must use the
8738 `quote' operator.
8739
8740 \1f
8741 File: coreutils.info,  Node: Numeric expressions,  Next: Relations for expr,  Prev: String expressions,  Up: expr invocation
8742
8743 16.4.2 Numeric expressions
8744 --------------------------
8745
8746 `expr' supports the usual numeric operators, in order of increasing
8747 precedence.  The string operators (previous section) have lower
8748 precedence, the connectives (next section) have higher.
8749
8750 `+ -'
8751      Addition and subtraction.  Both arguments are converted to
8752      integers; an error occurs if this cannot be done.
8753
8754 `* / %'
8755      Multiplication, division, remainder.  Both arguments are converted
8756      to integers; an error occurs if this cannot be done.
8757
8758
8759 \1f
8760 File: coreutils.info,  Node: Relations for expr,  Next: Examples of expr,  Prev: Numeric expressions,  Up: expr invocation
8761
8762 16.4.3 Relations for `expr'
8763 ---------------------------
8764
8765 `expr' supports the usual logical connectives and relations.  These are
8766 higher precedence than either the string or numeric operators (previous
8767 sections).  Here is the list, lowest-precedence operator first.
8768
8769 `|'
8770      Returns its first argument if that is neither null nor zero,
8771      otherwise its second argument if it is neither null nor zero,
8772      otherwise 0.  It does not evaluate its second argument if its
8773      first argument is neither null nor zero.
8774
8775 `&'
8776      Return its first argument if neither argument is null or zero,
8777      otherwise 0.  It does not evaluate its second argument if its
8778      first argument is null or zero.
8779
8780 `< <= = == != >= >'
8781      Compare the arguments and return 1 if the relation is true, 0
8782      otherwise.  `==' is a synonym for `='.  `expr' first tries to
8783      convert both arguments to integers and do a numeric comparison; if
8784      either conversion fails, it does a lexicographic comparison using
8785      the character collating sequence specified by the `LC_COLLATE'
8786      locale.
8787
8788
8789 \1f
8790 File: coreutils.info,  Node: Examples of expr,  Prev: Relations for expr,  Up: expr invocation
8791
8792 16.4.4 Examples of using `expr'
8793 -------------------------------
8794
8795 Here are a few examples, including quoting for shell metacharacters.
8796
8797    To add 1 to the shell variable `foo', in Bourne-compatible shells:
8798
8799      foo=`expr $foo + 1`
8800
8801    To print the non-directory part of the file name stored in `$fname',
8802 which need not contain a `/':
8803
8804      expr $fname : '.*/\(.*\)' '|' $fname
8805
8806    An example showing that `\+' is an operator:
8807
8808      expr aaa : 'a\+'
8809      => 3
8810
8811      expr abc : 'a\(.\)c'
8812      => b
8813      expr index abcdef cz
8814      => 3
8815      expr index index a
8816      error--> expr: syntax error
8817      expr index quote index a
8818      => 0
8819
8820 \1f
8821 File: coreutils.info,  Node: Redirection,  Next: File name manipulation,  Prev: Conditions,  Up: Top
8822
8823 17 Redirection
8824 **************
8825
8826 Unix shells commonly provide several forms of "redirection"--ways to
8827 change the input source or output destination of a command.  But one
8828 useful redirection is performed by a separate command, not by the shell;
8829 it's described here.
8830
8831 * Menu:
8832
8833 * tee invocation::              Redirect output to multiple files.
8834
8835 \1f
8836 File: coreutils.info,  Node: tee invocation,  Up: Redirection
8837
8838 17.1 `tee': Redirect output to multiple files
8839 =============================================
8840
8841 The `tee' command copies standard input to standard output and also to
8842 any files given as arguments.  This is useful when you want not only to
8843 send some data down a pipe, but also to save a copy.  Synopsis:
8844
8845      tee [OPTION]... [FILE]...
8846
8847    If a file being written to does not already exist, it is created.
8848 If a file being written to already exists, the data it previously
8849 contained is overwritten unless the `-a' option is used.
8850
8851    A FILE of `-' causes `tee' to send another copy of input to standard
8852 output, but this is typically not that useful as the copies are
8853 interleaved.
8854
8855    The program accepts the following options.  Also see *Note Common
8856 options::.
8857
8858 `-a'
8859 `--append'
8860      Append standard input to the given files rather than overwriting
8861      them.
8862
8863 `-i'
8864 `--ignore-interrupts'
8865      Ignore interrupt signals.
8866
8867
8868    An exit status of zero indicates success, and a nonzero value
8869 indicates failure.
8870
8871 \1f
8872 File: coreutils.info,  Node: File name manipulation,  Next: Working context,  Prev: Redirection,  Up: Top
8873
8874 18 File name manipulation
8875 *************************
8876
8877 This section describes commands that manipulate file names.
8878
8879 * Menu:
8880
8881 * basename invocation::         Strip directory and suffix from a file name.
8882 * dirname invocation::          Strip non-directory suffix from a file name.
8883 * pathchk invocation::          Check file name portability.
8884
8885 \1f
8886 File: coreutils.info,  Node: basename invocation,  Next: dirname invocation,  Up: File name manipulation
8887
8888 18.1 `basename': Strip directory and suffix from a file name
8889 ============================================================
8890
8891 `basename' removes any leading directory components from NAME.
8892 Synopsis:
8893
8894      basename NAME [SUFFIX]
8895
8896    If SUFFIX is specified and is identical to the end of NAME, it is
8897 removed from NAME as well.  Note that since trailing slashes are
8898 removed prior to suffix matching, SUFFIX will do nothing if it contains
8899 slashes.  `basename' prints the result on standard output.
8900
8901    Together, `basename' and `dirname' are designed such that if `ls
8902 "$name"' succeeds, then the command sequence `cd "$(dirname "$name")";
8903 ls "$(basename "$name")"' will, too.  This works for everything except
8904 file names containing a trailing newline.
8905
8906    POSIX allows the implementation to define the results if NAME is
8907 empty or `//'.  In the former case, GNU `basename' returns the empty
8908 string.  In the latter case, the result is `//' on platforms where //
8909 is distinct from /, and `/' on platforms where there is no difference.
8910
8911    The only options are `--help' and `--version'.  *Note Common
8912 options::.  Options must precede operands.
8913
8914    An exit status of zero indicates success, and a nonzero value
8915 indicates failure.
8916
8917    Examples:
8918
8919      # Output "sort".
8920      basename /usr/bin/sort
8921
8922      # Output "stdio".
8923      basename include/stdio.h .h
8924
8925 \1f
8926 File: coreutils.info,  Node: dirname invocation,  Next: pathchk invocation,  Prev: basename invocation,  Up: File name manipulation
8927
8928 18.2 `dirname': Strip non-directory suffix from a file name
8929 ===========================================================
8930
8931 `dirname' prints all but the final slash-delimited component of a
8932 string (presumably a file name).  Synopsis:
8933
8934      dirname NAME
8935
8936    If NAME is a single component, `dirname' prints `.' (meaning the
8937 current directory).
8938
8939    Together, `basename' and `dirname' are designed such that if `ls
8940 "$name"' succeeds, then the command sequence `cd "$(dirname "$name")";
8941 ls "$(basename "$name")"' will, too.  This works for everything except
8942 file names containing a trailing newline.
8943
8944    POSIX allows the implementation to define the results if NAME is
8945 `//'.  With GNU `dirname', the result is `//' on platforms where // is
8946 distinct from /, and `/' on platforms where there is no difference.
8947
8948    The only options are `--help' and `--version'.  *Note Common
8949 options::.
8950
8951    An exit status of zero indicates success, and a nonzero value
8952 indicates failure.
8953
8954    Examples:
8955
8956      # Output "/usr/bin".
8957      dirname /usr/bin/sort
8958
8959      # Output ".".
8960      dirname stdio.h
8961
8962 \1f
8963 File: coreutils.info,  Node: pathchk invocation,  Prev: dirname invocation,  Up: File name manipulation
8964
8965 18.3 `pathchk': Check file name portability
8966 ===========================================
8967
8968 `pathchk' checks portability of file names.  Synopsis:
8969
8970      pathchk [OPTION]... NAME...
8971
8972    For each NAME, `pathchk' prints a message if any of these conditions
8973 is true:
8974
8975   1. One of the existing directories in NAME does not have search
8976      (execute) permission,
8977
8978   2. The length of NAME is larger than the maximum supported by the
8979      operating system.
8980
8981   3. The length of one component of NAME is longer than its file
8982      system's maximum.
8983
8984    A nonexistent NAME is not an error, so long a file with that name
8985 could be created under the above conditions.
8986
8987    The program accepts the following options.  Also see *Note Common
8988 options::.  Options must precede operands.
8989
8990 `-p'
8991      Instead of performing checks based on the underlying file system,
8992      print a message if any of these conditions is true:
8993
8994        1. A file name is empty.
8995
8996        2. The length of a file name or one of its components exceeds the
8997           POSIX minimum limits for portability.
8998
8999        3. A file name contains a character outside the portable file
9000           name character set, namely, the ASCII letters and digits, `-',
9001           `.', `/', and `_'.
9002
9003 `-P'
9004      Print a message if a file name is empty, or if it contains a
9005      component that begins with `-'.
9006
9007 `--portability'
9008      Print a message if a file name is not portable to all POSIX hosts.
9009      This option is equivalent to `-p -P'.
9010
9011
9012    Exit status:
9013
9014      0 if all specified file names passed all checks,
9015      1 otherwise.
9016
9017 \1f
9018 File: coreutils.info,  Node: Working context,  Next: User information,  Prev: File name manipulation,  Up: Top
9019
9020 19 Working context
9021 ******************
9022
9023 This section describes commands that display or alter the context in
9024 which you are working: the current directory, the terminal settings, and
9025 so forth.  See also the user-related commands in the next section.
9026
9027 * Menu:
9028
9029 * pwd invocation::              Print working directory.
9030 * stty invocation::             Print or change terminal characteristics.
9031 * printenv invocation::         Print environment variables.
9032 * tty invocation::              Print file name of terminal on standard input.
9033
9034 \1f
9035 File: coreutils.info,  Node: pwd invocation,  Next: stty invocation,  Up: Working context
9036
9037 19.1 `pwd': Print working directory
9038 ===================================
9039
9040 `pwd' prints the fully resolved name of the current directory.  That
9041 is, all components of the printed name will be actual directory
9042 names--none will be symbolic links.
9043
9044    Because most shells have a built-in `pwd' command, using an
9045 unadorned `pwd' in a script or interactively may get you different
9046 functionality than that described here.
9047
9048    The only options are a lone `--help' or `--version'.  *Note Common
9049 options::.
9050
9051    An exit status of zero indicates success, and a nonzero value
9052 indicates failure.
9053
9054 \1f
9055 File: coreutils.info,  Node: stty invocation,  Next: printenv invocation,  Prev: pwd invocation,  Up: Working context
9056
9057 19.2 `stty': Print or change terminal characteristics
9058 =====================================================
9059
9060 `stty' prints or changes terminal characteristics, such as baud rate.
9061 Synopses:
9062
9063      stty [OPTION] [SETTING]...
9064      stty [OPTION]
9065
9066    If given no line settings, `stty' prints the baud rate, line
9067 discipline number (on systems that support it), and line settings that
9068 have been changed from the values set by `stty sane'.  By default, mode
9069 reading and setting are performed on the tty line connected to standard
9070 input, although this can be modified by the `--file' option.
9071
9072    `stty' accepts many non-option arguments that change aspects of the
9073 terminal line operation, as described below.
9074
9075    The program accepts the following options.  Also see *Note Common
9076 options::.
9077
9078 `-a'
9079 `--all'
9080      Print all current settings in human-readable form.  This option
9081      may not be used in combination with any line settings.
9082
9083 `-F DEVICE'
9084 `--file=DEVICE'
9085      Set the line opened by the file name specified in DEVICE instead of
9086      the tty line connected to standard input.  This option is necessary
9087      because opening a POSIX tty requires use of the `O_NONDELAY' flag
9088      to prevent a POSIX tty from blocking until the carrier detect line
9089      is high if the `clocal' flag is not set.  Hence, it is not always
9090      possible to allow the shell to open the device in the traditional
9091      manner.
9092
9093 `-g'
9094 `--save'
9095      Print all current settings in a form that can be used as an
9096      argument to another `stty' command to restore the current
9097      settings.  This option may not be used in combination with any
9098      line settings.
9099
9100
9101    Many settings can be turned off by preceding them with a `-'.  Such
9102 arguments are marked below with "May be negated" in their description.
9103 The descriptions themselves refer to the positive case, that is, when
9104 _not_ negated (unless stated otherwise, of course).
9105
9106    Some settings are not available on all POSIX systems, since they use
9107 extensions.  Such arguments are marked below with "Non-POSIX" in their
9108 description.  On non-POSIX systems, those or other settings also may not
9109 be available, but it's not feasible to document all the variations: just
9110 try it and see.
9111
9112    An exit status of zero indicates success, and a nonzero value
9113 indicates failure.
9114
9115 * Menu:
9116
9117 * Control::                     Control settings
9118 * Input::                       Input settings
9119 * Output::                      Output settings
9120 * Local::                       Local settings
9121 * Combination::                 Combination settings
9122 * Characters::                  Special characters
9123 * Special::                     Special settings
9124
9125 \1f
9126 File: coreutils.info,  Node: Control,  Next: Input,  Up: stty invocation
9127
9128 19.2.1 Control settings
9129 -----------------------
9130
9131 Control settings:
9132
9133 `parenb'
9134      Generate parity bit in output and expect parity bit in input.  May
9135      be negated.
9136
9137 `parodd'
9138      Set odd parity (even if negated).  May be negated.
9139
9140 `cs5'
9141 `cs6'
9142 `cs7'
9143 `cs8'
9144      Set character size to 5, 6, 7, or 8 bits.
9145
9146 `hup'
9147 `hupcl'
9148      Send a hangup signal when the last process closes the tty.  May be
9149      negated.
9150
9151 `cstopb'
9152      Use two stop bits per character (one if negated).  May be negated.
9153
9154 `cread'
9155      Allow input to be received.  May be negated.
9156
9157 `clocal'
9158      Disable modem control signals.  May be negated.
9159
9160 `crtscts'
9161      Enable RTS/CTS flow control.  Non-POSIX.  May be negated.
9162
9163 \1f
9164 File: coreutils.info,  Node: Input,  Next: Output,  Prev: Control,  Up: stty invocation
9165
9166 19.2.2 Input settings
9167 ---------------------
9168
9169 `ignbrk'
9170      Ignore break characters.  May be negated.
9171
9172 `brkint'
9173      Make breaks cause an interrupt signal.  May be negated.
9174
9175 `ignpar'
9176      Ignore characters with parity errors.  May be negated.
9177
9178 `parmrk'
9179      Mark parity errors (with a 255-0-character sequence).  May be
9180      negated.
9181
9182 `inpck'
9183      Enable input parity checking.  May be negated.
9184
9185 `istrip'
9186      Clear high (8th) bit of input characters.  May be negated.
9187
9188 `inlcr'
9189      Translate newline to carriage return.  May be negated.
9190
9191 `igncr'
9192      Ignore carriage return.  May be negated.
9193
9194 `icrnl'
9195      Translate carriage return to newline.  May be negated.
9196
9197 `iutf8'
9198      Assume input characters are UTF-8 encoded.  May be negated.
9199
9200 `ixon'
9201      Enable XON/XOFF flow control (that is, `CTRL-S'/`CTRL-Q').  May be
9202      negated.
9203
9204 `ixoff'
9205 `tandem'
9206      Enable sending of `stop' character when the system input buffer is
9207      almost full, and `start' character when it becomes almost empty
9208      again.  May be negated.
9209
9210 `iuclc'
9211      Translate uppercase characters to lowercase.  Non-POSIX.  May be
9212      negated.
9213
9214 `ixany'
9215      Allow any character to restart output (only the start character if
9216      negated).  Non-POSIX.  May be negated.
9217
9218 `imaxbel'
9219      Enable beeping and not flushing input buffer if a character arrives
9220      when the input buffer is full.  Non-POSIX.  May be negated.
9221
9222 \1f
9223 File: coreutils.info,  Node: Output,  Next: Local,  Prev: Input,  Up: stty invocation
9224
9225 19.2.3 Output settings
9226 ----------------------
9227
9228 These arguments specify output-related operations.
9229
9230 `opost'
9231      Postprocess output.  May be negated.
9232
9233 `olcuc'
9234      Translate lowercase characters to uppercase.  Non-POSIX.  May be
9235      negated.
9236
9237 `ocrnl'
9238      Translate carriage return to newline.  Non-POSIX.  May be negated.
9239
9240 `onlcr'
9241      Translate newline to carriage return-newline.  Non-POSIX.  May be
9242      negated.
9243
9244 `onocr'
9245      Do not print carriage returns in the first column.  Non-POSIX.
9246      May be negated.
9247
9248 `onlret'
9249      Newline performs a carriage return.  Non-POSIX.  May be negated.
9250
9251 `ofill'
9252      Use fill (padding) characters instead of timing for delays.
9253      Non-POSIX.  May be negated.
9254
9255 `ofdel'
9256      Use delete characters for fill instead of null characters.
9257      Non-POSIX.  May be negated.
9258
9259 `nl1'
9260 `nl0'
9261      Newline delay style.  Non-POSIX.
9262
9263 `cr3'
9264 `cr2'
9265 `cr1'
9266 `cr0'
9267      Carriage return delay style.  Non-POSIX.
9268
9269 `tab3'
9270 `tab2'
9271 `tab1'
9272 `tab0'
9273      Horizontal tab delay style.  Non-POSIX.
9274
9275 `bs1'
9276 `bs0'
9277      Backspace delay style.  Non-POSIX.
9278
9279 `vt1'
9280 `vt0'
9281      Vertical tab delay style.  Non-POSIX.
9282
9283 `ff1'
9284 `ff0'
9285      Form feed delay style.  Non-POSIX.
9286
9287 \1f
9288 File: coreutils.info,  Node: Local,  Next: Combination,  Prev: Output,  Up: stty invocation
9289
9290 19.2.4 Local settings
9291 ---------------------
9292
9293 `isig'
9294      Enable `interrupt', `quit', and `suspend' special characters.  May
9295      be negated.
9296
9297 `icanon'
9298      Enable `erase', `kill', `werase', and `rprnt' special characters.
9299      May be negated.
9300
9301 `iexten'
9302      Enable non-POSIX special characters.  May be negated.
9303
9304 `echo'
9305      Echo input characters.  May be negated.
9306
9307 `echoe'
9308 `crterase'
9309      Echo `erase' characters as backspace-space-backspace.  May be
9310      negated.
9311
9312 `echok'
9313      Echo a newline after a `kill' character.  May be negated.
9314
9315 `echonl'
9316      Echo newline even if not echoing other characters.  May be negated.
9317
9318 `noflsh'
9319      Disable flushing after `interrupt' and `quit' special characters.
9320      May be negated.
9321
9322 `xcase'
9323      Enable input and output of uppercase characters by preceding their
9324      lowercase equivalents with `\', when `icanon' is set.  Non-POSIX.
9325      May be negated.
9326
9327 `tostop'
9328      Stop background jobs that try to write to the terminal.  Non-POSIX.
9329      May be negated.
9330
9331 `echoprt'
9332 `prterase'
9333      Echo erased characters backward, between `\' and `/'.  Non-POSIX.
9334      May be negated.
9335
9336 `echoctl'
9337 `ctlecho'
9338      Echo control characters in hat notation (`^C') instead of
9339      literally.  Non-POSIX.  May be negated.
9340
9341 `echoke'
9342 `crtkill'
9343      Echo the `kill' special character by erasing each character on the
9344      line as indicated by the `echoprt' and `echoe' settings, instead
9345      of by the `echoctl' and `echok' settings.  Non-POSIX.  May be
9346      negated.
9347
9348 \1f
9349 File: coreutils.info,  Node: Combination,  Next: Characters,  Prev: Local,  Up: stty invocation
9350
9351 19.2.5 Combination settings
9352 ---------------------------
9353
9354 Combination settings:
9355
9356 `evenp'
9357 `parity'
9358      Same as `parenb -parodd cs7'.  May be negated.  If negated, same
9359      as `-parenb cs8'.
9360
9361 `oddp'
9362      Same as `parenb parodd cs7'.  May be negated.  If negated, same as
9363      `-parenb cs8'.
9364
9365 `nl'
9366      Same as `-icrnl -onlcr'.  May be negated.  If negated, same as
9367      `icrnl -inlcr -igncr onlcr -ocrnl -onlret'.
9368
9369 `ek'
9370      Reset the `erase' and `kill' special characters to their default
9371      values.
9372
9373 `sane'
9374      Same as:
9375
9376           cread -ignbrk brkint -inlcr -igncr icrnl -ixoff
9377           -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr
9378           -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
9379           ff0 isig icanon iexten echo echoe echok -echonl
9380           -noflsh -xcase -tostop -echoprt echoctl echoke
9381
9382      and also sets all special characters to their default values.
9383
9384 `cooked'
9385      Same as `brkint ignpar istrip icrnl ixon opost isig icanon', plus
9386      sets the `eof' and `eol' characters to their default values if
9387      they are the same as the `min' and `time' characters.  May be
9388      negated.  If negated, same as `raw'.
9389
9390 `raw'
9391      Same as:
9392
9393           -ignbrk -brkint -ignpar -parmrk -inpck -istrip
9394           -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany
9395           -imaxbel -opost -isig -icanon -xcase min 1 time 0
9396
9397      May be negated.  If negated, same as `cooked'.
9398
9399 `cbreak'
9400      Same as `-icanon'.  May be negated.  If negated, same as `icanon'.
9401
9402 `pass8'
9403      Same as `-parenb -istrip cs8'.  May be negated.  If negated, same
9404      as `parenb istrip cs7'.
9405
9406 `litout'
9407      Same as `-parenb -istrip -opost cs8'.  May be negated.  If
9408      negated, same as `parenb istrip opost cs7'.
9409
9410 `decctlq'
9411      Same as `-ixany'.  Non-POSIX.  May be negated.
9412
9413 `tabs'
9414      Same as `tab0'.  Non-POSIX.  May be negated.  If negated, same as
9415      `tab3'.
9416
9417 `lcase'
9418 `LCASE'
9419      Same as `xcase iuclc olcuc'.  Non-POSIX.  May be negated.
9420
9421 `crt'
9422      Same as `echoe echoctl echoke'.
9423
9424 `dec'
9425      Same as `echoe echoctl echoke -ixany intr ^C erase ^? kill C-u'.
9426
9427 \1f
9428 File: coreutils.info,  Node: Characters,  Next: Special,  Prev: Combination,  Up: stty invocation
9429
9430 19.2.6 Special characters
9431 -------------------------
9432
9433 The special characters' default values vary from system to system.
9434 They are set with the syntax `name value', where the names are listed
9435 below and the value can be given either literally, in hat notation
9436 (`^C'), or as an integer which may start with `0x' to indicate
9437 hexadecimal, `0' to indicate octal, or any other digit to indicate
9438 decimal.
9439
9440    For GNU stty, giving a value of `^-' or `undef' disables that
9441 special character.  (This is incompatible with Ultrix `stty', which
9442 uses  a value of `u' to disable a special character.  GNU `stty' treats
9443 a value `u' like any other, namely to set that special character to
9444 <U>.)
9445
9446 `intr'
9447      Send an interrupt signal.
9448
9449 `quit'
9450      Send a quit signal.
9451
9452 `erase'
9453      Erase the last character typed.
9454
9455 `kill'
9456      Erase the current line.
9457
9458 `eof'
9459      Send an end of file (terminate the input).
9460
9461 `eol'
9462      End the line.
9463
9464 `eol2'
9465      Alternate character to end the line.  Non-POSIX.
9466
9467 `swtch'
9468      Switch to a different shell layer.  Non-POSIX.
9469
9470 `start'
9471      Restart the output after stopping it.
9472
9473 `stop'
9474      Stop the output.
9475
9476 `susp'
9477      Send a terminal stop signal.
9478
9479 `dsusp'
9480      Send a terminal stop signal after flushing the input.  Non-POSIX.
9481
9482 `rprnt'
9483      Redraw the current line.  Non-POSIX.
9484
9485 `werase'
9486      Erase the last word typed.  Non-POSIX.
9487
9488 `lnext'
9489      Enter the next character typed literally, even if it is a special
9490      character.  Non-POSIX.
9491
9492 \1f
9493 File: coreutils.info,  Node: Special,  Prev: Characters,  Up: stty invocation
9494
9495 19.2.7 Special settings
9496 -----------------------
9497
9498 `min N'
9499      Set the minimum number of characters that will satisfy a read until
9500      the time value has expired, when `-icanon' is set.
9501
9502 `time N'
9503      Set the number of tenths of a second before reads time out if the
9504      minimum number of characters have not been read, when `-icanon' is
9505      set.
9506
9507 `ispeed N'
9508      Set the input speed to N.
9509
9510 `ospeed N'
9511      Set the output speed to N.
9512
9513 `rows N'
9514      Tell the tty kernel driver that the terminal has N rows.
9515      Non-POSIX.
9516
9517 `cols N'
9518 `columns N'
9519      Tell the kernel that the terminal has N columns.  Non-POSIX.
9520
9521 `size'
9522      Print the number of rows and columns that the kernel thinks the
9523      terminal has.  (Systems that don't support rows and columns in the
9524      kernel typically use the environment variables `LINES' and
9525      `COLUMNS' instead; however, GNU `stty' does not know anything
9526      about them.)  Non-POSIX.
9527
9528 `line N'
9529      Use line discipline N.  Non-POSIX.
9530
9531 `speed'
9532      Print the terminal speed.
9533
9534 `N'
9535      Set the input and output speeds to N.  N can be one of: 0 50 75
9536      110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200 38400
9537      `exta' `extb'.  `exta' is the same as 19200; `extb' is the same as
9538      38400.  0 hangs up the line if `-clocal' is set.
9539
9540 \1f
9541 File: coreutils.info,  Node: printenv invocation,  Next: tty invocation,  Prev: stty invocation,  Up: Working context
9542
9543 19.3 `printenv': Print all or some environment variables
9544 ========================================================
9545
9546 `printenv' prints environment variable values.  Synopsis:
9547
9548      printenv [OPTION] [VARIABLE]...
9549
9550    If no VARIABLEs are specified, `printenv' prints the value of every
9551 environment variable.  Otherwise, it prints the value of each VARIABLE
9552 that is set, and nothing for those that are not set.
9553
9554    The only options are a lone `--help' or `--version'.  *Note Common
9555 options::.
9556
9557    Exit status:
9558
9559      0 if all variables specified were found
9560      1 if at least one specified variable was not found
9561      2 if a write error occurred
9562
9563 \1f
9564 File: coreutils.info,  Node: tty invocation,  Prev: printenv invocation,  Up: Working context
9565
9566 19.4 `tty': Print file name of terminal on standard input
9567 =========================================================
9568
9569 `tty' prints the file name of the terminal connected to its standard
9570 input.  It prints `not a tty' if standard input is not a terminal.
9571 Synopsis:
9572
9573      tty [OPTION]...
9574
9575    The program accepts the following option.  Also see *Note Common
9576 options::.
9577
9578 `-s'
9579 `--silent'
9580 `--quiet'
9581      Print nothing; only return an exit status.
9582
9583
9584    Exit status:
9585
9586      0 if standard input is a terminal
9587      1 if standard input is not a terminal
9588      2 if given incorrect arguments
9589      3 if a write error occurs
9590
9591 \1f
9592 File: coreutils.info,  Node: User information,  Next: System context,  Prev: Working context,  Up: Top
9593
9594 20 User information
9595 *******************
9596
9597 This section describes commands that print user-related information:
9598 logins, groups, and so forth.
9599
9600 * Menu:
9601
9602 * id invocation::               Print user identity.
9603 * logname invocation::          Print current login name.
9604 * whoami invocation::           Print effective user ID.
9605 * groups invocation::           Print group names a user is in.
9606 * users invocation::            Print login names of users currently logged in.
9607 * who invocation::              Print who is currently logged in.
9608
9609 \1f
9610 File: coreutils.info,  Node: id invocation,  Next: logname invocation,  Up: User information
9611
9612 20.1 `id': Print user identity
9613 ==============================
9614
9615 `id' prints information about the given user, or the process running it
9616 if no user is specified.  Synopsis:
9617
9618      id [OPTION]... [USERNAME]
9619
9620    By default, it prints the real user ID, real group ID, effective
9621 user ID if different from the real user ID, effective group ID if
9622 different from the real group ID, and supplemental group IDs.
9623
9624    Each of these numeric values is preceded by an identifying string and
9625 followed by the corresponding user or group name in parentheses.
9626
9627    The options cause `id' to print only part of the above information.
9628 Also see *Note Common options::.
9629
9630 `-g'
9631 `--group'
9632      Print only the group ID.
9633
9634 `-G'
9635 `--groups'
9636      Print only the group ID and the supplementary groups.
9637
9638 `-n'
9639 `--name'
9640      Print the user or group name instead of the ID number.  Requires
9641      `-u', `-g', or `-G'.
9642
9643 `-r'
9644 `--real'
9645      Print the real, instead of effective, user or group ID.  Requires
9646      `-u', `-g', or `-G'.
9647
9648 `-u'
9649 `--user'
9650      Print only the user ID.
9651
9652
9653    An exit status of zero indicates success, and a nonzero value
9654 indicates failure.
9655
9656 \1f
9657 File: coreutils.info,  Node: logname invocation,  Next: whoami invocation,  Prev: id invocation,  Up: User information
9658
9659 20.2 `logname': Print current login name
9660 ========================================
9661
9662 `logname' prints the calling user's name, as found in a
9663 system-maintained file (often `/var/run/utmp' or `/etc/utmp'), and
9664 exits with a status of 0.  If there is no entry for the calling
9665 process, `logname' prints an error message and exits with a status of 1.
9666
9667    The only options are `--help' and `--version'.  *Note Common
9668 options::.
9669
9670    An exit status of zero indicates success, and a nonzero value
9671 indicates failure.
9672
9673 \1f
9674 File: coreutils.info,  Node: whoami invocation,  Next: groups invocation,  Prev: logname invocation,  Up: User information
9675
9676 20.3 `whoami': Print effective user ID
9677 ======================================
9678
9679 `whoami' prints the user name associated with the current effective
9680 user ID.  It is equivalent to the command `id -un'.
9681
9682    The only options are `--help' and `--version'.  *Note Common
9683 options::.
9684
9685    An exit status of zero indicates success, and a nonzero value
9686 indicates failure.
9687
9688 \1f
9689 File: coreutils.info,  Node: groups invocation,  Next: users invocation,  Prev: whoami invocation,  Up: User information
9690
9691 20.4 `groups': Print group names a user is in
9692 =============================================
9693
9694 `groups' prints the names of the primary and any supplementary groups
9695 for each given USERNAME, or the current process if no names are given.
9696 If more than one name is given, the name of each user is printed before
9697 the list of that user's groups.  Synopsis:
9698
9699      groups [USERNAME]...
9700
9701    The group lists are equivalent to the output of the command `id -Gn'.
9702
9703    The only options are `--help' and `--version'.  *Note Common
9704 options::.
9705
9706    An exit status of zero indicates success, and a nonzero value
9707 indicates failure.
9708
9709 \1f
9710 File: coreutils.info,  Node: users invocation,  Next: who invocation,  Prev: groups invocation,  Up: User information
9711
9712 20.5 `users': Print login names of users currently logged in
9713 ============================================================
9714
9715 `users' prints on a single line a blank-separated list of user names of
9716 users currently logged in to the current host.  Each user name
9717 corresponds to a login session, so if a user has more than one login
9718 session, that user's name will appear the same number of times in the
9719 output.  Synopsis:
9720
9721      users [FILE]
9722
9723    With no FILE argument, `users' extracts its information from a
9724 system-maintained file (often `/var/run/utmp' or `/etc/utmp').  If a
9725 file argument is given, `users' uses that file instead.  A common
9726 choice is `/var/log/wtmp'.
9727
9728    The only options are `--help' and `--version'.  *Note Common
9729 options::.
9730
9731    An exit status of zero indicates success, and a nonzero value
9732 indicates failure.
9733
9734 \1f
9735 File: coreutils.info,  Node: who invocation,  Prev: users invocation,  Up: User information
9736
9737 20.6 `who': Print who is currently logged in
9738 ============================================
9739
9740 `who' prints information about users who are currently logged on.
9741 Synopsis:
9742
9743      `who' [OPTION] [FILE] [am i]
9744
9745    If given no non-option arguments, `who' prints the following
9746 information for each user currently logged on: login name, terminal
9747 line, login time, and remote hostname or X display.
9748
9749    If given one non-option argument, `who' uses that instead of a
9750 default system-maintained file (often `/var/run/utmp' or `/etc/utmp')
9751 as the name of the file containing the record of users logged on.
9752 `/var/log/wtmp' is commonly given as an argument to `who' to look at
9753 who has previously logged on.
9754
9755    If given two non-option arguments, `who' prints only the entry for
9756 the user running it (determined from its standard input), preceded by
9757 the hostname.  Traditionally, the two arguments given are `am i', as in
9758 `who am i'.
9759
9760    Time stamps are listed according to the time zone rules specified by
9761 the `TZ' environment variable, or by the system default rules if `TZ'
9762 is not set.  *Note Specifying the Time Zone with `TZ': (libc)TZ
9763 Variable.
9764
9765    The program accepts the following options.  Also see *Note Common
9766 options::.
9767
9768 `-a'
9769 `--all'
9770      Same as `-b -d --login -p -r -t -T -u'.
9771
9772 `-b'
9773 `--boot'
9774      Print the date and time of last system boot.
9775
9776 `-d'
9777 `--dead'
9778      Print information corresponding to dead processes.
9779
9780 `-H'
9781 `--heading'
9782      Print column headings.
9783
9784 `-m'
9785      Same as `who am i'.
9786
9787 `-q'
9788 `--count'
9789      Print only the login names and the number of users logged on.
9790      Overrides all other options.
9791
9792 `-s'
9793      Ignored; for compatibility with other versions of `who'.
9794
9795 `-u'
9796      After the login time, print the number of hours and minutes that
9797      the user has been idle.  `.' means the user was active in the last
9798      minute.  `old' means the user has been idle for more than 24 hours.
9799
9800 `-l'
9801 `--login'
9802      List only the entries that correspond to processes via which the
9803      system is waiting for a user to login.  The user name is always
9804      `LOGIN'.
9805
9806 `--lookup'
9807      Attempt to canonicalize hostnames found in utmp through a DNS
9808      lookup.  This is not the default because it can cause significant
9809      delays on systems with automatic dial-up internet access.
9810
9811 `-H'
9812 `--heading'
9813      Print a line of column headings.
9814
9815 `-w'
9816 `-T'
9817 `--mesg'
9818 `--message'
9819 `--writable'
9820      After each login name print a character indicating the user's
9821      message status:
9822
9823           `+' allowing `write' messages
9824           `-' disallowing `write' messages
9825           `?' cannot find terminal device
9826
9827
9828    An exit status of zero indicates success, and a nonzero value
9829 indicates failure.
9830
9831 \1f
9832 File: coreutils.info,  Node: System context,  Next: Modified command invocation,  Prev: User information,  Up: Top
9833
9834 21 System context
9835 *****************
9836
9837 This section describes commands that print or change system-wide
9838 information.
9839
9840 * Menu:
9841
9842 * date invocation::             Print or set system date and time.
9843 * uname invocation::            Print system information.
9844 * hostname invocation::         Print or set system name.
9845 * hostid invocation::           Print numeric host identifier.
9846
9847 \1f
9848 File: coreutils.info,  Node: date invocation,  Next: uname invocation,  Up: System context
9849
9850 21.1 `date': Print or set system date and time
9851 ==============================================
9852
9853 Synopses:
9854
9855      date [OPTION]... [+FORMAT]
9856      date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ]
9857
9858    Invoking `date' with no FORMAT argument is equivalent to invoking it
9859 with a default format that depends on the `LC_TIME' locale category.
9860 In the default C locale, this format is `'+%a %b %e %H:%M:%S %Z %Y'',
9861 so the output looks like `Thu Mar  3 13:47:51 PST 2005'.
9862
9863    Normally, `date' uses the time zone rules indicated by the `TZ'
9864 environment variable, or the system default rules if `TZ' is not set.
9865 *Note Specifying the Time Zone with `TZ': (libc)TZ Variable.
9866
9867    If given an argument that starts with a `+', `date' prints the
9868 current date and time (or the date and time specified by the `--date'
9869 option, see below) in the format defined by that argument, which is
9870 similar to that of the `strftime' function.  Except for conversion
9871 specifiers, which start with `%', characters in the format string are
9872 printed unchanged.  The conversion specifiers are described below.
9873
9874    An exit status of zero indicates success, and a nonzero value
9875 indicates failure.
9876
9877 * Menu:
9878
9879 * Time conversion specifiers::     %[HIklMNpPrRsSTXzZ]
9880 * Date conversion specifiers::     %[aAbBcCdDeFgGhjmuUVwWxyY]
9881 * Literal conversion specifiers::  %[%nt]
9882 * Padding and other flags::        Pad with zeros, spaces, etc.
9883 * Setting the time::               Changing the system clock.
9884 * Options for date::               Instead of the current time.
9885 * Examples of date::               Examples.
9886
9887 \1f
9888 File: coreutils.info,  Node: Time conversion specifiers,  Next: Date conversion specifiers,  Up: date invocation
9889
9890 21.1.1 Time conversion specifiers
9891 ---------------------------------
9892
9893 `date' conversion specifiers related to times.
9894
9895 `%H'
9896      hour (`00'...`23')
9897
9898 `%I'
9899      hour (`01'...`12')
9900
9901 `%k'
9902      hour (` 0'...`23').  This is a GNU extension.
9903
9904 `%l'
9905      hour (` 1'...`12').  This is a GNU extension.
9906
9907 `%M'
9908      minute (`00'...`59')
9909
9910 `%N'
9911      nanoseconds (`000000000'...`999999999').  This is a GNU extension.
9912
9913 `%p'
9914      locale's equivalent of either `AM' or `PM'; blank in many locales.
9915      Noon is treated as `PM' and midnight as `AM'.
9916
9917 `%P'
9918      like `%p', except lower case.  This is a GNU extension.
9919
9920 `%r'
9921      locale's 12-hour clock time (e.g., `11:11:04 PM')
9922
9923 `%R'
9924      24-hour hour and minute.  Same as `%H:%M'.  This is a GNU
9925      extension.
9926
9927 `%s'
9928      seconds since the epoch, i.e., since 1970-01-01 00:00:00 UTC.
9929      Leap seconds are not counted unless leap second support is
9930      available.  *Note %s-examples::, for examples.  This is a GNU
9931      extension.
9932
9933 `%S'
9934      second (`00'...`60').  This may be `60' if leap seconds are
9935      supported.
9936
9937 `%T'
9938      24-hour hour, minute, and second.  Same as `%H:%M:%S'.
9939
9940 `%X'
9941      locale's time representation (e.g., `23:13:48')
9942
9943 `%z'
9944      RFC 2822/ISO 8601 style numeric time zone (e.g., `-0600' or
9945      `+0530'), or nothing if no time zone is determinable.  This value
9946      reflects the numeric time zone appropriate for the current time,
9947      using the time zone rules specified by the `TZ' environment
9948      variable.  The time (and optionally, the time zone rules) can be
9949      overridden by the `--date' option.  This is a GNU extension.
9950
9951 `%:z'
9952      RFC 3339/ISO 8601 style numeric time zone with `:' (e.g., `-06:00'
9953      or `+05:30'), or nothing if no time zone is determinable.  This is
9954      a GNU extension.
9955
9956 `%::z'
9957      Numeric time zone to the nearest second with `:' (e.g.,
9958      `-06:00:00' or `+05:30:00'), or nothing if no time zone is
9959      determinable.  This is a GNU extension.
9960
9961 `%:::z'
9962      Numeric time zone with `:' using the minimum necessary precision
9963      (e.g., `-06', `+05:30', or `-04:56:02'), or nothing if no time
9964      zone is determinable.  This is a GNU extension.
9965
9966 `%Z'
9967      alphabetic time zone abbreviation (e.g., `EDT'), or nothing if no
9968      time zone is determinable.  See `%z' for how it is determined.
9969
9970 \1f
9971 File: coreutils.info,  Node: Date conversion specifiers,  Next: Literal conversion specifiers,  Prev: Time conversion specifiers,  Up: date invocation
9972
9973 21.1.2 Date conversion specifiers
9974 ---------------------------------
9975
9976 `date' conversion specifiers related to dates.
9977
9978 `%a'
9979      locale's abbreviated weekday name (e.g., `Sun')
9980
9981 `%A'
9982      locale's full weekday name, variable length (e.g., `Sunday')
9983
9984 `%b'
9985      locale's abbreviated month name (e.g., `Jan')
9986
9987 `%B'
9988      locale's full month name, variable length (e.g., `January')
9989
9990 `%c'
9991      locale's date and time (e.g., `Thu Mar  3 23:05:25 2005')
9992
9993 `%C'
9994      century.  This is like `%Y', except the last two digits are
9995      omitted.  For example, it is `20' if `%Y' is `2000', and is `-0'
9996      if `%Y' is `-001'.  It is normally at least two characters, but it
9997      may be more.
9998
9999 `%d'
10000      day of month (e.g., `01')
10001
10002 `%D'
10003      date; same as `%m/%d/%y'
10004
10005 `%e'
10006      day of month, space padded; same as `%_d'
10007
10008 `%F'
10009      full date in ISO 8601 format; same as `%Y-%m-%d'.  This is a good
10010      choice for a date format, as it is standard and is easy to sort in
10011      the usual case where years are in the range 0000...9999.  This is
10012      a GNU extension.
10013
10014 `%g'
10015      year corresponding to the ISO week number, but without the century
10016      (range `00' through `99').  This has the same format and value as
10017      `%y', except that if the ISO week number (see `%V') belongs to the
10018      previous or next year, that year is used instead.  This is a GNU
10019      extension.
10020
10021 `%G'
10022      year corresponding to the ISO week number.  This has the same
10023      format and value as `%Y', except that if the ISO week number (see
10024      `%V') belongs to the previous or next year, that year is used
10025      instead.  It is normally useful only if `%V' is also used; for
10026      example, the format `%G-%m-%d' is probably a mistake, since it
10027      combines the ISO week number year with the conventional month and
10028      day.  This is a GNU extension.
10029
10030 `%h'
10031      same as `%b'
10032
10033 `%j'
10034      day of year (`001'...`366')
10035
10036 `%m'
10037      month (`01'...`12')
10038
10039 `%u'
10040      day of week (`1'...`7') with `1' corresponding to Monday
10041
10042 `%U'
10043      week number of year, with Sunday as the first day of the week
10044      (`00'...`53').  Days in a new year preceding the first Sunday are
10045      in week zero.
10046
10047 `%V'
10048      ISO week number, that is, the week number of year, with Monday as
10049      the first day of the week (`01'...`53').  If the week containing
10050      January 1 has four or more days in the new year, then it is
10051      considered week 1; otherwise, it is week 53 of the previous year,
10052      and the next week is week 1.  (See the ISO 8601 standard.)
10053
10054 `%w'
10055      day of week (`0'...`6') with 0 corresponding to Sunday
10056
10057 `%W'
10058      week number of year, with Monday as first day of week
10059      (`00'...`53').  Days in a new year preceding the first Monday are
10060      in week zero.
10061
10062 `%x'
10063      locale's date representation (e.g., `12/31/99')
10064
10065 `%y'
10066      last two digits of year (`00'...`99')
10067
10068 `%Y'
10069      year.  This is normally at least four characters, but it may be
10070      more.  Year `0000' precedes year `0001', and year `-001' precedes
10071      year `0000'.
10072
10073 \1f
10074 File: coreutils.info,  Node: Literal conversion specifiers,  Next: Padding and other flags,  Prev: Date conversion specifiers,  Up: date invocation
10075
10076 21.1.3 Literal conversion specifiers
10077 ------------------------------------
10078
10079 `date' conversion specifiers that produce literal strings.
10080
10081 `%%'
10082      a literal %
10083
10084 `%n'
10085      a newline
10086
10087 `%t'
10088      a horizontal tab
10089
10090 \1f
10091 File: coreutils.info,  Node: Padding and other flags,  Next: Setting the time,  Prev: Literal conversion specifiers,  Up: date invocation
10092
10093 21.1.4 Padding and other flags
10094 ------------------------------
10095
10096 Unless otherwise specified, `date' normally pads numeric fields with
10097 zeros, so that, for example, numeric months are always output as two
10098 digits.  Seconds since the epoch are not padded, though, since there is
10099 no natural width for them.
10100
10101    As a GNU extension, `date' recognizes any of the following optional
10102 flags after the `%':
10103
10104 `-'
10105      (hyphen) Do not pad the field; useful if the output is intended for
10106      human consumption.
10107
10108 `_'
10109      (underscore) Pad with spaces; useful if you need a fixed number of
10110      characters in the output, but zeros are too distracting.
10111
10112 `0'
10113      (zero) Pad with zeros even if the conversion specifier would
10114      normally pad with spaces.
10115
10116 `^'
10117      Use upper case characters if possible.
10118
10119 `#'
10120      Use opposite case characters if possible.  A field that is
10121      normally upper case becomes lower case, and vice versa.
10122
10123 Here are some examples of padding:
10124
10125      date +%d/%m -d "Feb 1"
10126      => 01/02
10127      date +%-d/%-m -d "Feb 1"
10128      => 1/2
10129      date +%_d/%_m -d "Feb 1"
10130      =>  1/ 2
10131
10132    As a GNU extension, you can specify the field width (after any flag,
10133 if present) as a decimal number.  If the natural size of the output is
10134 of the field has less than the specified number of characters, the
10135 result is written right adjusted and padded to the given size.  For
10136 example, `%9B' prints the right adjusted month name in a field of width
10137 9.
10138
10139    An optional modifier can follow the optional flag and width
10140 specification.  The modifiers are:
10141
10142 `E'
10143      Use the locale's alternate representation for date and time.  This
10144      modifier applies to the `%c', `%C', `%x', `%X', `%y' and `%Y'
10145      conversion specifiers.  In a Japanese locale, for example, `%Ex'
10146      might yield a date format based on the Japanese Emperors' reigns.
10147
10148 `O'
10149      Use the locale's alternate numeric symbols for numbers.  This
10150      modifier applies only to numeric conversion specifiers.
10151
10152    If the format supports the modifier but no alternate representation
10153 is available, it is ignored.
10154
10155 \1f
10156 File: coreutils.info,  Node: Setting the time,  Next: Options for date,  Prev: Padding and other flags,  Up: date invocation
10157
10158 21.1.5 Setting the time
10159 -----------------------
10160
10161 If given an argument that does not start with `+', `date' sets the
10162 system clock to the date and time specified by that argument (as
10163 described below).  You must have appropriate privileges to set the
10164 system clock.  The `--date' and `--set' options may not be used with
10165 such an argument.  The `--universal' option may be used with such an
10166 argument to indicate that the specified date and time are relative to
10167 Coordinated Universal Time rather than to the local time zone.
10168
10169    The argument must consist entirely of digits, which have the
10170 following meaning:
10171
10172 `MM'
10173      month
10174
10175 `DD'
10176      day within month
10177
10178 `hh'
10179      hour
10180
10181 `mm'
10182      minute
10183
10184 `CC'
10185      first two digits of year (optional)
10186
10187 `YY'
10188      last two digits of year (optional)
10189
10190 `ss'
10191      second (optional)
10192
10193    The `--set' option also sets the system clock; see the next section.
10194
10195 \1f
10196 File: coreutils.info,  Node: Options for date,  Next: Examples of date,  Prev: Setting the time,  Up: date invocation
10197
10198 21.1.6 Options for `date'
10199 -------------------------
10200
10201 The program accepts the following options.  Also see *Note Common
10202 options::.
10203
10204 `-d DATESTR'
10205 `--date=DATESTR'
10206      Display the date and time specified in DATESTR instead of the
10207      current date and time.  DATESTR can be in almost any common
10208      format.  It can contain month names, time zones, `am' and `pm',
10209      `yesterday', etc.  For example, `--date="2004-02-27
10210      14:19:13.489392193 +0530"' specifies the instant of time that is
10211      489,392,193 nanoseconds after February 27, 2004 at 2:19:13 PM in a
10212      time zone that is 5 hours and 30 minutes east of UTC.  *Note Date
10213      input formats::.
10214
10215 `-f DATEFILE'
10216 `--file=DATEFILE'
10217      Parse each line in DATEFILE as with `-d' and display the resulting
10218      date and time.  If DATEFILE is `-', use standard input.  This is
10219      useful when you have many dates to process, because the system
10220      overhead of starting up the `date' executable many times can be
10221      considerable.
10222
10223 `-r FILE'
10224 `--reference=FILE'
10225      Display the date and time of the last modification of FILE,
10226      instead of the current date and time.
10227
10228 `-R'
10229 `--rfc-822'
10230 `--rfc-2822'
10231      Display the date and time using the format `%a, %d %b %Y %H:%M:%S
10232      %z', evaluated in the C locale so abbreviations are always in
10233      English.  For example:
10234
10235           Fri, 09 Sep 2005 13:51:39 -0700
10236
10237      This format conforms to Internet RFCs 2822
10238      (ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt) and 822
10239      (ftp://ftp.rfc-editor.org/in-notes/rfc822.txt), the current and
10240      previous standards for Internet email.
10241
10242 `--rfc-3339=TIMESPEC'
10243      Display the date using a format specified by Internet RFC 3339
10244      (ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt).  This is a subset
10245      of the ISO 8601 format, except that it also permits applications
10246      to use a space rather than a `T' to separate dates from times.
10247      Unlike the other standard formats, RFC 3339 format is always
10248      suitable as input for the `--date' (`-d') and `--file' (`-f')
10249      options, regardless of the current locale.
10250
10251      The argument TIMESPEC specifies how much of the time to include.
10252      It can be one of the following:
10253
10254     `date'
10255           Print just the full-date, e.g., `2005-09-14'.  This is
10256           equivalent to the format `%Y-%m-%d'.
10257
10258     `seconds'
10259           Print the full-date and full-time separated by a space, e.g.,
10260           `2005-09-14 00:56:06+05:30'.  The output ends with a numeric
10261           time-offset; here the `+05:30' means that local time is five
10262           hours and thirty minutes east of UTC.  This is equivalent to
10263           the format `%Y-%m-%d %H:%M:%S%:z'.
10264
10265     `ns'
10266           Like `seconds', but also print nanoseconds, e.g., `2005-09-14
10267           00:56:06.998458565+05:30'.  This is equivalent to the format
10268           `%Y-%m-%d %H:%M:%S.%N%:z'.
10269
10270
10271 `-s DATESTR'
10272 `--set=DATESTR'
10273      Set the date and time to DATESTR.  See `-d' above.
10274
10275 `-u'
10276 `--utc'
10277 `--universal'
10278      Use Coordinated Universal Time (UTC) by operating as if the `TZ'
10279      environment variable were set to the string `UTC0'.  Coordinated
10280      Universal Time is often called "Greenwich Mean Time" (GMT) for
10281      historical reasons.
10282
10283 \1f
10284 File: coreutils.info,  Node: Examples of date,  Prev: Options for date,  Up: date invocation
10285
10286 21.1.7 Examples of `date'
10287 -------------------------
10288
10289 Here are a few examples.  Also see the documentation for the `-d'
10290 option in the previous section.
10291
10292    * To print the date of the day before yesterday:
10293
10294           date --date='2 days ago'
10295
10296    * To print the date of the day three months and one day hence:
10297
10298           date --date='3 months 1 day'
10299
10300    * To print the day of year of Christmas in the current year:
10301
10302           date --date='25 Dec' +%j
10303
10304    * To print the current full month name and the day of the month:
10305
10306           date '+%B %d'
10307
10308      But this may not be what you want because for the first nine days
10309      of the month, the `%d' expands to a zero-padded two-digit field,
10310      for example `date -d 1may '+%B %d'' will print `May 01'.
10311
10312    * To print a date without the leading zero for one-digit days of the
10313      month, you can use the (GNU extension) `-' flag to suppress the
10314      padding altogether:
10315
10316           date -d 1may '+%B %-d
10317
10318    * To print the current date and time in the format required by many
10319      non-GNU versions of `date' when setting the system clock:
10320
10321           date +%m%d%H%M%Y.%S
10322
10323    * To set the system clock forward by two minutes:
10324
10325           date --set='+2 minutes'
10326
10327    * To print the date in RFC 2822 format, use `date --rfc-2822'.  Here
10328      is some example output:
10329
10330           Fri, 09 Sep 2005 13:51:39 -0700
10331
10332    * To convert a date string to the number of seconds since the epoch
10333      (which is 1970-01-01 00:00:00 UTC), use the `--date' option with
10334      the `%s' format.  That can be useful in sorting and/or graphing
10335      and/or comparing data by date.  The following command outputs the
10336      number of the seconds since the epoch for the time two minutes
10337      after the epoch:
10338
10339           date --date='1970-01-01 00:02:00 +0000' +%s
10340           120
10341
10342      If you do not specify time zone information in the date string,
10343      `date' uses your computer's idea of the time zone when
10344      interpreting the string.  For example, if your computer's time
10345      zone is that of Cambridge, Massachusetts, which was then 5 hours
10346      (i.e., 18,000 seconds) behind UTC:
10347
10348           # local time zone used
10349           date --date='1970-01-01 00:02:00' +%s
10350           18120
10351
10352    * If you're sorting or graphing dated data, your raw date values may
10353      be represented as seconds since the epoch.  But few people can
10354      look at the date `946684800' and casually note "Oh, that's the
10355      first second of the year 2000 in Greenwich, England."
10356
10357           date --date='2000-01-01 UTC' +%s
10358           946684800
10359
10360      An alternative is to use the `--utc' (`-u') option.  Then you may
10361      omit `UTC' from the date string.  Although this produces the same
10362      result for `%s' and many other format sequences, with a time zone
10363      offset different from zero, it would give a different result for
10364      zone-dependent formats like `%z'.
10365
10366           date -u --date=2000-01-01 +%s
10367           946684800
10368
10369      To convert such an unwieldy number of seconds back to a more
10370      readable form, use a command like this:
10371
10372           # local time zone used
10373           date -d '1970-01-01 UTC 946684800 seconds' +"%Y-%m-%d %T %z"
10374           1999-12-31 19:00:00 -0500
10375
10376      Or if you do not mind depending on the `@' feature present since
10377      coreutils 5.3.0, you could shorten this to:
10378
10379           date -d @946684800 +"%F %T %z"
10380           1999-12-31 19:00:00 -0500
10381
10382      Often it is better to output UTC-relative date and time:
10383
10384           date -u -d '1970-01-01 946684800 seconds' +"%Y-%m-%d %T %z"
10385           2000-01-01 00:00:00 +0000
10386
10387
10388 \1f
10389 File: coreutils.info,  Node: uname invocation,  Next: hostname invocation,  Prev: date invocation,  Up: System context
10390
10391 21.2 `uname': Print system information
10392 ======================================
10393
10394 `uname' prints information about the machine and operating system it is
10395 run on.  If no options are given, `uname' acts as if the `-s' option
10396 were given.  Synopsis:
10397
10398      uname [OPTION]...
10399
10400    If multiple options or `-a' are given, the selected information is
10401 printed in this order:
10402
10403      KERNEL-NAME NODENAME KERNEL-RELEASE KERNEL-VERSION
10404      MACHINE PROCESSOR HARDWARE-PLATFORM OPERATING-SYSTEM
10405
10406    The information may contain internal spaces, so such output cannot be
10407 parsed reliably.  In the following example, RELEASE is
10408 `2.2.18ss.e820-bda652a #4 SMP Tue Jun 5 11:24:08 PDT 2001':
10409
10410      uname -a
10411      => Linux dum 2.2.18 #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686 unknown unknown GNU/Linux
10412
10413    The program accepts the following options.  Also see *Note Common
10414 options::.
10415
10416 `-a'
10417 `--all'
10418      Print all of the below information, except omit the processor type
10419      and the hardware platform name if they are unknown.
10420
10421 `-i'
10422 `--hardware-platform'
10423      Print the hardware platform name (sometimes called the hardware
10424      implementation).  Print `unknown' if the kernel does not make this
10425      information easily available, as is the case with Linux kernels.
10426
10427 `-m'
10428 `--machine'
10429      Print the machine hardware name (sometimes called the hardware
10430      class or hardware type).
10431
10432 `-n'
10433 `--nodename'
10434      Print the network node hostname.
10435
10436 `-p'
10437 `--processor'
10438      Print the processor type (sometimes called the instruction set
10439      architecture or ISA).  Print `unknown' if the kernel does not make
10440      this information easily available, as is the case with Linux
10441      kernels.
10442
10443 `-o'
10444 `--operating-system'
10445      Print the name of the operating system.
10446
10447 `-r'
10448 `--kernel-release'
10449      Print the kernel release.
10450
10451 `-s'
10452 `--kernel-name'
10453      Print the kernel name.  POSIX 1003.1-2001 (*note Standards
10454      conformance::) calls this "the implementation of the operating
10455      system", because the POSIX specification itself has no notion of
10456      "kernel".  The kernel name might be the same as the operating
10457      system name printed by the `-o' or `--operating-system' option,
10458      but it might differ.  Some operating systems (e.g., FreeBSD,
10459      HP-UX) have the same name as their underlying kernels; others
10460      (e.g., GNU/Linux, Solaris) do not.
10461
10462 `-v'
10463 `--kernel-version'
10464      Print the kernel version.
10465
10466
10467    An exit status of zero indicates success, and a nonzero value
10468 indicates failure.
10469
10470 \1f
10471 File: coreutils.info,  Node: hostname invocation,  Next: hostid invocation,  Prev: uname invocation,  Up: System context
10472
10473 21.3 `hostname': Print or set system name
10474 =========================================
10475
10476 With no arguments, `hostname' prints the name of the current host
10477 system.  With one argument, it sets the current host name to the
10478 specified string.  You must have appropriate privileges to set the host
10479 name.  Synopsis:
10480
10481      hostname [NAME]
10482
10483    The only options are `--help' and `--version'.  *Note Common
10484 options::.
10485
10486    An exit status of zero indicates success, and a nonzero value
10487 indicates failure.
10488
10489 \1f
10490 File: coreutils.info,  Node: hostid invocation,  Prev: hostname invocation,  Up: System context
10491
10492 21.4 `hostid': Print numeric host identifier.
10493 =============================================
10494
10495 `hostid' prints the numeric identifier of the current host in
10496 hexadecimal.  This command accepts no arguments.  The only options are
10497 `--help' and `--version'.  *Note Common options::.
10498
10499    For example, here's what it prints on one system I use:
10500
10501      $ hostid
10502      1bac013d
10503
10504    On that system, the 32-bit quantity happens to be closely related to
10505 the system's Internet address, but that isn't always the case.
10506
10507    An exit status of zero indicates success, and a nonzero value
10508 indicates failure.
10509
10510 \1f
10511 File: coreutils.info,  Node: Modified command invocation,  Next: Process control,  Prev: System context,  Up: Top
10512
10513 22 Modified command invocation
10514 ******************************
10515
10516 This section describes commands that run other commands in some context
10517 different than the current one: a modified environment, as a different
10518 user, etc.
10519
10520 * Menu:
10521
10522 * chroot invocation::           Modify the root directory.
10523 * env invocation::              Modify environment variables.
10524 * nice invocation::             Modify niceness.
10525 * nohup invocation::            Immunize to hangups.
10526 * su invocation::               Modify user and group ID.
10527
10528 \1f
10529 File: coreutils.info,  Node: chroot invocation,  Next: env invocation,  Up: Modified command invocation
10530
10531 22.1 `chroot': Run a command with a different root directory
10532 ============================================================
10533
10534 `chroot' runs a command with a specified root directory.  On many
10535 systems, only the super-user can do this.  Synopses:
10536
10537      chroot NEWROOT [COMMAND [ARGS]...]
10538      chroot OPTION
10539
10540    Ordinarily, file names are looked up starting at the root of the
10541 directory structure, i.e., `/'.  `chroot' changes the root to the
10542 directory NEWROOT (which must exist) and then runs COMMAND with
10543 optional ARGS.  If COMMAND is not specified, the default is the value
10544 of the `SHELL' environment variable or `/bin/sh' if not set, invoked
10545 with the `-i' option.  COMMAND must not be a special built-in utility
10546 (*note Special built-in utilities::).
10547
10548    The only options are `--help' and `--version'.  *Note Common
10549 options::.  Options must precede operands.
10550
10551    Here are a few tips to help avoid common problems in using chroot.
10552 To start with a simple example, make COMMAND refer to a statically
10553 linked binary.  If you were to use a dynamically linked executable, then
10554 you'd have to arrange to have the shared libraries in the right place
10555 under your new root directory.
10556
10557    For example, if you create a statically linked `ls' executable, and
10558 put it in `/tmp/empty', you can run this command as root:
10559
10560      $ chroot /tmp/empty /ls -Rl /
10561
10562    Then you'll see output like this:
10563
10564      /:
10565      total 1023
10566      -rwxr-xr-x 1 0 0 1041745 Aug 16 11:17 ls
10567
10568    If you want to use a dynamically linked executable, say `bash', then
10569 first run `ldd bash' to see what shared objects it needs.  Then, in
10570 addition to copying the actual binary, also copy the listed files to
10571 the required positions under your intended new root directory.
10572 Finally, if the executable requires any other files (e.g., data, state,
10573 device files), copy them into place, too.
10574
10575    Exit status:
10576
10577      1   if `chroot' itself fails
10578      126 if COMMAND is found but cannot be invoked
10579      127 if COMMAND cannot be found
10580      the exit status of COMMAND otherwise
10581
10582 \1f
10583 File: coreutils.info,  Node: env invocation,  Next: nice invocation,  Prev: chroot invocation,  Up: Modified command invocation
10584
10585 22.2 `env': Run a command in a modified environment
10586 ===================================================
10587
10588 `env' runs a command with a modified environment.  Synopses:
10589
10590      env [OPTION]... [NAME=VALUE]... [COMMAND [ARGS]...]
10591      env
10592
10593    Operands of the form `VARIABLE=VALUE' set the environment variable
10594 VARIABLE to value VALUE.  VALUE may be empty (`VARIABLE=').  Setting a
10595 variable to an empty value is different from unsetting it.  These
10596 operands are evaluated left-to-right, so if two operands mention the
10597 same variable the earlier is ignored.
10598
10599    Environment variable names can be empty, and can contain any
10600 characters other than `=' and the null character (ASCII NUL).  However,
10601 it is wise to limit yourself to names that consist solely of
10602 underscores, digits, and ASCII letters, and that begin with a
10603 non-digit, as applications like the shell do not work well with other
10604 names.
10605
10606    The first operand that does not contain the character `=' specifies
10607 the program to invoke; it is searched for according to the `PATH'
10608 environment variable.  Any remaining arguments are passed as arguments
10609 to that program.  The program should not be a special built-in utility
10610 (*note Special built-in utilities::).
10611
10612    If no command name is specified following the environment
10613 specifications, the resulting environment is printed.  This is like
10614 specifying the `printenv' program.
10615
10616    The program accepts the following options.  Also see *Note Common
10617 options::.  Options must precede operands.
10618
10619 `-u NAME'
10620 `--unset=NAME'
10621      Remove variable NAME from the environment, if it was in the
10622      environment.
10623
10624 `-'
10625 `-i'
10626 `--ignore-environment'
10627      Start with an empty environment, ignoring the inherited
10628      environment.
10629
10630
10631    Exit status:
10632
10633      0   if no COMMAND is specified and the environment is output
10634      1   if `env' itself fails
10635      126 if COMMAND is found but cannot be invoked
10636      127 if COMMAND cannot be found
10637      the exit status of COMMAND otherwise
10638
10639 \1f
10640 File: coreutils.info,  Node: nice invocation,  Next: nohup invocation,  Prev: env invocation,  Up: Modified command invocation
10641
10642 22.3 `nice': Run a command with modified niceness
10643 =================================================
10644
10645 `nice' prints or modifies a process's "niceness", a parameter that
10646 affects whether the process is scheduled favorably.  Synopsis:
10647
10648      nice [OPTION]... [COMMAND [ARG]...]
10649
10650    If no arguments are given, `nice' prints the current niceness.
10651 Otherwise, `nice' runs the given COMMAND with its niceness adjusted.
10652 By default, its niceness is incremented by 10.
10653
10654    Nicenesses range at least from -20 (resulting in the most favorable
10655 scheduling) through 19 (the least favorable).  Some systems may have a
10656 wider range of nicenesses; conversely, other systems may enforce more
10657 restrictive limits.  An attempt to set the niceness outside the
10658 supported range is treated as an attempt to use the minimum or maximum
10659 supported value.
10660
10661    A niceness should not be confused with a scheduling priority, which
10662 lets applications determine the order in which threads are scheduled to
10663 run.  Unlike a priority, a niceness is merely advice to the scheduler,
10664 which the scheduler is free to ignore.  Also, as a point of
10665 terminology, POSIX defines the behavior of `nice' in terms of a "nice
10666 value", which is the nonnegative difference between a niceness and the
10667 minimum niceness.  Though `nice' conforms to POSIX, its documentation
10668 and diagnostics use the term "niceness" for compatibility with
10669 historical practice.
10670
10671    COMMAND must not be a special built-in utility (*note Special
10672 built-in utilities::).
10673
10674    Because many shells have a built-in `nice' command, using an
10675 unadorned `nice' in a script or interactively may get you different
10676 functionality than that described here.
10677
10678    The program accepts the following option.  Also see *Note Common
10679 options::.  Options must precede operands.
10680
10681 `-n ADJUSTMENT'
10682 `--adjustment=ADJUSTMENT'
10683      Add ADJUSTMENT instead of 10 to the command's niceness.  If
10684      ADJUSTMENT is negative and you lack appropriate privileges, `nice'
10685      issues a warning but otherwise acts as if you specified a zero
10686      adjustment.
10687
10688      For compatibility `nice' also supports an obsolete option syntax
10689      `-ADJUSTMENT'.  New scripts should use `-n ADJUSTMENT' instead.
10690
10691
10692    Exit status:
10693
10694      0   if no COMMAND is specified and the niceness is output
10695      1   if `nice' itself fails
10696      126 if COMMAND is found but cannot be invoked
10697      127 if COMMAND cannot be found
10698      the exit status of COMMAND otherwise
10699
10700    It is sometimes useful to run a non-interactive program with reduced
10701 niceness.
10702
10703      $ nice factor 4611686018427387903
10704
10705    Since `nice' prints the current niceness, you can invoke it through
10706 itself to demonstrate how it works.
10707
10708    The default behavior is to increase the niceness by `10':
10709
10710      $ nice
10711      0
10712      $ nice nice
10713      10
10714      $ nice -n 10 nice
10715      10
10716
10717    The ADJUSTMENT is relative to the current niceness.  In the next
10718 example, the first `nice' invocation runs the second one with niceness
10719 10, and it in turn runs the final one with a niceness that is 3 more:
10720
10721      $ nice nice -n 3 nice
10722      13
10723
10724    Specifying a niceness larger than the supported range is the same as
10725 specifying the maximum supported value:
10726
10727      $ nice -n 10000000000 nice
10728      19
10729
10730    Only a privileged user may run a process with lower niceness:
10731
10732      $ nice -n -1 nice
10733      nice: cannot set niceness: Permission denied
10734      0
10735      $ sudo nice -n -1 nice
10736      -1
10737
10738 \1f
10739 File: coreutils.info,  Node: nohup invocation,  Next: su invocation,  Prev: nice invocation,  Up: Modified command invocation
10740
10741 22.4 `nohup': Run a command immune to hangups
10742 =============================================
10743
10744 `nohup' runs the given COMMAND with hangup signals ignored, so that the
10745 command can continue running in the background after you log out.
10746 Synopsis:
10747
10748      nohup COMMAND [ARG]...
10749
10750    If standard input is a terminal, it is redirected from `/dev/null'
10751 so that terminal sessions do not mistakenly consider the terminal to be
10752 used by the command.  This is a GNU extension; programs intended to be
10753 portable to non-GNU hosts should use `nohup COMMAND [ARG]... </dev/null'
10754 instead.
10755
10756    If standard output is a terminal, the command's standard output is
10757 appended to the file `nohup.out'; if that cannot be written to, it is
10758 appended to the file `$HOME/nohup.out'; and if that cannot be written
10759 to, the command is not run.  Any `nohup.out' or `$HOME/nohup.out' file
10760 created by `nohup' is made readable and writable only to the user,
10761 regardless of the current umask settings.
10762
10763    If standard error is a terminal, it is normally redirected to the
10764 same file descriptor as the (possibly-redirected) standard output.
10765 However, if standard output is closed, standard error terminal output
10766 is instead appended to the file `nohup.out' or `$HOME/nohup.out' as
10767 above.
10768
10769    `nohup' does not automatically put the command it runs in the
10770 background; you must do that explicitly, by ending the command line
10771 with an `&'.  Also, `nohup' does not alter the niceness of COMMAND; use
10772 `nice' for that, e.g., `nohup nice COMMAND'.
10773
10774    COMMAND must not be a special built-in utility (*note Special
10775 built-in utilities::).
10776
10777    The only options are `--help' and `--version'.  *Note Common
10778 options::.  Options must precede operands.
10779
10780    Exit status:
10781
10782      126 if COMMAND is found but cannot be invoked
10783      127 if `nohup' itself fails or if COMMAND cannot be found
10784      the exit status of COMMAND otherwise
10785
10786 \1f
10787 File: coreutils.info,  Node: su invocation,  Prev: nohup invocation,  Up: Modified command invocation
10788
10789 22.5 `su': Run a command with substitute user and group ID
10790 ==========================================================
10791
10792 `su' allows one user to temporarily become another user.  It runs a
10793 command (often an interactive shell) with the real and effective user
10794 ID, group ID, and supplemental groups of a given USER.  Synopsis:
10795
10796      su [OPTION]... [USER [ARG]...]
10797
10798    If no USER is given, the default is `root', the super-user.  The
10799 shell to use is taken from USER's `passwd' entry, or `/bin/sh' if none
10800 is specified there.  If USER has a password, `su' prompts for the
10801 password unless run by a user with effective user ID of zero (the
10802 super-user).
10803
10804    By default, `su' does not change the current directory.  It sets the
10805 environment variables `HOME' and `SHELL' from the password entry for
10806 USER, and if USER is not the super-user, sets `USER' and `LOGNAME' to
10807 USER.  By default, the shell is not a login shell.
10808
10809    Any additional ARGs are passed as additional arguments to the shell.
10810
10811    GNU `su' does not treat `/bin/sh' or any other shells specially
10812 (e.g., by setting `argv[0]' to `-su', passing `-c' only to certain
10813 shells, etc.).
10814
10815    `su' can optionally be compiled to use `syslog' to report failed,
10816 and optionally successful, `su' attempts.  (If the system supports
10817 `syslog'.)  However, GNU `su' does not check if the user is a member of
10818 the `wheel' group; see below.
10819
10820    The program accepts the following options.  Also see *Note Common
10821 options::.
10822
10823 `-c COMMAND'
10824 `--command=COMMAND'
10825      Pass COMMAND, a single command line to run, to the shell with a
10826      `-c' option instead of starting an interactive shell.
10827
10828 `-f'
10829 `--fast'
10830      Pass the `-f' option to the shell.  This probably only makes sense
10831      if the shell run is `csh' or `tcsh', for which the `-f' option
10832      prevents reading the startup file (`.cshrc').  With Bourne-like
10833      shells, the `-f' option disables file name pattern expansion
10834      (globbing), which is not likely to be useful.
10835
10836 `-'
10837 `-l'
10838 `--login'
10839      Make the shell a login shell.  This means the following.  Unset all
10840      environment variables except `TERM', `HOME', and `SHELL' (which
10841      are set as described above), and `USER' and `LOGNAME' (which are
10842      set, even for the super-user, as described above), and set `PATH'
10843      to a compiled-in default value.  Change to USER's home directory.
10844      Prepend `-' to the shell's name, intended to make it read its
10845      login startup file(s).
10846
10847 `-m'
10848 `-p'
10849 `--preserve-environment'
10850      Do not change the environment variables `HOME', `USER', `LOGNAME',
10851      or `SHELL'.  Run the shell given in the environment variable
10852      `SHELL' instead of the shell from USER's passwd entry, unless the
10853      user running `su' is not the super-user and USER's shell is
10854      restricted.  A "restricted shell" is one that is not listed in the
10855      file `/etc/shells', or in a compiled-in list if that file does not
10856      exist.  Parts of what this option does can be overridden by
10857      `--login' and `--shell'.
10858
10859 `-s SHELL'
10860 `--shell=SHELL'
10861      Run SHELL instead of the shell from USER's passwd entry, unless
10862      the user running `su' is not the super-user and USER's shell is
10863      restricted (see `-m' just above).
10864
10865
10866    Exit status:
10867
10868      1   if `su' itself fails
10869      126 if subshell is found but cannot be invoked
10870      127 if subshell cannot be found
10871      the exit status of the subshell otherwise
10872
10873 22.5.1 Why GNU `su' does not support the `wheel' group
10874 ------------------------------------------------------
10875
10876 (This section is by Richard Stallman.)
10877
10878    Sometimes a few of the users try to hold total power over all the
10879 rest.  For example, in 1984, a few users at the MIT AI lab decided to
10880 seize power by changing the operator password on the Twenex system and
10881 keeping it secret from everyone else.  (I was able to thwart this coup
10882 and give power back to the users by patching the kernel, but I wouldn't
10883 know how to do that in Unix.)
10884
10885    However, occasionally the rulers do tell someone.  Under the usual
10886 `su' mechanism, once someone learns the root password who sympathizes
10887 with the ordinary users, he or she can tell the rest.  The "wheel
10888 group" feature would make this impossible, and thus cement the power of
10889 the rulers.
10890
10891    I'm on the side of the masses, not that of the rulers.  If you are
10892 used to supporting the bosses and sysadmins in whatever they do, you
10893 might find this idea strange at first.
10894
10895 \1f
10896 File: coreutils.info,  Node: Process control,  Next: Delaying,  Prev: Modified command invocation,  Up: Top
10897
10898 23 Process control
10899 ******************
10900
10901 * Menu:
10902
10903 * kill invocation::             Sending a signal to processes.
10904
10905 \1f
10906 File: coreutils.info,  Node: kill invocation,  Up: Process control
10907
10908 23.1 `kill': Send a signal to processes
10909 =======================================
10910
10911 The `kill' command sends a signal to processes, causing them to
10912 terminate or otherwise act upon receiving the signal in some way.
10913 Alternatively, it lists information about signals.  Synopses:
10914
10915      kill [-s SIGNAL | --signal SIGNAL | -SIGNAL] PID...
10916      kill [-l | --list | -t | --table] [SIGNAL]...
10917
10918    The first form of the `kill' command sends a signal to all PID
10919 arguments.  The default signal to send if none is specified is `TERM'.
10920 The special signal number `0' does not denote a valid signal, but can
10921 be used to test whether the PID arguments specify processes to which a
10922 signal could be sent.
10923
10924    If PID is positive, the signal is sent to the process with the
10925 process ID PID.  If PID is zero, the signal is sent to all processes in
10926 the process group of the current process.  If PID is -1, the signal is
10927 sent to all processes for which the user has permission to send a
10928 signal.  If PID is less than -1, the signal is sent to all processes in
10929 the process group that equals the absolute value of PID.
10930
10931    If PID is not positive, a system-dependent set of system processes
10932 is excluded from the list of processes to which the signal is sent.
10933
10934    If a negative PID argument is desired as the first one, it should be
10935 preceded by `--'.  However, as a common extension to POSIX, `--' is not
10936 required with `kill -SIGNAL -PID'.  The following commands are
10937 equivalent:
10938
10939      kill -15 -1
10940      kill -TERM -1
10941      kill -s TERM -- -1
10942      kill -- -1
10943
10944    The first form of the `kill' command succeeds if every PID argument
10945 specifies at least one process that the signal was sent to.
10946
10947    The second form of the `kill' command lists signal information.
10948 Either the `-l' or `--list' option, or the `-t' or `--table' option
10949 must be specified.  Without any SIGNAL argument, all supported signals
10950 are listed.  The output of `-l' or `--list' is a list of the signal
10951 names, one per line; if SIGNAL is already a name, the signal number is
10952 printed instead.  The output of `-t' or `--table' is a table of signal
10953 numbers, names, and descriptions.  This form of the `kill' command
10954 succeeds if all SIGNAL arguments are valid and if there is no output
10955 error.
10956
10957    The `kill' command also supports the `--help' and `--version'
10958 options.  *Note Common options::.
10959
10960    A SIGNAL may be a signal name like `HUP', or a signal number like
10961 `1', or an exit status of a process terminated by the signal.  A signal
10962 name can be given in canonical form or prefixed by `SIG'.  The case of
10963 the letters is ignored, except for the `-SIGNAL' option which must use
10964 upper case to avoid ambiguity with lower case option letters.  The
10965 following signal names and numbers are supported on all POSIX compliant
10966 systems:
10967
10968 `HUP'
10969      1.  Hangup.
10970
10971 `INT'
10972      2.  Terminal interrupt.
10973
10974 `QUIT'
10975      3.  Terminal quit.
10976
10977 `ABRT'
10978      6.  Process abort.
10979
10980 `KILL'
10981      9.  Kill (cannot be caught or ignored).
10982
10983 `ALRM'
10984      14.  Alarm Clock.
10985
10986 `TERM'
10987      15.  Termination.
10988
10989 Other supported signal names have system-dependent corresponding
10990 numbers.  All systems conforming to POSIX 1003.1-2001 also support the
10991 following signals:
10992
10993 `BUS'
10994      Access to an undefined portion of a memory object.
10995
10996 `CHLD'
10997      Child process terminated, stopped, or continued.
10998
10999 `CONT'
11000      Continue executing, if stopped.
11001
11002 `FPE'
11003      Erroneous arithmetic operation.
11004
11005 `ILL'
11006      Illegal Instruction.
11007
11008 `PIPE'
11009      Write on a pipe with no one to read it.
11010
11011 `SEGV'
11012      Invalid memory reference.
11013
11014 `STOP'
11015      Stop executing (cannot be caught or ignored).
11016
11017 `TSTP'
11018      Terminal stop.
11019
11020 `TTIN'
11021      Background process attempting read.
11022
11023 `TTOU'
11024      Background process attempting write.
11025
11026 `URG'
11027      High bandwidth data is available at a socket.
11028
11029 `USR1'
11030      User-defined signal 1.
11031
11032 `USR2'
11033      User-defined signal 2.
11034
11035 POSIX 1003.1-2001 systems that support the XSI extension also support
11036 the following signals:
11037
11038 `POLL'
11039      Pollable event.
11040
11041 `PROF'
11042      Profiling timer expired.
11043
11044 `SYS'
11045      Bad system call.
11046
11047 `TRAP'
11048      Trace/breakpoint trap.
11049
11050 `VTALRM'
11051      Virtual timer expired.
11052
11053 `XCPU'
11054      CPU time limit exceeded.
11055
11056 `XFSZ'
11057      File size limit exceeded.
11058
11059 POSIX 1003.1-2001 systems that support the XRT extension also support
11060 at least eight real-time signals called `RTMIN', `RTMIN+1', ...,
11061 `RTMAX-1', `RTMAX'.
11062
11063 \1f
11064 File: coreutils.info,  Node: Delaying,  Next: Numeric operations,  Prev: Process control,  Up: Top
11065
11066 24 Delaying
11067 ***********
11068
11069 * Menu:
11070
11071 * sleep invocation::            Delay for a specified time.
11072
11073 \1f
11074 File: coreutils.info,  Node: sleep invocation,  Up: Delaying
11075
11076 24.1 `sleep': Delay for a specified time
11077 ========================================
11078
11079 `sleep' pauses for an amount of time specified by the sum of the values
11080 of the command line arguments.  Synopsis:
11081
11082      sleep NUMBER[smhd]...
11083
11084    Each argument is a number followed by an optional unit; the default
11085 is seconds.  The units are:
11086
11087 `s'
11088      seconds
11089
11090 `m'
11091      minutes
11092
11093 `h'
11094      hours
11095
11096 `d'
11097      days
11098
11099    Historical implementations of `sleep' have required that NUMBER be
11100 an integer, and only accepted a single argument without a suffix.
11101 However, GNU `sleep' accepts arbitrary floating point numbers (using a
11102 period before any fractional digits).
11103
11104    The only options are `--help' and `--version'.  *Note Common
11105 options::.
11106
11107    An exit status of zero indicates success, and a nonzero value
11108 indicates failure.
11109
11110 \1f
11111 File: coreutils.info,  Node: Numeric operations,  Next: File permissions,  Prev: Delaying,  Up: Top
11112
11113 25 Numeric operations
11114 *********************
11115
11116 These programs do numerically-related operations.
11117
11118 * Menu:
11119
11120 * factor invocation::              Show factors of numbers.
11121 * seq invocation::                 Print sequences of numbers.
11122
11123 \1f
11124 File: coreutils.info,  Node: factor invocation,  Next: seq invocation,  Up: Numeric operations
11125
11126 25.1 `factor': Print prime factors
11127 ==================================
11128
11129 `factor' prints prime factors.  Synopses:
11130
11131      factor [NUMBER]...
11132      factor OPTION
11133
11134    If no NUMBER is specified on the command line, `factor' reads
11135 numbers from standard input, delimited by newlines, tabs, or spaces.
11136
11137    The only options are `--help' and `--version'.  *Note Common
11138 options::.
11139
11140    The algorithm it uses is not very sophisticated, so for some inputs
11141 `factor' runs for a long time.  The hardest numbers to factor are the
11142 products of large primes.  Factoring the product of the two largest
11143 32-bit prime numbers takes about 80 seconds of CPU time on a 1.6 GHz
11144 Athlon.
11145
11146      $ p=`echo '4294967279 * 4294967291'|bc`
11147      $ factor $p
11148      18446743979220271189: 4294967279 4294967291
11149
11150    Similarly, it takes about 80 seconds for GNU factor (from
11151 coreutils-5.1.2) to "factor" the largest 64-bit prime:
11152
11153      $ factor 18446744073709551557
11154        18446744073709551557: 18446744073709551557
11155
11156    In contrast, `factor' factors the largest 64-bit number in just over
11157 a tenth of a second:
11158
11159      $ factor `echo '2^64-1'|bc`
11160      18446744073709551615: 3 5 17 257 641 65537 6700417
11161
11162    An exit status of zero indicates success, and a nonzero value
11163 indicates failure.
11164
11165 \1f
11166 File: coreutils.info,  Node: seq invocation,  Prev: factor invocation,  Up: Numeric operations
11167
11168 25.2 `seq': Print numeric sequences
11169 ===================================
11170
11171 `seq' prints a sequence of numbers to standard output.  Synopses:
11172
11173      seq [OPTION]... LAST
11174      seq [OPTION]... FIRST LAST
11175      seq [OPTION]... FIRST INCREMENT LAST
11176
11177    `seq' prints the numbers from FIRST to LAST by INCREMENT.  By
11178 default, each number is printed on a separate line.  When INCREMENT is
11179 not specified, it defaults to `1', even when FIRST is larger than LAST.
11180 FIRST also defaults to `1'.  So `seq 1' prints `1', but `seq 0' and
11181 `seq 10 5' produce no output.  Floating-point numbers may be specified
11182 (using a period before any fractional digits).
11183
11184    The program accepts the following options.  Also see *Note Common
11185 options::.  Options must precede operands.
11186
11187 `-f FORMAT'
11188 `--format=FORMAT'
11189      Print all numbers using FORMAT.  FORMAT must contain exactly one
11190      of the `printf'-style floating point conversion specifications
11191      `%a', `%e', `%f', `%g', `%A', `%E', `%F', `%G'.  The `%' may be
11192      followed by zero or more flags taken from the set `-+#0 '', then
11193      an optional width containing one or more digits, then an optional
11194      precision consisting of a `.' followed by zero or more digits.
11195      FORMAT may also contain any number of `%%' conversion
11196      specifications.  All conversion specifications have the same
11197      meaning as with `printf'.
11198
11199      The default format is derived from FIRST, STEP, and LAST.  If
11200      these all use a fixed point decimal representation, the default
11201      format is `%.Pf', where P is the minimum precision that can
11202      represent the output numbers exactly.  Otherwise, the default
11203      format is `%g'.
11204
11205 `-s STRING'
11206 `--separator=STRING'
11207      Separate numbers with STRING; default is a newline.  The output
11208      always terminates with a newline.
11209
11210 `-w'
11211 `--equal-width'
11212      Print all numbers with the same width, by padding with leading
11213      zeros.  FIRST, STEP, and LAST should all use a fixed point decimal
11214      representation.  (To have other kinds of padding, use `--format').
11215
11216
11217    You can get finer-grained control over output with `-f':
11218
11219      $ seq -f '(%9.2E)' -9e5 1.1e6 1.3e6
11220      (-9.00E+05)
11221      ( 2.00E+05)
11222      ( 1.30E+06)
11223
11224    If you want hexadecimal integer output, you can use `printf' to
11225 perform the conversion:
11226
11227      $ printf '%x\n' `seq 1048575 1024 1050623`
11228      fffff
11229      1003ff
11230      1007ff
11231
11232    For very long lists of numbers, use xargs to avoid system
11233 limitations on the length of an argument list:
11234
11235      $ seq 1000000 | xargs printf '%x\n' | tail -n 3
11236      f423e
11237      f423f
11238      f4240
11239
11240    To generate octal output, use the printf `%o' format instead of `%x'.
11241
11242    On most systems, seq can produce whole-number output for values up to
11243 at least `2^53'.  Larger integers are approximated.  The details differ
11244 depending on your floating-point implementation, but a common case is
11245 that `seq' works with integers through `2^64', and larger integers may
11246 not be numerically correct:
11247
11248      $ seq 18446744073709551616 1 18446744073709551618
11249      18446744073709551616
11250      18446744073709551616
11251      18446744073709551618
11252
11253    Be careful when using `seq' with a fractional INCREMENT; otherwise
11254 you may see surprising results.  Most people would expect to see
11255 `0.000003' printed as the last number in this example:
11256
11257      $ seq -s ' ' 0 0.000001 0.000003
11258      0.000000 0.000001 0.000002
11259
11260    But that doesn't happen on many systems because `seq' is implemented
11261 using binary floating point arithmetic (via the C `long double'
11262 type)--which means decimal fractions like `0.000001' cannot be
11263 represented exactly.  That in turn means some nonintuitive conditions
11264 like `0.000001 * 3 > 0.000003' will end up being true.
11265
11266    To work around that in the above example, use a slightly larger
11267 number as the LAST value:
11268
11269      $ seq -s ' ' 0 0.000001 0.0000031
11270      0.000000 0.000001 0.000002 0.000003
11271
11272    In general, when using an INCREMENT with a fractional part, where
11273 (LAST - FIRST) / INCREMENT is (mathematically) a whole number, specify
11274 a slightly larger (or smaller, if INCREMENT is negative) value for LAST
11275 to ensure that LAST is the final value printed by seq.
11276
11277    An exit status of zero indicates success, and a nonzero value
11278 indicates failure.
11279
11280 \1f
11281 File: coreutils.info,  Node: File permissions,  Next: Date input formats,  Prev: Numeric operations,  Up: Top
11282
11283 26 File permissions
11284 *******************
11285
11286 Each file has a set of "file mode bits" that control the kinds of
11287 access that users have to that file.  They can be represented either in
11288 symbolic form or as an octal number.
11289
11290 * Menu:
11291
11292 * Mode Structure::              Structure of file mode bits.
11293 * Symbolic Modes::              Mnemonic representation of file mode bits.
11294 * Numeric Modes::               File mode bits as octal numbers.
11295 * Directory Setuid and Setgid:: Set-user-ID and set-group-ID on directories.
11296
11297 \1f
11298 File: coreutils.info,  Node: Mode Structure,  Next: Symbolic Modes,  Up: File permissions
11299
11300 26.1 Structure of File Mode Bits
11301 ================================
11302
11303 The file mode bits have two parts: the "file permission bits", which
11304 control ordinary access to the file, and "special mode bits", which
11305 affect only some files.
11306
11307    There are three kinds of permissions that a user can have for a file:
11308
11309   1. permission to read the file.  For directories, this means
11310      permission to list the contents of the directory.
11311
11312   2. permission to write to (change) the file.  For directories, this
11313      means permission to create and remove files in the directory.
11314
11315   3. permission to execute the file (run it as a program).  For
11316      directories, this means permission to access files in the
11317      directory.
11318
11319    There are three categories of users who may have different
11320 permissions to perform any of the above operations on a file:
11321
11322   1. the file's owner;
11323
11324   2. other users who are in the file's group;
11325
11326   3. everyone else.
11327
11328    Files are given an owner and group when they are created.  Usually
11329 the owner is the current user and the group is the group of the
11330 directory the file is in, but this varies with the operating system, the
11331 file system the file is created on, and the way the file is created.
11332 You can change the owner and group of a file by using the `chown' and
11333 `chgrp' commands.
11334
11335    In addition to the three sets of three permissions listed above, the
11336 file mode bits have three special components, which affect only
11337 executable files (programs) and, on most systems, directories:
11338
11339   1. Set the process's effective user ID to that of the file upon
11340      execution (called the "set-user-ID bit", or sometimes the "setuid
11341      bit").  For directories on a few systems, give files created in
11342      the directory the same owner as the directory, no matter who
11343      creates them, and set the set-user-ID bit of newly-created
11344      subdirectories.
11345
11346   2. Set the process's effective group ID to that of the file upon
11347      execution (called the "set-group-ID bit", or sometimes the "setgid
11348      bit").  For directories on most systems, give files created in the
11349      directory the same group as the directory, no matter what group
11350      the user who creates them is in, and set the set-group-ID bit of
11351      newly-created subdirectories.
11352
11353   3. Prevent unprivileged users from removing or renaming a file in a
11354      directory unless they own the file or the directory; this is
11355      called the "restricted deletion flag" for the directory, and is
11356      commonly found on world-writable directories like `/tmp'.
11357
11358      For regular files on some older systems, save the program's text
11359      image on the swap device so it will load more quickly when run;
11360      this is called the "sticky bit".
11361
11362    In addition to the file mode bits listed above, there may be file
11363 attributes specific to the file system, e.g., access control lists
11364 (ACLs), whether a file is compressed, whether a file can be modified
11365 (immutability), and whether a file can be dumped.  These are usually
11366 set using programs specific to the file system.  For example:
11367
11368 ext2
11369      On GNU and GNU/Linux the file attributes specific to the ext2 file
11370      system are set using `chattr'.
11371
11372 FFS
11373      On FreeBSD the file flags specific to the FFS file system are set
11374      using `chflags'.
11375
11376    Even if a file's mode bits allow an operation on that file, that
11377 operation may still fail, because:
11378
11379    * the file-system-specific attributes or flags do not permit it; or
11380
11381    * the file system is mounted as read-only.
11382
11383    For example, if the immutable attribute is set on a file, it cannot
11384 be modified, regardless of the fact that you may have just run `chmod
11385 a+w FILE'.
11386
11387 \1f
11388 File: coreutils.info,  Node: Symbolic Modes,  Next: Numeric Modes,  Prev: Mode Structure,  Up: File permissions
11389
11390 26.2 Symbolic Modes
11391 ===================
11392
11393 "Symbolic modes" represent changes to files' mode bits as operations on
11394 single-character symbols.  They allow you to modify either all or
11395 selected parts of files' mode bits, optionally based on their previous
11396 values, and perhaps on the current `umask' as well (*note Umask and
11397 Protection::).
11398
11399    The format of symbolic modes is:
11400
11401      [ugoa...][+-=]PERMS...[,...]
11402
11403 where PERMS is either zero or more letters from the set `rwxXst', or a
11404 single letter from the set `ugo'.
11405
11406    The following sections describe the operators and other details of
11407 symbolic modes.
11408
11409 * Menu:
11410
11411 * Setting Permissions::          Basic operations on permissions.
11412 * Copying Permissions::          Copying existing permissions.
11413 * Changing Special Mode Bits::   Special mode bits.
11414 * Conditional Executability::    Conditionally affecting executability.
11415 * Multiple Changes::             Making multiple changes.
11416 * Umask and Protection::              The effect of the umask.
11417
11418 \1f
11419 File: coreutils.info,  Node: Setting Permissions,  Next: Copying Permissions,  Up: Symbolic Modes
11420
11421 26.2.1 Setting Permissions
11422 --------------------------
11423
11424 The basic symbolic operations on a file's permissions are adding,
11425 removing, and setting the permission that certain users have to read,
11426 write, and execute or search the file.  These operations have the
11427 following format:
11428
11429      USERS OPERATION PERMISSIONS
11430
11431 The spaces between the three parts above are shown for readability only;
11432 symbolic modes cannot contain spaces.
11433
11434    The USERS part tells which users' access to the file is changed.  It
11435 consists of one or more of the following letters (or it can be empty;
11436 *note Umask and Protection::, for a description of what happens then).
11437 When more than one of these letters is given, the order that they are
11438 in does not matter.
11439
11440 `u'
11441      the user who owns the file;
11442
11443 `g'
11444      other users who are in the file's group;
11445
11446 `o'
11447      all other users;
11448
11449 `a'
11450      all users; the same as `ugo'.
11451
11452    The OPERATION part tells how to change the affected users' access to
11453 the file, and is one of the following symbols:
11454
11455 `+'
11456      to add the PERMISSIONS to whatever permissions the USERS already
11457      have for the file;
11458
11459 `-'
11460      to remove the PERMISSIONS from whatever permissions the USERS
11461      already have for the file;
11462
11463 `='
11464      to make the PERMISSIONS the only permissions that the USERS have
11465      for the file.
11466
11467    The PERMISSIONS part tells what kind of access to the file should be
11468 changed; it is normally zero or more of the following letters.  As with
11469 the USERS part, the order does not matter when more than one letter is
11470 given.  Omitting the PERMISSIONS part is useful only with the `='
11471 operation, where it gives the specified USERS no access at all to the
11472 file.
11473
11474 `r'
11475      the permission the USERS have to read the file;
11476
11477 `w'
11478      the permission the USERS have to write to the file;
11479
11480 `x'
11481      the permission the USERS have to execute the file, or search it if
11482      it is a directory.
11483
11484    For example, to give everyone permission to read and write a regular
11485 file, but not to execute it, use:
11486
11487      a=rw
11488
11489    To remove write permission for all users other than the file's
11490 owner, use:
11491
11492      go-w
11493
11494 The above command does not affect the access that the owner of the file
11495 has to it, nor does it affect whether other users can read or execute
11496 the file.
11497
11498    To give everyone except a file's owner no permission to do anything
11499 with that file, use the mode below.  Other users could still remove the
11500 file, if they have write permission on the directory it is in.
11501
11502      go=
11503
11504 Another way to specify the same thing is:
11505
11506      og-rwx
11507
11508 \1f
11509 File: coreutils.info,  Node: Copying Permissions,  Next: Changing Special Mode Bits,  Prev: Setting Permissions,  Up: Symbolic Modes
11510
11511 26.2.2 Copying Existing Permissions
11512 -----------------------------------
11513
11514 You can base a file's permissions on its existing permissions.  To do
11515 this, instead of using a series of `r', `w', or `x' letters after the
11516 operator, you use the letter `u', `g', or `o'.  For example, the mode
11517
11518      o+g
11519
11520 adds the permissions for users who are in a file's group to the
11521 permissions that other users have for the file.  Thus, if the file
11522 started out as mode 664 (`rw-rw-r--'), the above mode would change it
11523 to mode 666 (`rw-rw-rw-').  If the file had started out as mode 741
11524 (`rwxr----x'), the above mode would change it to mode 745
11525 (`rwxr--r-x').  The `-' and `=' operations work analogously.
11526
11527 \1f
11528 File: coreutils.info,  Node: Changing Special Mode Bits,  Next: Conditional Executability,  Prev: Copying Permissions,  Up: Symbolic Modes
11529
11530 26.2.3 Changing Special Mode Bits
11531 ---------------------------------
11532
11533 In addition to changing a file's read, write, and execute/search
11534 permissions, you can change its special mode bits.  *Note Mode
11535 Structure::, for a summary of these special mode bits.
11536
11537    To change the file mode bits to set the user ID on execution, use
11538 `u' in the USERS part of the symbolic mode and `s' in the PERMISSIONS
11539 part.
11540
11541    To change the file mode bits to set the group ID on execution, use
11542 `g' in the USERS part of the symbolic mode and `s' in the PERMISSIONS
11543 part.
11544
11545    To set both user and group ID on execution, omit the USERS part of
11546 the symbolic mode (or use `a') and use `s' in the PERMISSIONS part.
11547
11548    To change the file mode bits to set the restricted deletion flag or
11549 sticky bit, omit the USERS part of the symbolic mode (or use `a') and
11550 use `t' in the PERMISSIONS part.
11551
11552    For example, to set the set-user-ID mode bit of a program, you can
11553 use the mode:
11554
11555      u+s
11556
11557    To remove both set-user-ID and set-group-ID mode bits from it, you
11558 can use the mode:
11559
11560      a-s
11561
11562    To set the restricted deletion flag or sticky bit, you can use the
11563 mode:
11564
11565      +t
11566
11567    The combination `o+s' has no effect.  On GNU systems the
11568 combinations `u+t' and `g+t' have no effect, and `o+t' acts like plain
11569 `+t'.
11570
11571    The `=' operator is not very useful with special mode bits.  For
11572 example, the mode:
11573
11574      o=t
11575
11576 does set the restricted deletion flag or sticky bit, but it also
11577 removes all read, write, and execute/search permissions that users not
11578 in the file's group might have had for it.
11579
11580    *Note Directory Setuid and Setgid::, for additional rules concerning
11581 set-user-ID and set-group-ID bits and directories.
11582
11583 \1f
11584 File: coreutils.info,  Node: Conditional Executability,  Next: Multiple Changes,  Prev: Changing Special Mode Bits,  Up: Symbolic Modes
11585
11586 26.2.4 Conditional Executability
11587 --------------------------------
11588
11589 There is one more special type of symbolic permission: if you use `X'
11590 instead of `x', execute/search permission is affected only if the file
11591 is a directory or already had execute permission.
11592
11593    For example, this mode:
11594
11595      a+X
11596
11597 gives all users permission to search directories, or to execute files if
11598 anyone could execute them before.
11599
11600 \1f
11601 File: coreutils.info,  Node: Multiple Changes,  Next: Umask and Protection,  Prev: Conditional Executability,  Up: Symbolic Modes
11602
11603 26.2.5 Making Multiple Changes
11604 ------------------------------
11605
11606 The format of symbolic modes is actually more complex than described
11607 above (*note Setting Permissions::).  It provides two ways to make
11608 multiple changes to files' mode bits.
11609
11610    The first way is to specify multiple OPERATION and PERMISSIONS parts
11611 after a USERS part in the symbolic mode.
11612
11613    For example, the mode:
11614
11615      og+rX-w
11616
11617 gives users other than the owner of the file read permission and, if it
11618 is a directory or if someone already had execute permission to it,
11619 gives them execute/search permission; and it also denies them write
11620 permission to the file.  It does not affect the permission that the
11621 owner of the file has for it.  The above mode is equivalent to the two
11622 modes:
11623
11624      og+rX
11625      og-w
11626
11627    The second way to make multiple changes is to specify more than one
11628 simple symbolic mode, separated by commas.  For example, the mode:
11629
11630      a+r,go-w
11631
11632 gives everyone permission to read the file and removes write permission
11633 on it for all users except its owner.  Another example:
11634
11635      u=rwx,g=rx,o=
11636
11637 sets all of the permission bits for the file explicitly.  (It gives
11638 users who are not in the file's group no permission at all for it.)
11639
11640    The two methods can be combined.  The mode:
11641
11642      a+r,g+x-w
11643
11644 gives all users permission to read the file, and gives users who are in
11645 the file's group permission to execute/search it as well, but not
11646 permission to write to it.  The above mode could be written in several
11647 different ways; another is:
11648
11649      u+r,g+rx,o+r,g-w
11650
11651 \1f
11652 File: coreutils.info,  Node: Umask and Protection,  Prev: Multiple Changes,  Up: Symbolic Modes
11653
11654 26.2.6 The Umask and Protection
11655 -------------------------------
11656
11657 If the USERS part of a symbolic mode is omitted, it defaults to `a'
11658 (affect all users), except that any permissions that are _set_ in the
11659 system variable `umask' are _not affected_.  The value of `umask' can
11660 be set using the `umask' command.  Its default value varies from system
11661 to system.
11662
11663    Omitting the USERS part of a symbolic mode is generally not useful
11664 with operations other than `+'.  It is useful with `+' because it
11665 allows you to use `umask' as an easily customizable protection against
11666 giving away more permission to files than you intended to.
11667
11668    As an example, if `umask' has the value 2, which removes write
11669 permission for users who are not in the file's group, then the mode:
11670
11671      +w
11672
11673 adds permission to write to the file to its owner and to other users who
11674 are in the file's group, but _not_ to other users.  In contrast, the
11675 mode:
11676
11677      a+w
11678
11679 ignores `umask', and _does_ give write permission for the file to all
11680 users.
11681
11682 \1f
11683 File: coreutils.info,  Node: Numeric Modes,  Next: Directory Setuid and Setgid,  Prev: Symbolic Modes,  Up: File permissions
11684
11685 26.3 Numeric Modes
11686 ==================
11687
11688 As an alternative to giving a symbolic mode, you can give an octal
11689 (base 8) number that represents the mode.  This number is always
11690 interpreted in octal; you do not have to add a leading `0', as you do
11691 in C.  Mode `0055' is the same as mode `55'.
11692
11693    A numeric mode is usually shorter than the corresponding symbolic
11694 mode, but it is limited in that normally it cannot take into account the
11695 previous file mode bits; it can only set them absolutely.  (As
11696 discussed in the next section, the set-user-ID and set-group-ID bits of
11697 directories are an exception to this general limitation.)
11698
11699    The permissions granted to the user, to other users in the file's
11700 group, and to other users not in the file's group each require three
11701 bits, which are represented as one octal digit.  The three special mode
11702 bits also require one bit each, and they are as a group represented as
11703 another octal digit.  Here is how the bits are arranged, starting with
11704 the lowest valued bit:
11705
11706      Value in  Corresponding
11707      Mode      Mode Bit
11708
11709                Other users not in the file's group:
11710         1      Execute/search
11711         2      Write
11712         4      Read
11713
11714                Other users in the file's group:
11715        10      Execute/search
11716        20      Write
11717        40      Read
11718
11719                The file's owner:
11720       100      Execute/search
11721       200      Write
11722       400      Read
11723
11724                Special mode bits:
11725      1000      Restricted deletion flag or sticky bit
11726      2000      Set group ID on execution
11727      4000      Set user ID on execution
11728
11729    For example, numeric mode `4755' corresponds to symbolic mode
11730 `u=rwxs,go=rx', and numeric mode `664' corresponds to symbolic mode
11731 `ug=rw,o=r'.  Numeric mode `0' corresponds to symbolic mode `a='.
11732
11733 \1f
11734 File: coreutils.info,  Node: Directory Setuid and Setgid,  Prev: Numeric Modes,  Up: File permissions
11735
11736 26.4 Directories and the Set-User-ID and Set-Group-ID Bits
11737 ==========================================================
11738
11739 On most systems, if a directory's set-group-ID bit is set, newly
11740 created subfiles inherit the same group as the directory, and newly
11741 created subdirectories inherit the set-group-ID bit of the parent
11742 directory.  On a few systems, a directory's set-user-ID bit has a
11743 similar effect on the ownership of new subfiles and the set-user-ID
11744 bits of new subdirectories.  These mechanisms let users share files
11745 more easily, by lessening the need to use `chmod' or `chown' to share
11746 new files.
11747
11748    These convenience mechanisms rely on the set-user-ID and set-group-ID
11749 bits of directories.  If commands like `chmod' and `mkdir' routinely
11750 cleared these bits on directories, the mechanisms would be less
11751 convenient and it would be harder to share files.  Therefore, a command
11752 like `chmod' does not affect the set-user-ID or set-group-ID bits of a
11753 directory unless the user specifically mentions them in a symbolic
11754 mode, or sets them in a numeric mode.  For example, on systems that
11755 support set-group-ID inheritance:
11756
11757      # These commands leave the set-user-ID and
11758      # set-group-ID bits of the subdirectories alone,
11759      # so that they retain their default values.
11760      mkdir A B C
11761      chmod 755 A
11762      chmod 0755 B
11763      chmod u=rwx,go=rx C
11764      mkdir -m 755 D
11765      mkdir -m 0755 E
11766      mkdir -m u=rwx,go=rx F
11767
11768    If you want to try to set these bits, you must mention them
11769 explicitly in the symbolic or numeric modes, e.g.:
11770
11771      # These commands try to set the set-user-ID
11772      # and set-group-ID bits of the subdirectories.
11773      mkdir G H
11774      chmod 6755 G
11775      chmod u=rwx,go=rx,a+s H
11776      mkdir -m 6755 I
11777      mkdir -m u=rwx,go=rx,a+s J
11778
11779    If you want to try to clear these bits, you must mention them
11780 explicitly in a symbolic mode, e.g.:
11781
11782      # This command tries to clear the set-user-ID
11783      # and set-group-ID bits of the directory D.
11784      chmod a-s D
11785
11786    This behavior is a GNU extension.  Portable scripts should not rely
11787 on requests to set or clear these bits on directories, as POSIX allows
11788 implementations to ignore these requests.
11789
11790 \1f
11791 File: coreutils.info,  Node: Date input formats,  Next: Opening the software toolbox,  Prev: File permissions,  Up: Top
11792
11793 27 Date input formats
11794 *********************
11795
11796 First, a quote:
11797
11798      Our units of temporal measurement, from seconds on up to months,
11799      are so complicated, asymmetrical and disjunctive so as to make
11800      coherent mental reckoning in time all but impossible.  Indeed, had
11801      some tyrannical god contrived to enslave our minds to time, to
11802      make it all but impossible for us to escape subjection to sodden
11803      routines and unpleasant surprises, he could hardly have done
11804      better than handing down our present system.  It is like a set of
11805      trapezoidal building blocks, with no vertical or horizontal
11806      surfaces, like a language in which the simplest thought demands
11807      ornate constructions, useless particles and lengthy
11808      circumlocutions.  Unlike the more successful patterns of language
11809      and science, which enable us to face experience boldly or at least
11810      level-headedly, our system of temporal calculation silently and
11811      persistently encourages our terror of time.
11812
11813      ...  It is as though architects had to measure length in feet,
11814      width in meters and height in ells; as though basic instruction
11815      manuals demanded a knowledge of five different languages.  It is
11816      no wonder then that we often look into our own immediate past or
11817      future, last Tuesday or a week from Sunday, with feelings of
11818      helpless confusion.  ...
11819
11820      -- Robert Grudin, `Time and the Art of Living'.
11821
11822    This section describes the textual date representations that GNU
11823 programs accept.  These are the strings you, as a user, can supply as
11824 arguments to the various programs.  The C interface (via the `get_date'
11825 function) is not described here.
11826
11827 * Menu:
11828
11829 * General date syntax::            Common rules.
11830 * Calendar date items::            19 Dec 1994.
11831 * Time of day items::              9:20pm.
11832 * Time zone items::                EST, PDT, GMT.
11833 * Day of week items::              Monday and others.
11834 * Relative items in date strings:: next tuesday, 2 years ago.
11835 * Pure numbers in date strings::   19931219, 1440.
11836 * Seconds since the Epoch::        @1078100502.
11837 * Specifying time zone rules::     TZ="America/New_York", TZ="UTC0".
11838 * Authors of get_date::            Bellovin, Eggert, Salz, Berets, et al.
11839
11840 \1f
11841 File: coreutils.info,  Node: General date syntax,  Next: Calendar date items,  Up: Date input formats
11842
11843 27.1 General date syntax
11844 ========================
11845
11846 A "date" is a string, possibly empty, containing many items separated
11847 by whitespace.  The whitespace may be omitted when no ambiguity arises.
11848 The empty string means the beginning of today (i.e., midnight).  Order
11849 of the items is immaterial.  A date string may contain many flavors of
11850 items:
11851
11852    * calendar date items
11853
11854    * time of day items
11855
11856    * time zone items
11857
11858    * day of the week items
11859
11860    * relative items
11861
11862    * pure numbers.
11863
11864 We describe each of these item types in turn, below.
11865
11866    A few ordinal numbers may be written out in words in some contexts.
11867 This is most useful for specifying day of the week items or relative
11868 items (see below).  Among the most commonly used ordinal numbers, the
11869 word `last' stands for -1, `this' stands for 0, and `first' and `next'
11870 both stand for 1.  Because the word `second' stands for the unit of
11871 time there is no way to write the ordinal number 2, but for convenience
11872 `third' stands for 3, `fourth' for 4, `fifth' for 5, `sixth' for 6,
11873 `seventh' for 7, `eighth' for 8, `ninth' for 9, `tenth' for 10,
11874 `eleventh' for 11 and `twelfth' for 12.
11875
11876    When a month is written this way, it is still considered to be
11877 written numerically, instead of being "spelled in full"; this changes
11878 the allowed strings.
11879
11880    In the current implementation, only English is supported for words
11881 and abbreviations like `AM', `DST', `EST', `first', `January',
11882 `Sunday', `tomorrow', and `year'.
11883
11884    The output of the `date' command is not always acceptable as a date
11885 string, not only because of the language problem, but also because
11886 there is no standard meaning for time zone items like `IST'.  When using
11887 `date' to generate a date string intended to be parsed later, specify a
11888 date format that is independent of language and that does not use time
11889 zone items other than `UTC' and `Z'.  Here are some ways to do this:
11890
11891      $ LC_ALL=C TZ=UTC0 date
11892      Mon Mar  1 00:21:42 UTC 2004
11893      $ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ'
11894      2004-03-01 00:21:42Z
11895      $ date --iso-8601=ns | tr T ' '  # --iso-8601 is a GNU extension.
11896      2004-02-29 16:21:42,692722128-0800
11897      $ date --rfc-2822  # a GNU extension
11898      Sun, 29 Feb 2004 16:21:42 -0800
11899      $ date +'%Y-%m-%d %H:%M:%S %z'  # %z is a GNU extension.
11900      2004-02-29 16:21:42 -0800
11901      $ date +'@%s.%N'  # %s and %N are GNU extensions.
11902      @1078100502.692722128
11903
11904    Alphabetic case is completely ignored in dates.  Comments may be
11905 introduced between round parentheses, as long as included parentheses
11906 are properly nested.  Hyphens not followed by a digit are currently
11907 ignored.  Leading zeros on numbers are ignored.
11908
11909    Invalid dates like `2005-02-29' or times like `24:00' are rejected.
11910 In the typical case of a host that does not support leap seconds, a
11911 time like `23:59:60' is rejected even if it corresponds to a valid leap
11912 second.
11913
11914 \1f
11915 File: coreutils.info,  Node: Calendar date items,  Next: Time of day items,  Prev: General date syntax,  Up: Date input formats
11916
11917 27.2 Calendar date items
11918 ========================
11919
11920 A "calendar date item" specifies a day of the year.  It is specified
11921 differently, depending on whether the month is specified numerically or
11922 literally.  All these strings specify the same calendar date:
11923
11924      1972-09-24     # ISO 8601.
11925      72-9-24        # Assume 19xx for 69 through 99,
11926                     # 20xx for 00 through 68.
11927      72-09-24       # Leading zeros are ignored.
11928      9/24/72        # Common U.S. writing.
11929      24 September 1972
11930      24 Sept 72     # September has a special abbreviation.
11931      24 Sep 72      # Three-letter abbreviations always allowed.
11932      Sep 24, 1972
11933      24-sep-72
11934      24sep72
11935
11936    The year can also be omitted.  In this case, the last specified year
11937 is used, or the current year if none.  For example:
11938
11939      9/24
11940      sep 24
11941
11942    Here are the rules.
11943
11944    For numeric months, the ISO 8601 format `YEAR-MONTH-DAY' is allowed,
11945 where YEAR is any positive number, MONTH is a number between 01 and 12,
11946 and DAY is a number between 01 and 31.  A leading zero must be present
11947 if a number is less than ten.  If YEAR is 68 or smaller, then 2000 is
11948 added to it; otherwise, if YEAR is less than 100, then 1900 is added to
11949 it.  The construct `MONTH/DAY/YEAR', popular in the United States, is
11950 accepted.  Also `MONTH/DAY', omitting the year.
11951
11952    Literal months may be spelled out in full: `January', `February',
11953 `March', `April', `May', `June', `July', `August', `September',
11954 `October', `November' or `December'.  Literal months may be abbreviated
11955 to their first three letters, possibly followed by an abbreviating dot.
11956 It is also permitted to write `Sept' instead of `September'.
11957
11958    When months are written literally, the calendar date may be given as
11959 any of the following:
11960
11961      DAY MONTH YEAR
11962      DAY MONTH
11963      MONTH DAY YEAR
11964      DAY-MONTH-YEAR
11965
11966    Or, omitting the year:
11967
11968      MONTH DAY
11969
11970 \1f
11971 File: coreutils.info,  Node: Time of day items,  Next: Time zone items,  Prev: Calendar date items,  Up: Date input formats
11972
11973 27.3 Time of day items
11974 ======================
11975
11976 A "time of day item" in date strings specifies the time on a given day.
11977 Here are some examples, all of which represent the same time:
11978
11979      20:02:00.000000
11980      20:02
11981      8:02pm
11982      20:02-0500      # In EST (U.S. Eastern Standard Time).
11983
11984    More generally, the time of day may be given as
11985 `HOUR:MINUTE:SECOND', where HOUR is a number between 0 and 23, MINUTE
11986 is a number between 0 and 59, and SECOND is a number between 0 and 59
11987 possibly followed by `.' or `,' and a fraction containing one or more
11988 digits.  Alternatively, `:SECOND' can be omitted, in which case it is
11989 taken to be zero.  On the rare hosts that support leap seconds, SECOND
11990 may be 60.
11991
11992    If the time is followed by `am' or `pm' (or `a.m.' or `p.m.'), HOUR
11993 is restricted to run from 1 to 12, and `:MINUTE' may be omitted (taken
11994 to be zero).  `am' indicates the first half of the day, `pm' indicates
11995 the second half of the day.  In this notation, 12 is the predecessor of
11996 1: midnight is `12am' while noon is `12pm'.  (This is the zero-oriented
11997 interpretation of `12am' and `12pm', as opposed to the old tradition
11998 derived from Latin which uses `12m' for noon and `12pm' for midnight.)
11999
12000    The time may alternatively be followed by a time zone correction,
12001 expressed as `SHHMM', where S is `+' or `-', HH is a number of zone
12002 hours and MM is a number of zone minutes.  You can also separate HH
12003 from MM with a colon.  When a time zone correction is given this way, it
12004 forces interpretation of the time relative to Coordinated Universal
12005 Time (UTC), overriding any previous specification for the time zone or
12006 the local time zone.  For example, `+0530' and `+05:30' both stand for
12007 the time zone 5.5 hours ahead of UTC (e.g., India).  The MINUTE part of
12008 the time of day may not be elided when a time zone correction is used.
12009 This is the best way to specify a time zone correction by fractional
12010 parts of an hour.
12011
12012    Either `am'/`pm' or a time zone correction may be specified, but not
12013 both.
12014
12015 \1f
12016 File: coreutils.info,  Node: Time zone items,  Next: Day of week items,  Prev: Time of day items,  Up: Date input formats
12017
12018 27.4 Time zone items
12019 ====================
12020
12021 A "time zone item" specifies an international time zone, indicated by a
12022 small set of letters, e.g., `UTC' or `Z' for Coordinated Universal
12023 Time.  Any included periods are ignored.  By following a
12024 non-daylight-saving time zone by the string `DST' in a separate word
12025 (that is, separated by some white space), the corresponding daylight
12026 saving time zone may be specified.  Alternatively, a
12027 non-daylight-saving time zone can be followed by a time zone
12028 correction, to add the two values.  This is normally done only for
12029 `UTC'; for example, `UTC+05:30' is equivalent to `+05:30'.
12030
12031    Time zone items other than `UTC' and `Z' are obsolescent and are not
12032 recommended, because they are ambiguous; for example, `EST' has a
12033 different meaning in Australia than in the United States.  Instead,
12034 it's better to use unambiguous numeric time zone corrections like
12035 `-0500', as described in the previous section.
12036
12037    If neither a time zone item nor a time zone correction is supplied,
12038 time stamps are interpreted using the rules of the default time zone
12039 (*note Specifying time zone rules::).
12040
12041 \1f
12042 File: coreutils.info,  Node: Day of week items,  Next: Relative items in date strings,  Prev: Time zone items,  Up: Date input formats
12043
12044 27.5 Day of week items
12045 ======================
12046
12047 The explicit mention of a day of the week will forward the date (only
12048 if necessary) to reach that day of the week in the future.
12049
12050    Days of the week may be spelled out in full: `Sunday', `Monday',
12051 `Tuesday', `Wednesday', `Thursday', `Friday' or `Saturday'.  Days may
12052 be abbreviated to their first three letters, optionally followed by a
12053 period.  The special abbreviations `Tues' for `Tuesday', `Wednes' for
12054 `Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed.
12055
12056    A number may precede a day of the week item to move forward
12057 supplementary weeks.  It is best used in expression like `third
12058 monday'.  In this context, `last DAY' or `next DAY' is also acceptable;
12059 they move one week before or after the day that DAY by itself would
12060 represent.
12061
12062    A comma following a day of the week item is ignored.
12063
12064 \1f
12065 File: coreutils.info,  Node: Relative items in date strings,  Next: Pure numbers in date strings,  Prev: Day of week items,  Up: Date input formats
12066
12067 27.6 Relative items in date strings
12068 ===================================
12069
12070 "Relative items" adjust a date (or the current date if none) forward or
12071 backward.  The effects of relative items accumulate.  Here are some
12072 examples:
12073
12074      1 year
12075      1 year ago
12076      3 years
12077      2 days
12078
12079    The unit of time displacement may be selected by the string `year'
12080 or `month' for moving by whole years or months.  These are fuzzy units,
12081 as years and months are not all of equal duration.  More precise units
12082 are `fortnight' which is worth 14 days, `week' worth 7 days, `day'
12083 worth 24 hours, `hour' worth 60 minutes, `minute' or `min' worth 60
12084 seconds, and `second' or `sec' worth one second.  An `s' suffix on
12085 these units is accepted and ignored.
12086
12087    The unit of time may be preceded by a multiplier, given as an
12088 optionally signed number.  Unsigned numbers are taken as positively
12089 signed.  No number at all implies 1 for a multiplier.  Following a
12090 relative item by the string `ago' is equivalent to preceding the unit
12091 by a multiplier with value -1.
12092
12093    The string `tomorrow' is worth one day in the future (equivalent to
12094 `day'), the string `yesterday' is worth one day in the past (equivalent
12095 to `day ago').
12096
12097    The strings `now' or `today' are relative items corresponding to
12098 zero-valued time displacement, these strings come from the fact a
12099 zero-valued time displacement represents the current time when not
12100 otherwise changed by previous items.  They may be used to stress other
12101 items, like in `12:00 today'.  The string `this' also has the meaning
12102 of a zero-valued time displacement, but is preferred in date strings
12103 like `this thursday'.
12104
12105    When a relative item causes the resulting date to cross a boundary
12106 where the clocks were adjusted, typically for daylight saving time, the
12107 resulting date and time are adjusted accordingly.
12108
12109    The fuzz in units can cause problems with relative items.  For
12110 example, `2003-07-31 -1 month' might evaluate to 2003-07-01, because
12111 2003-06-31 is an invalid date.  To determine the previous month more
12112 reliably, you can ask for the month before the 15th of the current
12113 month.  For example:
12114
12115      $ date -R
12116      Thu, 31 Jul 2003 13:02:39 -0700
12117      $ date --date='-1 month' +'Last month was %B?'
12118      Last month was July?
12119      $ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!'
12120      Last month was June!
12121
12122    Also, take care when manipulating dates around clock changes such as
12123 daylight saving leaps.  In a few cases these have added or subtracted
12124 as much as 24 hours from the clock, so it is often wise to adopt
12125 universal time by setting the `TZ' environment variable to `UTC0'
12126 before embarking on calendrical calculations.
12127
12128 \1f
12129 File: coreutils.info,  Node: Pure numbers in date strings,  Next: Seconds since the Epoch,  Prev: Relative items in date strings,  Up: Date input formats
12130
12131 27.7 Pure numbers in date strings
12132 =================================
12133
12134 The precise interpretation of a pure decimal number depends on the
12135 context in the date string.
12136
12137    If the decimal number is of the form YYYYMMDD and no other calendar
12138 date item (*note Calendar date items::) appears before it in the date
12139 string, then YYYY is read as the year, MM as the month number and DD as
12140 the day of the month, for the specified calendar date.
12141
12142    If the decimal number is of the form HHMM and no other time of day
12143 item appears before it in the date string, then HH is read as the hour
12144 of the day and MM as the minute of the hour, for the specified time of
12145 day.  MM can also be omitted.
12146
12147    If both a calendar date and a time of day appear to the left of a
12148 number in the date string, but no relative item, then the number
12149 overrides the year.
12150
12151 \1f
12152 File: coreutils.info,  Node: Seconds since the Epoch,  Next: Specifying time zone rules,  Prev: Pure numbers in date strings,  Up: Date input formats
12153
12154 27.8 Seconds since the Epoch
12155 ============================
12156
12157 If you precede a number with `@', it represents an internal time stamp
12158 as a count of seconds.  The number can contain an internal decimal
12159 point (either `.' or `,'); any excess precision not supported by the
12160 internal representation is truncated toward minus infinity.  Such a
12161 number cannot be combined with any other date item, as it specifies a
12162 complete time stamp.
12163
12164    Internally, computer times are represented as a count of seconds
12165 since an epoch--a well-defined point of time.  On GNU and POSIX
12166 systems, the epoch is 1970-01-01 00:00:00 UTC, so `@0' represents this
12167 time, `@1' represents 1970-01-01 00:00:01 UTC, and so forth.  GNU and
12168 most other POSIX-compliant systems support such times as an extension
12169 to POSIX, using negative counts, so that `@-1' represents 1969-12-31
12170 23:59:59 UTC.
12171
12172    Traditional Unix systems count seconds with 32-bit two's-complement
12173 integers and can represent times from 1901-12-13 20:45:52 through
12174 2038-01-19 03:14:07 UTC.  More modern systems use 64-bit counts of
12175 seconds with nanosecond subcounts, and can represent all the times in
12176 the known lifetime of the universe to a resolution of 1 nanosecond.
12177
12178    On most hosts, these counts ignore the presence of leap seconds.
12179 For example, on most hosts `@915148799' represents 1998-12-31 23:59:59
12180 UTC, `@915148800' represents 1999-01-01 00:00:00 UTC, and there is no
12181 way to represent the intervening leap second 1998-12-31 23:59:60 UTC.
12182
12183 \1f
12184 File: coreutils.info,  Node: Specifying time zone rules,  Next: Authors of get_date,  Prev: Seconds since the Epoch,  Up: Date input formats
12185
12186 27.9 Specifying time zone rules
12187 ===============================
12188
12189 Normally, dates are interpreted using the rules of the current time
12190 zone, which in turn are specified by the `TZ' environment variable, or
12191 by a system default if `TZ' is not set.  To specify a different set of
12192 default time zone rules that apply just to one date, start the date
12193 with a string of the form `TZ="RULE"'.  The two quote characters (`"')
12194 must be present in the date, and any quotes or backslashes within RULE
12195 must be escaped by a backslash.
12196
12197    For example, with the GNU `date' command you can answer the question
12198 "What time is it in New York when a Paris clock shows 6:30am on October
12199 31, 2004?" by using a date beginning with `TZ="Europe/Paris"' as shown
12200 in the following shell transcript:
12201
12202      $ export TZ="America/New_York"
12203      $ date --date='TZ="Europe/Paris" 2004-10-31 06:30'
12204      Sun Oct 31 01:30:00 EDT 2004
12205
12206    In this example, the `--date' operand begins with its own `TZ'
12207 setting, so the rest of that operand is processed according to
12208 `Europe/Paris' rules, treating the string `2004-10-31 06:30' as if it
12209 were in Paris.  However, since the output of the `date' command is
12210 processed according to the overall time zone rules, it uses New York
12211 time.  (Paris was normally six hours ahead of New York in 2004, but
12212 this example refers to a brief Halloween period when the gap was five
12213 hours.)
12214
12215    A `TZ' value is a rule that typically names a location in the `tz'
12216 database (http://www.twinsun.com/tz/tz-link.htm).  A recent catalog of
12217 location names appears in the TWiki Date and Time Gateway
12218 (http://twiki.org/cgi-bin/xtra/tzdate).  A few non-GNU hosts require a
12219 colon before a location name in a `TZ' setting, e.g.,
12220 `TZ=":America/New_York"'.
12221
12222    The `tz' database includes a wide variety of locations ranging from
12223 `Arctic/Longyearbyen' to `Antarctica/South_Pole', but if you are at sea
12224 and have your own private time zone, or if you are using a non-GNU host
12225 that does not support the `tz' database, you may need to use a POSIX
12226 rule instead.  Simple POSIX rules like `UTC0' specify a time zone
12227 without daylight saving time; other rules can specify simple daylight
12228 saving regimes.  *Note Specifying the Time Zone with `TZ': (libc)TZ
12229 Variable.
12230
12231 \1f
12232 File: coreutils.info,  Node: Authors of get_date,  Prev: Specifying time zone rules,  Up: Date input formats
12233
12234 27.10 Authors of `get_date'
12235 ===========================
12236
12237 `get_date' was originally implemented by Steven M. Bellovin
12238 (<smb@research.att.com>) while at the University of North Carolina at
12239 Chapel Hill.  The code was later tweaked by a couple of people on
12240 Usenet, then completely overhauled by Rich $alz (<rsalz@bbn.com>) and
12241 Jim Berets (<jberets@bbn.com>) in August, 1990.  Various revisions for
12242 the GNU system were made by David MacKenzie, Jim Meyering, Paul Eggert
12243 and others.
12244
12245    This chapter was originally produced by Franc,ois Pinard
12246 (<pinard@iro.umontreal.ca>) from the `getdate.y' source code, and then
12247 edited by K. Berry (<kb@cs.umb.edu>).
12248
12249 \1f
12250 File: coreutils.info,  Node: Opening the software toolbox,  Next: Copying This Manual,  Prev: Date input formats,  Up: Top
12251
12252 28 Opening the Software Toolbox
12253 *******************************
12254
12255 An earlier version of this chapter appeared in 2 (June 1994).  It was
12256 written by Arnold Robbins.
12257
12258 * Menu:
12259
12260 * Toolbox introduction::        Toolbox introduction
12261 * I/O redirection::             I/O redirection
12262 * The who command::             The `who' command
12263 * The cut command::             The `cut' command
12264 * The sort command::            The `sort' command
12265 * The uniq command::            The `uniq' command
12266 * Putting the tools together::  Putting the tools together
12267
12268 \1f
12269 File: coreutils.info,  Node: Toolbox introduction,  Next: I/O redirection,  Up: Opening the software toolbox
12270
12271 Toolbox Introduction
12272 ====================
12273
12274 This month's column is only peripherally related to the GNU Project, in
12275 that it describes a number of the GNU tools on your GNU/Linux system
12276 and how they might be used.  What it's really about is the "Software
12277 Tools" philosophy of program development and usage.
12278
12279    The software tools philosophy was an important and integral concept
12280 in the initial design and development of Unix (of which Linux and GNU
12281 are essentially clones).  Unfortunately, in the modern day press of
12282 Internetworking and flashy GUIs, it seems to have fallen by the
12283 wayside.  This is a shame, since it provides a powerful mental model
12284 for solving many kinds of problems.
12285
12286    Many people carry a Swiss Army knife around in their pants pockets
12287 (or purse).  A Swiss Army knife is a handy tool to have: it has several
12288 knife blades, a screwdriver, tweezers, toothpick, nail file, corkscrew,
12289 and perhaps a number of other things on it.  For the everyday, small
12290 miscellaneous jobs where you need a simple, general purpose tool, it's
12291 just the thing.
12292
12293    On the other hand, an experienced carpenter doesn't build a house
12294 using a Swiss Army knife.  Instead, he has a toolbox chock full of
12295 specialized tools--a saw, a hammer, a screwdriver, a plane, and so on.
12296 And he knows exactly when and where to use each tool; you won't catch
12297 him hammering nails with the handle of his screwdriver.
12298
12299    The Unix developers at Bell Labs were all professional programmers
12300 and trained computer scientists.  They had found that while a
12301 one-size-fits-all program might appeal to a user because there's only
12302 one program to use, in practice such programs are
12303
12304   a. difficult to write,
12305
12306   b. difficult to maintain and debug, and
12307
12308   c. difficult to extend to meet new situations.
12309
12310    Instead, they felt that programs should be specialized tools.  In
12311 short, each program "should do one thing well."  No more and no less.
12312 Such programs are simpler to design, write, and get right--they only do
12313 one thing.
12314
12315    Furthermore, they found that with the right machinery for hooking
12316 programs together, that the whole was greater than the sum of the
12317 parts.  By combining several special purpose programs, you could
12318 accomplish a specific task that none of the programs was designed for,
12319 and accomplish it much more quickly and easily than if you had to write
12320 a special purpose program.  We will see some (classic) examples of this
12321 further on in the column.  (An important additional point was that, if
12322 necessary, take a detour and build any software tools you may need
12323 first, if you don't already have something appropriate in the toolbox.)
12324
12325 \1f
12326 File: coreutils.info,  Node: I/O redirection,  Next: The who command,  Prev: Toolbox introduction,  Up: Opening the software toolbox
12327
12328 I/O Redirection
12329 ===============
12330
12331 Hopefully, you are familiar with the basics of I/O redirection in the
12332 shell, in particular the concepts of "standard input," "standard
12333 output," and "standard error".  Briefly, "standard input" is a data
12334 source, where data comes from.  A program should not need to either
12335 know or care if the data source is a disk file, a keyboard, a magnetic
12336 tape, or even a punched card reader.  Similarly, "standard output" is a
12337 data sink, where data goes to.  The program should neither know nor
12338 care where this might be.  Programs that only read their standard
12339 input, do something to the data, and then send it on, are called
12340 "filters", by analogy to filters in a water pipeline.
12341
12342    With the Unix shell, it's very easy to set up data pipelines:
12343
12344      program_to_create_data | filter1 | ... | filterN > final.pretty.data
12345
12346    We start out by creating the raw data; each filter applies some
12347 successive transformation to the data, until by the time it comes out
12348 of the pipeline, it is in the desired form.
12349
12350    This is fine and good for standard input and standard output.  Where
12351 does the standard error come in to play?  Well, think about `filter1' in
12352 the pipeline above.  What happens if it encounters an error in the data
12353 it sees?  If it writes an error message to standard output, it will just
12354 disappear down the pipeline into `filter2''s input, and the user will
12355 probably never see it.  So programs need a place where they can send
12356 error messages so that the user will notice them.  This is standard
12357 error, and it is usually connected to your console or window, even if
12358 you have redirected standard output of your program away from your
12359 screen.
12360
12361    For filter programs to work together, the format of the data has to
12362 be agreed upon.  The most straightforward and easiest format to use is
12363 simply lines of text.  Unix data files are generally just streams of
12364 bytes, with lines delimited by the ASCII LF (Line Feed) character,
12365 conventionally called a "newline" in the Unix literature.  (This is
12366 `'\n'' if you're a C programmer.)  This is the format used by all the
12367 traditional filtering programs.  (Many earlier operating systems had
12368 elaborate facilities and special purpose programs for managing binary
12369 data.  Unix has always shied away from such things, under the
12370 philosophy that it's easiest to simply be able to view and edit your
12371 data with a text editor.)
12372
12373    OK, enough introduction.  Let's take a look at some of the tools,
12374 and then we'll see how to hook them together in interesting ways.   In
12375 the following discussion, we will only present those command line
12376 options that interest us.  As you should always do, double check your
12377 system documentation for the full story.
12378
12379 \1f
12380 File: coreutils.info,  Node: The who command,  Next: The cut command,  Prev: I/O redirection,  Up: Opening the software toolbox
12381
12382 The `who' Command
12383 =================
12384
12385 The first program is the `who' command.  By itself, it generates a list
12386 of the users who are currently logged in.  Although I'm writing this on
12387 a single-user system, we'll pretend that several people are logged in:
12388
12389      $ who
12390      -| arnold   console Jan 22 19:57
12391      -| miriam   ttyp0   Jan 23 14:19(:0.0)
12392      -| bill     ttyp1   Jan 21 09:32(:0.0)
12393      -| arnold   ttyp2   Jan 23 20:48(:0.0)
12394
12395    Here, the `$' is the usual shell prompt, at which I typed `who'.
12396 There are three people logged in, and I am logged in twice.  On
12397 traditional Unix systems, user names are never more than eight
12398 characters long.  This little bit of trivia will be useful later.  The
12399 output of `who' is nice, but the data is not all that exciting.
12400
12401 \1f
12402 File: coreutils.info,  Node: The cut command,  Next: The sort command,  Prev: The who command,  Up: Opening the software toolbox
12403
12404 The `cut' Command
12405 =================
12406
12407 The next program we'll look at is the `cut' command.  This program cuts
12408 out columns or fields of input data.  For example, we can tell it to
12409 print just the login name and full name from the `/etc/passwd' file.
12410 The `/etc/passwd' file has seven fields, separated by colons:
12411
12412      arnold:xyzzy:2076:10:Arnold D. Robbins:/home/arnold:/bin/bash
12413
12414    To get the first and fifth fields, we would use `cut' like this:
12415
12416      $ cut -d: -f1,5 /etc/passwd
12417      -| root:Operator
12418      ...
12419      -| arnold:Arnold D. Robbins
12420      -| miriam:Miriam A. Robbins
12421      ...
12422
12423    With the `-c' option, `cut' will cut out specific characters (i.e.,
12424 columns) in the input lines.  This is useful for input data that has
12425 fixed width fields, and does not have a field separator.  For example,
12426 list the Monday dates for the current month:
12427
12428      $ cal | cut -c 3-5
12429      -|Mo
12430      -|
12431      -|  6
12432      -| 13
12433      -| 20
12434      -| 27
12435
12436 \1f
12437 File: coreutils.info,  Node: The sort command,  Next: The uniq command,  Prev: The cut command,  Up: Opening the software toolbox
12438
12439 The `sort' Command
12440 ==================
12441
12442 Next we'll look at the `sort' command.  This is one of the most
12443 powerful commands on a Unix-style system; one that you will often find
12444 yourself using when setting up fancy data plumbing.
12445
12446    The `sort' command reads and sorts each file named on the command
12447 line.  It then merges the sorted data and writes it to standard output.
12448 It will read standard input if no files are given on the command line
12449 (thus making it into a filter).  The sort is based on the character
12450 collating sequence or based on user-supplied ordering criteria.
12451
12452 \1f
12453 File: coreutils.info,  Node: The uniq command,  Next: Putting the tools together,  Prev: The sort command,  Up: Opening the software toolbox
12454
12455 The `uniq' Command
12456 ==================
12457
12458 Finally (at least for now), we'll look at the `uniq' program.  When
12459 sorting data, you will often end up with duplicate lines, lines that
12460 are identical.  Usually, all you need is one instance of each line.
12461 This is where `uniq' comes in.  The `uniq' program reads its standard
12462 input.  It prints only one copy of each repeated line.  It does have
12463 several options.  Later on, we'll use the `-c' option, which prints
12464 each unique line, preceded by a count of the number of times that line
12465 occurred in the input.
12466
12467 \1f
12468 File: coreutils.info,  Node: Putting the tools together,  Prev: The uniq command,  Up: Opening the software toolbox
12469
12470 Putting the Tools Together
12471 ==========================
12472
12473 Now, let's suppose this is a large ISP server system with dozens of
12474 users logged in.  The management wants the system administrator to
12475 write a program that will generate a sorted list of logged in users.
12476 Furthermore, even if a user is logged in multiple times, his or her
12477 name should only show up in the output once.
12478
12479    The administrator could sit down with the system documentation and
12480 write a C program that did this.  It would take perhaps a couple of
12481 hundred lines of code and about two hours to write it, test it, and
12482 debug it.  However, knowing the software toolbox, the administrator can
12483 instead start out by generating just a list of logged on users:
12484
12485      $ who | cut -c1-8
12486      -| arnold
12487      -| miriam
12488      -| bill
12489      -| arnold
12490
12491    Next, sort the list:
12492
12493      $ who | cut -c1-8 | sort
12494      -| arnold
12495      -| arnold
12496      -| bill
12497      -| miriam
12498
12499    Finally, run the sorted list through `uniq', to weed out duplicates:
12500
12501      $ who | cut -c1-8 | sort | uniq
12502      -| arnold
12503      -| bill
12504      -| miriam
12505
12506    The `sort' command actually has a `-u' option that does what `uniq'
12507 does.  However, `uniq' has other uses for which one cannot substitute
12508 `sort -u'.
12509
12510    The administrator puts this pipeline into a shell script, and makes
12511 it available for all the users on the system (`#' is the system
12512 administrator, or `root', prompt):
12513
12514      # cat > /usr/local/bin/listusers
12515      who | cut -c1-8 | sort | uniq
12516      ^D
12517      # chmod +x /usr/local/bin/listusers
12518
12519    There are four major points to note here.  First, with just four
12520 programs, on one command line, the administrator was able to save about
12521 two hours worth of work.  Furthermore, the shell pipeline is just about
12522 as efficient as the C program would be, and it is much more efficient in
12523 terms of programmer time.  People time is much more expensive than
12524 computer time, and in our modern "there's never enough time to do
12525 everything" society, saving two hours of programmer time is no mean
12526 feat.
12527
12528    Second, it is also important to emphasize that with the
12529 _combination_ of the tools, it is possible to do a special purpose job
12530 never imagined by the authors of the individual programs.
12531
12532    Third, it is also valuable to build up your pipeline in stages, as
12533 we did here.  This allows you to view the data at each stage in the
12534 pipeline, which helps you acquire the confidence that you are indeed
12535 using these tools correctly.
12536
12537    Finally, by bundling the pipeline in a shell script, other users can
12538 use your command, without having to remember the fancy plumbing you set
12539 up for them.  In terms of how you run them, shell scripts and compiled
12540 programs are indistinguishable.
12541
12542    After the previous warm-up exercise, we'll look at two additional,
12543 more complicated pipelines.  For them, we need to introduce two more
12544 tools.
12545
12546    The first is the `tr' command, which stands for "transliterate."
12547 The `tr' command works on a character-by-character basis, changing
12548 characters.  Normally it is used for things like mapping upper case to
12549 lower case:
12550
12551      $ echo ThIs ExAmPlE HaS MIXED case! | tr '[:upper:]' '[:lower:]'
12552      -| this example has mixed case!
12553
12554    There are several options of interest:
12555
12556 `-c'
12557      work on the complement of the listed characters, i.e., operations
12558      apply to characters not in the given set
12559
12560 `-d'
12561      delete characters in the first set from the output
12562
12563 `-s'
12564      squeeze repeated characters in the output into just one character.
12565
12566    We will be using all three options in a moment.
12567
12568    The other command we'll look at is `comm'.  The `comm' command takes
12569 two sorted input files as input data, and prints out the files' lines
12570 in three columns.  The output columns are the data lines unique to the
12571 first file, the data lines unique to the second file, and the data
12572 lines that are common to both.  The `-1', `-2', and `-3' command line
12573 options _omit_ the respective columns.  (This is non-intuitive and
12574 takes a little getting used to.)  For example:
12575
12576      $ cat f1
12577      -| 11111
12578      -| 22222
12579      -| 33333
12580      -| 44444
12581      $ cat f2
12582      -| 00000
12583      -| 22222
12584      -| 33333
12585      -| 55555
12586      $ comm f1 f2
12587      -|         00000
12588      -| 11111
12589      -|                 22222
12590      -|                 33333
12591      -| 44444
12592      -|         55555
12593
12594    The file name `-' tells `comm' to read standard input instead of a
12595 regular file.
12596
12597    Now we're ready to build a fancy pipeline.  The first application is
12598 a word frequency counter.  This helps an author determine if he or she
12599 is over-using certain words.
12600
12601    The first step is to change the case of all the letters in our input
12602 file to one case.  "The" and "the" are the same word when doing
12603 counting.
12604
12605      $ tr '[:upper:]' '[:lower:]' < whats.gnu | ...
12606
12607    The next step is to get rid of punctuation.  Quoted words and
12608 unquoted words should be treated identically; it's easiest to just get
12609 the punctuation out of the way.
12610
12611      $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' | ...
12612
12613    The second `tr' command operates on the complement of the listed
12614 characters, which are all the letters, the digits, the underscore, and
12615 the blank.  The `\n' represents the newline character; it has to be
12616 left alone.  (The ASCII tab character should also be included for good
12617 measure in a production script.)
12618
12619    At this point, we have data consisting of words separated by blank
12620 space.  The words only contain alphanumeric characters (and the
12621 underscore).  The next step is break the data apart so that we have one
12622 word per line.  This makes the counting operation much easier, as we
12623 will see shortly.
12624
12625      $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' |
12626      > tr -s ' ' '\n' | ...
12627
12628    This command turns blanks into newlines.  The `-s' option squeezes
12629 multiple newline characters in the output into just one.  This helps us
12630 avoid blank lines.  (The `>' is the shell's "secondary prompt."  This
12631 is what the shell prints when it notices you haven't finished typing in
12632 all of a command.)
12633
12634    We now have data consisting of one word per line, no punctuation,
12635 all one case.  We're ready to count each word:
12636
12637      $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' |
12638      > tr -s ' ' '\n' | sort | uniq -c | ...
12639
12640    At this point, the data might look something like this:
12641
12642           60 a
12643            2 able
12644            6 about
12645            1 above
12646            2 accomplish
12647            1 acquire
12648            1 actually
12649            2 additional
12650
12651    The output is sorted by word, not by count!  What we want is the most
12652 frequently used words first.  Fortunately, this is easy to accomplish,
12653 with the help of two more `sort' options:
12654
12655 `-n'
12656      do a numeric sort, not a textual one
12657
12658 `-r'
12659      reverse the order of the sort
12660
12661    The final pipeline looks like this:
12662
12663      $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' |
12664      > tr -s ' ' '\n' | sort | uniq -c | sort -n -r
12665      -|    156 the
12666      -|     60 a
12667      -|     58 to
12668      -|     51 of
12669      -|     51 and
12670      ...
12671
12672    Whew!  That's a lot to digest.  Yet, the same principles apply.
12673 With six commands, on two lines (really one long one split for
12674 convenience), we've created a program that does something interesting
12675 and useful, in much less time than we could have written a C program to
12676 do the same thing.
12677
12678    A minor modification to the above pipeline can give us a simple
12679 spelling checker!  To determine if you've spelled a word correctly, all
12680 you have to do is look it up in a dictionary.  If it is not there, then
12681 chances are that your spelling is incorrect.  So, we need a dictionary.
12682 The conventional location for a dictionary is `/usr/dict/words'.  On my
12683 GNU/Linux system,(1) this is a is a sorted, 45,402 word dictionary.
12684
12685    Now, how to compare our file with the dictionary?  As before, we
12686 generate a sorted list of words, one per line:
12687
12688      $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' |
12689      > tr -s ' ' '\n' | sort -u | ...
12690
12691    Now, all we need is a list of words that are _not_ in the
12692 dictionary.  Here is where the `comm' command comes in.
12693
12694      $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' |
12695      > tr -s ' ' '\n' | sort -u |
12696      > comm -23 - /usr/dict/words
12697
12698    The `-2' and `-3' options eliminate lines that are only in the
12699 dictionary (the second file), and lines that are in both files.  Lines
12700 only in the first file (standard input, our stream of words), are words
12701 that are not in the dictionary.  These are likely candidates for
12702 spelling errors.  This pipeline was the first cut at a production
12703 spelling checker on Unix.
12704
12705    There are some other tools that deserve brief mention.
12706
12707 `grep'
12708      search files for text that matches a regular expression
12709
12710 `wc'
12711      count lines, words, characters
12712
12713 `tee'
12714      a T-fitting for data pipes, copies data to files and to standard
12715      output
12716
12717 `sed'
12718      the stream editor, an advanced tool
12719
12720 `awk'
12721      a data manipulation language, another advanced tool
12722
12723    The software tools philosophy also espoused the following bit of
12724 advice: "Let someone else do the hard part."  This means, take
12725 something that gives you most of what you need, and then massage it the
12726 rest of the way until it's in the form that you want.
12727
12728    To summarize:
12729
12730   1. Each program should do one thing well.  No more, no less.
12731
12732   2. Combining programs with appropriate plumbing leads to results where
12733      the whole is greater than the sum of the parts.  It also leads to
12734      novel uses of programs that the authors might never have imagined.
12735
12736   3. Programs should never print extraneous header or trailer data,
12737      since these could get sent on down a pipeline.  (A point we didn't
12738      mention earlier.)
12739
12740   4. Let someone else do the hard part.
12741
12742   5. Know your toolbox!  Use each program appropriately.  If you don't
12743      have an appropriate tool, build one.
12744
12745    As of this writing, all the programs we've discussed are available
12746 via anonymous `ftp' from:
12747 `ftp://gnudist.gnu.org/textutils/textutils-1.22.tar.gz'.  (There may be
12748 more recent versions available now.)
12749
12750    None of what I have presented in this column is new.  The Software
12751 Tools philosophy was first introduced in the book `Software Tools', by
12752 Brian Kernighan and P.J. Plauger (Addison-Wesley, ISBN 0-201-03669-X).
12753 This book showed how to write and use software tools.  It was written in
12754 1976, using a preprocessor for FORTRAN named `ratfor' (RATional
12755 FORtran).  At the time, C was not as ubiquitous as it is now; FORTRAN
12756 was.  The last chapter presented a `ratfor' to FORTRAN processor,
12757 written in `ratfor'.  `ratfor' looks an awful lot like C; if you know
12758 C, you won't have any problem following the code.
12759
12760    In 1981, the book was updated and made available as `Software Tools
12761 in Pascal' (Addison-Wesley, ISBN 0-201-10342-7).  Both books are still
12762 in print and are well worth reading if you're a programmer.  They
12763 certainly made a major change in how I view programming.
12764
12765    The programs in both books are available from Brian Kernighan's home
12766 page (http://cm.bell-labs.com/who/bwk).  For a number of years, there
12767 was an active Software Tools Users Group, whose members had ported the
12768 original `ratfor' programs to essentially every computer system with a
12769 FORTRAN compiler.  The popularity of the group waned in the middle 1980s
12770 as Unix began to spread beyond universities.
12771
12772    With the current proliferation of GNU code and other clones of Unix
12773 programs, these programs now receive little attention; modern C
12774 versions are much more efficient and do more than these programs do.
12775 Nevertheless, as exposition of good programming style, and evangelism
12776 for a still-valuable philosophy, these books are unparalleled, and I
12777 recommend them highly.
12778
12779    Acknowledgment: I would like to express my gratitude to Brian
12780 Kernighan of Bell Labs, the original Software Toolsmith, for reviewing
12781 this column.
12782
12783    ---------- Footnotes ----------
12784
12785    (1) Redhat Linux 6.1, for the November 2000 revision of this article.
12786
12787 \1f
12788 File: coreutils.info,  Node: Copying This Manual,  Next: Index,  Prev: Opening the software toolbox,  Up: Top
12789
12790 Appendix A Copying This Manual
12791 ******************************
12792
12793 * Menu:
12794
12795 * GNU Free Documentation License::  License for copying this manual.
12796
12797 \1f
12798 File: coreutils.info,  Node: GNU Free Documentation License,  Up: Copying This Manual
12799
12800 A.1 GNU Free Documentation License
12801 ==================================
12802
12803                       Version 1.2, November 2002
12804
12805      Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
12806      51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
12807
12808      Everyone is permitted to copy and distribute verbatim copies
12809      of this license document, but changing it is not allowed.
12810
12811   0. PREAMBLE
12812
12813      The purpose of this License is to make a manual, textbook, or other
12814      functional and useful document "free" in the sense of freedom: to
12815      assure everyone the effective freedom to copy and redistribute it,
12816      with or without modifying it, either commercially or
12817      noncommercially.  Secondarily, this License preserves for the
12818      author and publisher a way to get credit for their work, while not
12819      being considered responsible for modifications made by others.
12820
12821      This License is a kind of "copyleft", which means that derivative
12822      works of the document must themselves be free in the same sense.
12823      It complements the GNU General Public License, which is a copyleft
12824      license designed for free software.
12825
12826      We have designed this License in order to use it for manuals for
12827      free software, because free software needs free documentation: a
12828      free program should come with manuals providing the same freedoms
12829      that the software does.  But this License is not limited to
12830      software manuals; it can be used for any textual work, regardless
12831      of subject matter or whether it is published as a printed book.
12832      We recommend this License principally for works whose purpose is
12833      instruction or reference.
12834
12835   1. APPLICABILITY AND DEFINITIONS
12836
12837      This License applies to any manual or other work, in any medium,
12838      that contains a notice placed by the copyright holder saying it
12839      can be distributed under the terms of this License.  Such a notice
12840      grants a world-wide, royalty-free license, unlimited in duration,
12841      to use that work under the conditions stated herein.  The
12842      "Document", below, refers to any such manual or work.  Any member
12843      of the public is a licensee, and is addressed as "you".  You
12844      accept the license if you copy, modify or distribute the work in a
12845      way requiring permission under copyright law.
12846
12847      A "Modified Version" of the Document means any work containing the
12848      Document or a portion of it, either copied verbatim, or with
12849      modifications and/or translated into another language.
12850
12851      A "Secondary Section" is a named appendix or a front-matter section
12852      of the Document that deals exclusively with the relationship of the
12853      publishers or authors of the Document to the Document's overall
12854      subject (or to related matters) and contains nothing that could
12855      fall directly within that overall subject.  (Thus, if the Document
12856      is in part a textbook of mathematics, a Secondary Section may not
12857      explain any mathematics.)  The relationship could be a matter of
12858      historical connection with the subject or with related matters, or
12859      of legal, commercial, philosophical, ethical or political position
12860      regarding them.
12861
12862      The "Invariant Sections" are certain Secondary Sections whose
12863      titles are designated, as being those of Invariant Sections, in
12864      the notice that says that the Document is released under this
12865      License.  If a section does not fit the above definition of
12866      Secondary then it is not allowed to be designated as Invariant.
12867      The Document may contain zero Invariant Sections.  If the Document
12868      does not identify any Invariant Sections then there are none.
12869
12870      The "Cover Texts" are certain short passages of text that are
12871      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
12872      that says that the Document is released under this License.  A
12873      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
12874      be at most 25 words.
12875
12876      A "Transparent" copy of the Document means a machine-readable copy,
12877      represented in a format whose specification is available to the
12878      general public, that is suitable for revising the document
12879      straightforwardly with generic text editors or (for images
12880      composed of pixels) generic paint programs or (for drawings) some
12881      widely available drawing editor, and that is suitable for input to
12882      text formatters or for automatic translation to a variety of
12883      formats suitable for input to text formatters.  A copy made in an
12884      otherwise Transparent file format whose markup, or absence of
12885      markup, has been arranged to thwart or discourage subsequent
12886      modification by readers is not Transparent.  An image format is
12887      not Transparent if used for any substantial amount of text.  A
12888      copy that is not "Transparent" is called "Opaque".
12889
12890      Examples of suitable formats for Transparent copies include plain
12891      ASCII without markup, Texinfo input format, LaTeX input format,
12892      SGML or XML using a publicly available DTD, and
12893      standard-conforming simple HTML, PostScript or PDF designed for
12894      human modification.  Examples of transparent image formats include
12895      PNG, XCF and JPG.  Opaque formats include proprietary formats that
12896      can be read and edited only by proprietary word processors, SGML or
12897      XML for which the DTD and/or processing tools are not generally
12898      available, and the machine-generated HTML, PostScript or PDF
12899      produced by some word processors for output purposes only.
12900
12901      The "Title Page" means, for a printed book, the title page itself,
12902      plus such following pages as are needed to hold, legibly, the
12903      material this License requires to appear in the title page.  For
12904      works in formats which do not have any title page as such, "Title
12905      Page" means the text near the most prominent appearance of the
12906      work's title, preceding the beginning of the body of the text.
12907
12908      A section "Entitled XYZ" means a named subunit of the Document
12909      whose title either is precisely XYZ or contains XYZ in parentheses
12910      following text that translates XYZ in another language.  (Here XYZ
12911      stands for a specific section name mentioned below, such as
12912      "Acknowledgements", "Dedications", "Endorsements", or "History".)
12913      To "Preserve the Title" of such a section when you modify the
12914      Document means that it remains a section "Entitled XYZ" according
12915      to this definition.
12916
12917      The Document may include Warranty Disclaimers next to the notice
12918      which states that this License applies to the Document.  These
12919      Warranty Disclaimers are considered to be included by reference in
12920      this License, but only as regards disclaiming warranties: any other
12921      implication that these Warranty Disclaimers may have is void and
12922      has no effect on the meaning of this License.
12923
12924   2. VERBATIM COPYING
12925
12926      You may copy and distribute the Document in any medium, either
12927      commercially or noncommercially, provided that this License, the
12928      copyright notices, and the license notice saying this License
12929      applies to the Document are reproduced in all copies, and that you
12930      add no other conditions whatsoever to those of this License.  You
12931      may not use technical measures to obstruct or control the reading
12932      or further copying of the copies you make or distribute.  However,
12933      you may accept compensation in exchange for copies.  If you
12934      distribute a large enough number of copies you must also follow
12935      the conditions in section 3.
12936
12937      You may also lend copies, under the same conditions stated above,
12938      and you may publicly display copies.
12939
12940   3. COPYING IN QUANTITY
12941
12942      If you publish printed copies (or copies in media that commonly
12943      have printed covers) of the Document, numbering more than 100, and
12944      the Document's license notice requires Cover Texts, you must
12945      enclose the copies in covers that carry, clearly and legibly, all
12946      these Cover Texts: Front-Cover Texts on the front cover, and
12947      Back-Cover Texts on the back cover.  Both covers must also clearly
12948      and legibly identify you as the publisher of these copies.  The
12949      front cover must present the full title with all words of the
12950      title equally prominent and visible.  You may add other material
12951      on the covers in addition.  Copying with changes limited to the
12952      covers, as long as they preserve the title of the Document and
12953      satisfy these conditions, can be treated as verbatim copying in
12954      other respects.
12955
12956      If the required texts for either cover are too voluminous to fit
12957      legibly, you should put the first ones listed (as many as fit
12958      reasonably) on the actual cover, and continue the rest onto
12959      adjacent pages.
12960
12961      If you publish or distribute Opaque copies of the Document
12962      numbering more than 100, you must either include a
12963      machine-readable Transparent copy along with each Opaque copy, or
12964      state in or with each Opaque copy a computer-network location from
12965      which the general network-using public has access to download
12966      using public-standard network protocols a complete Transparent
12967      copy of the Document, free of added material.  If you use the
12968      latter option, you must take reasonably prudent steps, when you
12969      begin distribution of Opaque copies in quantity, to ensure that
12970      this Transparent copy will remain thus accessible at the stated
12971      location until at least one year after the last time you
12972      distribute an Opaque copy (directly or through your agents or
12973      retailers) of that edition to the public.
12974
12975      It is requested, but not required, that you contact the authors of
12976      the Document well before redistributing any large number of
12977      copies, to give them a chance to provide you with an updated
12978      version of the Document.
12979
12980   4. MODIFICATIONS
12981
12982      You may copy and distribute a Modified Version of the Document
12983      under the conditions of sections 2 and 3 above, provided that you
12984      release the Modified Version under precisely this License, with
12985      the Modified Version filling the role of the Document, thus
12986      licensing distribution and modification of the Modified Version to
12987      whoever possesses a copy of it.  In addition, you must do these
12988      things in the Modified Version:
12989
12990        A. Use in the Title Page (and on the covers, if any) a title
12991           distinct from that of the Document, and from those of
12992           previous versions (which should, if there were any, be listed
12993           in the History section of the Document).  You may use the
12994           same title as a previous version if the original publisher of
12995           that version gives permission.
12996
12997        B. List on the Title Page, as authors, one or more persons or
12998           entities responsible for authorship of the modifications in
12999           the Modified Version, together with at least five of the
13000           principal authors of the Document (all of its principal
13001           authors, if it has fewer than five), unless they release you
13002           from this requirement.
13003
13004        C. State on the Title page the name of the publisher of the
13005           Modified Version, as the publisher.
13006
13007        D. Preserve all the copyright notices of the Document.
13008
13009        E. Add an appropriate copyright notice for your modifications
13010           adjacent to the other copyright notices.
13011
13012        F. Include, immediately after the copyright notices, a license
13013           notice giving the public permission to use the Modified
13014           Version under the terms of this License, in the form shown in
13015           the Addendum below.
13016
13017        G. Preserve in that license notice the full lists of Invariant
13018           Sections and required Cover Texts given in the Document's
13019           license notice.
13020
13021        H. Include an unaltered copy of this License.
13022
13023        I. Preserve the section Entitled "History", Preserve its Title,
13024           and add to it an item stating at least the title, year, new
13025           authors, and publisher of the Modified Version as given on
13026           the Title Page.  If there is no section Entitled "History" in
13027           the Document, create one stating the title, year, authors,
13028           and publisher of the Document as given on its Title Page,
13029           then add an item describing the Modified Version as stated in
13030           the previous sentence.
13031
13032        J. Preserve the network location, if any, given in the Document
13033           for public access to a Transparent copy of the Document, and
13034           likewise the network locations given in the Document for
13035           previous versions it was based on.  These may be placed in
13036           the "History" section.  You may omit a network location for a
13037           work that was published at least four years before the
13038           Document itself, or if the original publisher of the version
13039           it refers to gives permission.
13040
13041        K. For any section Entitled "Acknowledgements" or "Dedications",
13042           Preserve the Title of the section, and preserve in the
13043           section all the substance and tone of each of the contributor
13044           acknowledgements and/or dedications given therein.
13045
13046        L. Preserve all the Invariant Sections of the Document,
13047           unaltered in their text and in their titles.  Section numbers
13048           or the equivalent are not considered part of the section
13049           titles.
13050
13051        M. Delete any section Entitled "Endorsements".  Such a section
13052           may not be included in the Modified Version.
13053
13054        N. Do not retitle any existing section to be Entitled
13055           "Endorsements" or to conflict in title with any Invariant
13056           Section.
13057
13058        O. Preserve any Warranty Disclaimers.
13059
13060      If the Modified Version includes new front-matter sections or
13061      appendices that qualify as Secondary Sections and contain no
13062      material copied from the Document, you may at your option
13063      designate some or all of these sections as invariant.  To do this,
13064      add their titles to the list of Invariant Sections in the Modified
13065      Version's license notice.  These titles must be distinct from any
13066      other section titles.
13067
13068      You may add a section Entitled "Endorsements", provided it contains
13069      nothing but endorsements of your Modified Version by various
13070      parties--for example, statements of peer review or that the text
13071      has been approved by an organization as the authoritative
13072      definition of a standard.
13073
13074      You may add a passage of up to five words as a Front-Cover Text,
13075      and a passage of up to 25 words as a Back-Cover Text, to the end
13076      of the list of Cover Texts in the Modified Version.  Only one
13077      passage of Front-Cover Text and one of Back-Cover Text may be
13078      added by (or through arrangements made by) any one entity.  If the
13079      Document already includes a cover text for the same cover,
13080      previously added by you or by arrangement made by the same entity
13081      you are acting on behalf of, you may not add another; but you may
13082      replace the old one, on explicit permission from the previous
13083      publisher that added the old one.
13084
13085      The author(s) and publisher(s) of the Document do not by this
13086      License give permission to use their names for publicity for or to
13087      assert or imply endorsement of any Modified Version.
13088
13089   5. COMBINING DOCUMENTS
13090
13091      You may combine the Document with other documents released under
13092      this License, under the terms defined in section 4 above for
13093      modified versions, provided that you include in the combination
13094      all of the Invariant Sections of all of the original documents,
13095      unmodified, and list them all as Invariant Sections of your
13096      combined work in its license notice, and that you preserve all
13097      their Warranty Disclaimers.
13098
13099      The combined work need only contain one copy of this License, and
13100      multiple identical Invariant Sections may be replaced with a single
13101      copy.  If there are multiple Invariant Sections with the same name
13102      but different contents, make the title of each such section unique
13103      by adding at the end of it, in parentheses, the name of the
13104      original author or publisher of that section if known, or else a
13105      unique number.  Make the same adjustment to the section titles in
13106      the list of Invariant Sections in the license notice of the
13107      combined work.
13108
13109      In the combination, you must combine any sections Entitled
13110      "History" in the various original documents, forming one section
13111      Entitled "History"; likewise combine any sections Entitled
13112      "Acknowledgements", and any sections Entitled "Dedications".  You
13113      must delete all sections Entitled "Endorsements."
13114
13115   6. COLLECTIONS OF DOCUMENTS
13116
13117      You may make a collection consisting of the Document and other
13118      documents released under this License, and replace the individual
13119      copies of this License in the various documents with a single copy
13120      that is included in the collection, provided that you follow the
13121      rules of this License for verbatim copying of each of the
13122      documents in all other respects.
13123
13124      You may extract a single document from such a collection, and
13125      distribute it individually under this License, provided you insert
13126      a copy of this License into the extracted document, and follow
13127      this License in all other respects regarding verbatim copying of
13128      that document.
13129
13130   7. AGGREGATION WITH INDEPENDENT WORKS
13131
13132      A compilation of the Document or its derivatives with other
13133      separate and independent documents or works, in or on a volume of
13134      a storage or distribution medium, is called an "aggregate" if the
13135      copyright resulting from the compilation is not used to limit the
13136      legal rights of the compilation's users beyond what the individual
13137      works permit.  When the Document is included in an aggregate, this
13138      License does not apply to the other works in the aggregate which
13139      are not themselves derivative works of the Document.
13140
13141      If the Cover Text requirement of section 3 is applicable to these
13142      copies of the Document, then if the Document is less than one half
13143      of the entire aggregate, the Document's Cover Texts may be placed
13144      on covers that bracket the Document within the aggregate, or the
13145      electronic equivalent of covers if the Document is in electronic
13146      form.  Otherwise they must appear on printed covers that bracket
13147      the whole aggregate.
13148
13149   8. TRANSLATION
13150
13151      Translation is considered a kind of modification, so you may
13152      distribute translations of the Document under the terms of section
13153      4.  Replacing Invariant Sections with translations requires special
13154      permission from their copyright holders, but you may include
13155      translations of some or all Invariant Sections in addition to the
13156      original versions of these Invariant Sections.  You may include a
13157      translation of this License, and all the license notices in the
13158      Document, and any Warranty Disclaimers, provided that you also
13159      include the original English version of this License and the
13160      original versions of those notices and disclaimers.  In case of a
13161      disagreement between the translation and the original version of
13162      this License or a notice or disclaimer, the original version will
13163      prevail.
13164
13165      If a section in the Document is Entitled "Acknowledgements",
13166      "Dedications", or "History", the requirement (section 4) to
13167      Preserve its Title (section 1) will typically require changing the
13168      actual title.
13169
13170   9. TERMINATION
13171
13172      You may not copy, modify, sublicense, or distribute the Document
13173      except as expressly provided for under this License.  Any other
13174      attempt to copy, modify, sublicense or distribute the Document is
13175      void, and will automatically terminate your rights under this
13176      License.  However, parties who have received copies, or rights,
13177      from you under this License will not have their licenses
13178      terminated so long as such parties remain in full compliance.
13179
13180  10. FUTURE REVISIONS OF THIS LICENSE
13181
13182      The Free Software Foundation may publish new, revised versions of
13183      the GNU Free Documentation License from time to time.  Such new
13184      versions will be similar in spirit to the present version, but may
13185      differ in detail to address new problems or concerns.  See
13186      `http://www.gnu.org/copyleft/'.
13187
13188      Each version of the License is given a distinguishing version
13189      number.  If the Document specifies that a particular numbered
13190      version of this License "or any later version" applies to it, you
13191      have the option of following the terms and conditions either of
13192      that specified version or of any later version that has been
13193      published (not as a draft) by the Free Software Foundation.  If
13194      the Document does not specify a version number of this License,
13195      you may choose any version ever published (not as a draft) by the
13196      Free Software Foundation.
13197
13198 ADDENDUM: How to use this License for your documents
13199 ====================================================
13200
13201 To use this License in a document you have written, include a copy of
13202 the License in the document and put the following copyright and license
13203 notices just after the title page:
13204
13205        Copyright (C)  YEAR  YOUR NAME.
13206        Permission is granted to copy, distribute and/or modify this document
13207        under the terms of the GNU Free Documentation License, Version 1.2
13208        or any later version published by the Free Software Foundation;
13209        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
13210        Texts.  A copy of the license is included in the section entitled ``GNU
13211        Free Documentation License''.
13212
13213    If you have Invariant Sections, Front-Cover Texts and Back-Cover
13214 Texts, replace the "with...Texts." line with this:
13215
13216          with the Invariant Sections being LIST THEIR TITLES, with
13217          the Front-Cover Texts being LIST, and with the Back-Cover Texts
13218          being LIST.
13219
13220    If you have Invariant Sections without Cover Texts, or some other
13221 combination of the three, merge those two alternatives to suit the
13222 situation.
13223
13224    If your document contains nontrivial examples of program code, we
13225 recommend releasing these examples in parallel under your choice of
13226 free software license, such as the GNU General Public License, to
13227 permit their use in free software.
13228
13229 \1f
13230 File: coreutils.info,  Node: Index,  Prev: Copying This Manual,  Up: Top
13231
13232 Index
13233 *****
13234
13235 \0\b[index\0\b]
13236 * Menu:
13237
13238 * !:                                     Connectives for test.
13239                                                               (line   9)
13240 * !=:                                    String tests.        (line  25)
13241 * %:                                     Numeric expressions. (line  15)
13242 * %b:                                    printf invocation.   (line  32)
13243 * &:                                     Relations for expr.  (line  17)
13244 * *:                                     Numeric expressions. (line  15)
13245 * + <1>:                                 Numeric expressions. (line  11)
13246 * +:                                     String expressions.  (line  53)
13247 * +PAGE_RANGE:                           pr invocation.       (line  60)
13248 * - <1>:                                 su invocation.       (line  53)
13249 * - <2>:                                 env invocation.      (line  45)
13250 * -:                                     Numeric expressions. (line  11)
13251 * - and Unix rm:                         rm invocation.       (line 110)
13252 * -, removing files beginning with:      rm invocation.       (line  98)
13253 * --:                                    Common options.      (line  36)
13254 * --across:                              pr invocation.       (line  84)
13255 * --address-radix:                       od invocation.       (line  36)
13256 * --adjustment:                          nice invocation.     (line  44)
13257 * --all <1>:                             uname invocation.    (line  30)
13258 * --all <2>:                             who invocation.      (line  36)
13259 * --all <3>:                             stty invocation.     (line  26)
13260 * --all <4>:                             du invocation.       (line  21)
13261 * --all <5>:                             df invocation.       (line  32)
13262 * --all <6>:                             Which files are listed.
13263                                                               (line  13)
13264 * --all:                                 unexpand invocation. (line  37)
13265 * --all-repeated:                        uniq invocation.     (line  69)
13266 * --almost-all:                          Which files are listed.
13267                                                               (line  17)
13268 * --apparent-size:                       du invocation.       (line  24)
13269 * --append:                              tee invocation.      (line  25)
13270 * --archive:                             cp invocation.       (line  54)
13271 * --author:                              What information is listed.
13272                                                               (line  10)
13273 * --backup <1>:                          ln invocation.       (line  55)
13274 * --backup <2>:                          mv invocation.       (line  50)
13275 * --backup <3>:                          install invocation.  (line  40)
13276 * --backup <4>:                          cp invocation.       (line  61)
13277 * --backup:                              Backup options.      (line  13)
13278 * --before:                              tac invocation.      (line  21)
13279 * --binary:                              md5sum invocation.   (line  38)
13280 * --block-size <1>:                      du invocation.       (line  45)
13281 * --block-size <2>:                      df invocation.       (line  38)
13282 * --block-size:                          Block size.          (line 138)
13283 * --block-size=SIZE:                     Block size.          (line  12)
13284 * --body-numbering:                      nl invocation.       (line  47)
13285 * --boot:                                who invocation.      (line  40)
13286 * --bourne-shell:                        dircolors invocation.
13287                                                               (line  27)
13288 * --buffer-size:                         sort invocation.     (line 237)
13289 * --bytes <1>:                           du invocation.       (line  41)
13290 * --bytes <2>:                           cut invocation.      (line  26)
13291 * --bytes <3>:                           wc invocation.       (line  41)
13292 * --bytes <4>:                           split invocation.    (line  37)
13293 * --bytes <5>:                           tail invocation.     (line  36)
13294 * --bytes <6>:                           head invocation.     (line  24)
13295 * --bytes:                               fold invocation.     (line  23)
13296 * --c-shell:                             dircolors invocation.
13297                                                               (line  33)
13298 * --canonicalize:                        readlink invocation. (line  29)
13299 * --canonicalize-existing:               readlink invocation. (line  35)
13300 * --canonicalize-missing:                readlink invocation. (line  41)
13301 * --changes <1>:                         chmod invocation.    (line  39)
13302 * --changes <2>:                         chgrp invocation.    (line  20)
13303 * --changes:                             chown invocation.    (line  70)
13304 * --characters:                          cut invocation.      (line  34)
13305 * --chars:                               wc invocation.       (line  45)
13306 * --check:                               sort invocation.     (line  18)
13307 * --check-chars:                         uniq invocation.     (line 103)
13308 * --classify:                            General output formatting.
13309                                                               (line  36)
13310 * --color:                               General output formatting.
13311                                                               (line  21)
13312 * --columns:                             pr invocation.       (line  70)
13313 * --command:                             su invocation.       (line  39)
13314 * --complement:                          cut invocation.      (line  71)
13315 * --count <1>:                           who invocation.      (line  55)
13316 * --count:                               uniq invocation.     (line  55)
13317 * --count-links:                         du invocation.       (line  91)
13318 * --crown-margin:                        fmt invocation.      (line  34)
13319 * --csh:                                 dircolors invocation.
13320                                                               (line  33)
13321 * --date <1>:                            Options for date.    (line  11)
13322 * --date:                                touch invocation.    (line  58)
13323 * --dead:                                who invocation.      (line  44)
13324 * --decode:                              base64 invocation.   (line  29)
13325 * --delimiter:                           cut invocation.      (line  51)
13326 * --delimiters:                          paste invocation.    (line  43)
13327 * --dereference <1>:                     stat invocation.     (line  17)
13328 * --dereference <2>:                     du invocation.       (line  96)
13329 * --dereference <3>:                     chgrp invocation.    (line  30)
13330 * --dereference <4>:                     chown invocation.    (line 103)
13331 * --dereference <5>:                     cp invocation.       (line 125)
13332 * --dereference:                         Which files are listed.
13333                                                               (line  83)
13334 * --dereference-args:                    du invocation.       (line  56)
13335 * --dereference-command-line:            Which files are listed.
13336                                                               (line  36)
13337 * --dereference-command-line-symlink-to-dir: Which files are listed.
13338                                                               (line  41)
13339 * --dictionary-order:                    sort invocation.     (line  85)
13340 * --digits:                              csplit invocation.   (line  80)
13341 * --directory <1>:                       ln invocation.       (line  61)
13342 * --directory <2>:                       install invocation.  (line  48)
13343 * --directory:                           Which files are listed.
13344                                                               (line  28)
13345 * --dired:                               What information is listed.
13346                                                               (line  16)
13347 * --double-space:                        pr invocation.       (line  96)
13348 * --echo:                                shuf invocation.     (line  19)
13349 * --elide-empty-files:                   csplit invocation.   (line  89)
13350 * --escape:                              Formatting the file names.
13351                                                               (line  11)
13352 * --exact:                               shred invocation.    (line 133)
13353 * --exclude-from=FILE:                   du invocation.       (line 201)
13354 * --exclude-type:                        df invocation.       (line 138)
13355 * --exclude=PATTERN:                     du invocation.       (line 195)
13356 * --expand-tabs:                         pr invocation.       (line 120)
13357 * --fast:                                su invocation.       (line  44)
13358 * --field-separator:                     sort invocation.     (line 253)
13359 * --fields:                              cut invocation.      (line  44)
13360 * --file <1>:                            Options for date.    (line  22)
13361 * --file:                                stty invocation.     (line  31)
13362 * --file-system:                         stat invocation.     (line  23)
13363 * --file-type:                           General output formatting.
13364                                                               (line  47)
13365 * --files0-from=FILE <1>:                du invocation.       (line  62)
13366 * --files0-from=FILE:                    wc invocation.       (line  60)
13367 * --first-line-number:                   pr invocation.       (line 198)
13368 * --follow:                              tail invocation.     (line  41)
13369 * --footer-numbering:                    nl invocation.       (line  75)
13370 * --force <1>:                           ln invocation.       (line  67)
13371 * --force <2>:                           shred invocation.    (line 101)
13372 * --force <3>:                           rm invocation.       (line  35)
13373 * --force <4>:                           mv invocation.       (line  55)
13374 * --force:                               cp invocation.       (line  96)
13375 * --form-feed:                           pr invocation.       (line 128)
13376 * --format <1>:                          General output formatting.
13377                                                               (line  10)
13378 * --format <2>:                          What information is listed.
13379                                                               (line 130)
13380 * --format:                              od invocation.       (line  76)
13381 * --format=FORMAT <1>:                   seq invocation.      (line  24)
13382 * --format=FORMAT:                       stat invocation.     (line  28)
13383 * --from:                                chown invocation.    (line  80)
13384 * --full-time:                           What information is listed.
13385                                                               (line 100)
13386 * --general-numeric-sort:                sort invocation.     (line  98)
13387 * --group <1>:                           id invocation.       (line  23)
13388 * --group:                               install invocation.  (line  54)
13389 * --group-directories-first:             Which files are listed.
13390                                                               (line  50)
13391 * --groups:                              id invocation.       (line  27)
13392 * --hardware-platform:                   uname invocation.    (line  35)
13393 * --head-lines:                          shuf invocation.     (line  32)
13394 * --header:                              pr invocation.       (line 134)
13395 * --header-numbering:                    nl invocation.       (line  79)
13396 * --heading:                             who invocation.      (line  48)
13397 * --help:                                Common options.      (line  29)
13398 * --hide-control-chars:                  Formatting the file names.
13399                                                               (line  23)
13400 * --hide=PATTERN:                        Which files are listed.
13401                                                               (line  56)
13402 * --human-readable <1>:                  du invocation.       (line  75)
13403 * --human-readable <2>:                  df invocation.       (line  43)
13404 * --human-readable <3>:                  What information is listed.
13405                                                               (line 116)
13406 * --human-readable:                      Block size.          (line 138)
13407 * --ignore-backups:                      Which files are listed.
13408                                                               (line  23)
13409 * --ignore-case <1>:                     join invocation.     (line  69)
13410 * --ignore-case <2>:                     uniq invocation.     (line  59)
13411 * --ignore-case:                         sort invocation.     (line  92)
13412 * --ignore-environment:                  env invocation.      (line  45)
13413 * --ignore-fail-on-non-empty:            rmdir invocation.    (line  17)
13414 * --ignore-garbage:                      base64 invocation.   (line  35)
13415 * --ignore-interrupts:                   tee invocation.      (line  30)
13416 * --ignore-leading-blanks:               sort invocation.     (line  79)
13417 * --ignore-nonprinting:                  sort invocation.     (line 125)
13418 * --ignore=PATTERN:                      Which files are listed.
13419                                                               (line  69)
13420 * --indent:                              pr invocation.       (line 204)
13421 * --indicator-style:                     General output formatting.
13422                                                               (line  36)
13423 * --initial:                             expand invocation.   (line  34)
13424 * --inode:                               What information is listed.
13425                                                               (line 122)
13426 * --inodes:                              df invocation.       (line  52)
13427 * --input-range:                         shuf invocation.     (line  23)
13428 * --interactive <1>:                     ln invocation.       (line  71)
13429 * --interactive <2>:                     rm invocation.       (line  50)
13430 * --interactive <3>:                     mv invocation.       (line  59)
13431 * --interactive:                         cp invocation.       (line 116)
13432 * --iterations=NUMBER:                   shred invocation.    (line 106)
13433 * --join-blank-lines:                    nl invocation.       (line  87)
13434 * --join-lines:                          pr invocation.       (line 147)
13435 * --keep-files:                          csplit invocation.   (line  85)
13436 * --kernel-name:                         uname invocation.    (line  65)
13437 * --kernel-release:                      uname invocation.    (line  61)
13438 * --kernel-version:                      uname invocation.    (line  76)
13439 * --key:                                 sort invocation.     (line 193)
13440 * --length:                              pr invocation.       (line 156)
13441 * --line-bytes:                          split invocation.    (line  43)
13442 * --lines <1>:                           wc invocation.       (line  53)
13443 * --lines <2>:                           split invocation.    (line  30)
13444 * --lines <3>:                           tail invocation.     (line 130)
13445 * --lines:                               head invocation.     (line  30)
13446 * --link:                                cp invocation.       (line 121)
13447 * --literal:                             Formatting the file names.
13448                                                               (line  17)
13449 * --local:                               df invocation.       (line  63)
13450 * --login <1>:                           su invocation.       (line  53)
13451 * --login:                               who invocation.      (line  68)
13452 * --lookup:                              who invocation.      (line  73)
13453 * --machine:                             uname invocation.    (line  41)
13454 * --max-depth=DEPTH:                     du invocation.       (line 111)
13455 * --max-line-length:                     wc invocation.       (line  57)
13456 * --max-unchanged-stats:                 tail invocation.     (line 118)
13457 * --merge <1>:                           sort invocation.     (line  32)
13458 * --merge:                               pr invocation.       (line 164)
13459 * --mesg:                                who invocation.      (line  86)
13460 * --message:                             who invocation.      (line  86)
13461 * --mode <1>:                            mknod invocation.    (line  43)
13462 * --mode <2>:                            mkfifo invocation.   (line  21)
13463 * --mode <3>:                            mkdir invocation.    (line  19)
13464 * --mode:                                install invocation.  (line  60)
13465 * --month-sort:                          sort invocation.     (line 131)
13466 * --name:                                id invocation.       (line  31)
13467 * --no-create:                           touch invocation.    (line  54)
13468 * --no-dereference <1>:                  du invocation.       (line 107)
13469 * --no-dereference <2>:                  chgrp invocation.    (line  35)
13470 * --no-dereference <3>:                  chown invocation.    (line 108)
13471 * --no-dereference <4>:                  ln invocation.       (line  75)
13472 * --no-dereference:                      cp invocation.       (line 129)
13473 * --no-file-warnings:                    pr invocation.       (line 211)
13474 * --no-group:                            What information is listed.
13475                                                               (line 110)
13476 * --no-newline:                          readlink invocation. (line  46)
13477 * --no-preserve-root <1>:                chmod invocation.    (line  54)
13478 * --no-preserve-root <2>:                chgrp invocation.    (line  48)
13479 * --no-preserve-root <3>:                chown invocation.    (line 121)
13480 * --no-preserve-root:                    rm invocation.       (line  84)
13481 * --no-renumber:                         nl invocation.       (line 108)
13482 * --no-sync:                             df invocation.       (line  67)
13483 * --no-target-directory <1>:             ln invocation.       (line 109)
13484 * --no-target-directory <2>:             mv invocation.       (line 103)
13485 * --no-target-directory <3>:             install invocation.  (line 101)
13486 * --no-target-directory <4>:             cp invocation.       (line 272)
13487 * --no-target-directory:                 Target directory.    (line  15)
13488 * --nodename:                            uname invocation.    (line  46)
13489 * --null:                                du invocation.       (line 117)
13490 * --number:                              cat invocation.      (line  31)
13491 * --number-format:                       nl invocation.       (line  95)
13492 * --number-lines:                        pr invocation.       (line 177)
13493 * --number-nonblank:                     cat invocation.      (line  20)
13494 * --number-separator:                    nl invocation.       (line 112)
13495 * --number-width:                        nl invocation.       (line 122)
13496 * --numeric-sort:                        sort invocation.     (line 140)
13497 * --numeric-suffixes:                    split invocation.    (line  51)
13498 * --numeric-uid-gid:                     What information is listed.
13499                                                               (line 232)
13500 * --omit-header:                         pr invocation.       (line 235)
13501 * --omit-pagination:                     pr invocation.       (line 246)
13502 * --one-file-system <1>:                 du invocation.       (line 191)
13503 * --one-file-system <2>:                 rm invocation.       (line  63)
13504 * --one-file-system:                     cp invocation.       (line 291)
13505 * --only-delimited:                      cut invocation.      (line  59)
13506 * --operating-system:                    uname invocation.    (line  57)
13507 * --output <1>:                          shuf invocation.     (line  37)
13508 * --output:                              sort invocation.     (line 213)
13509 * --output-delimiter:                    cut invocation.      (line  64)
13510 * --output-duplicates:                   od invocation.       (line 146)
13511 * --output-tabs:                         pr invocation.       (line 140)
13512 * --owner:                               install invocation.  (line  72)
13513 * --page-increment:                      nl invocation.       (line  83)
13514 * --page_width:                          pr invocation.       (line 264)
13515 * --pages=PAGE_RANGE:                    pr invocation.       (line  60)
13516 * --parents <1>:                         rmdir invocation.    (line  22)
13517 * --parents <2>:                         mkdir invocation.    (line  34)
13518 * --parents:                             cp invocation.       (line 177)
13519 * --pid:                                 tail invocation.     (line  98)
13520 * --portability <1>:                     pathchk invocation.  (line  46)
13521 * --portability:                         df invocation.       (line  74)
13522 * --prefix:                              csplit invocation.   (line  62)
13523 * --preserve:                            cp invocation.       (line 134)
13524 * --preserve-environment:                su invocation.       (line  64)
13525 * --preserve-root <1>:                   chmod invocation.    (line  49)
13526 * --preserve-root <2>:                   chgrp invocation.    (line  43)
13527 * --preserve-root <3>:                   chown invocation.    (line 116)
13528 * --preserve-root:                       rm invocation.       (line  79)
13529 * --preserve-timestamps:                 install invocation.  (line  78)
13530 * --print-database:                      dircolors invocation.
13531                                                               (line  38)
13532 * --print-type:                          df invocation.       (line 113)
13533 * --printf=FORMAT:                       stat invocation.     (line  37)
13534 * --processor:                           uname invocation.    (line  50)
13535 * --quiet <1>:                           tty invocation.      (line  18)
13536 * --quiet <2>:                           chmod invocation.    (line  45)
13537 * --quiet <3>:                           chgrp invocation.    (line  26)
13538 * --quiet <4>:                           chown invocation.    (line  76)
13539 * --quiet <5>:                           readlink invocation. (line  52)
13540 * --quiet <6>:                           csplit invocation.   (line 100)
13541 * --quiet <7>:                           tail invocation.     (line 135)
13542 * --quiet:                               head invocation.     (line  36)
13543 * --quote-name:                          Formatting the file names.
13544                                                               (line  30)
13545 * --quoting-style:                       Formatting the file names.
13546                                                               (line  11)
13547 * --random-sort:                         sort invocation.     (line 162)
13548 * --random-source <1>:                   shred invocation.    (line 112)
13549 * --random-source <2>:                   shuf invocation.     (line  43)
13550 * --random-source:                       sort invocation.     (line 226)
13551 * --read-bytes:                          od invocation.       (line  63)
13552 * --real:                                id invocation.       (line  36)
13553 * --recursive <1>:                       chmod invocation.    (line  69)
13554 * --recursive <2>:                       chgrp invocation.    (line  66)
13555 * --recursive <3>:                       chown invocation.    (line 140)
13556 * --recursive <4>:                       rm invocation.       (line  91)
13557 * --recursive <5>:                       cp invocation.       (line 200)
13558 * --recursive:                           Which files are listed.
13559                                                               (line  90)
13560 * --reference <1>:                       Options for date.    (line  30)
13561 * --reference <2>:                       touch invocation.    (line  77)
13562 * --reference <3>:                       chmod invocation.    (line  62)
13563 * --reference <4>:                       chgrp invocation.    (line  52)
13564 * --reference:                           chown invocation.    (line 125)
13565 * --regex:                               tac invocation.      (line  26)
13566 * --remove:                              shred invocation.    (line 123)
13567 * --remove-destination:                  cp invocation.       (line 212)
13568 * --repeated:                            uniq invocation.     (line  63)
13569 * --reply <1>:                           mv invocation.       (line  64)
13570 * --reply:                               cp invocation.       (line 188)
13571 * --retry:                               tail invocation.     (line  84)
13572 * --reverse <1>:                         Sorting the output.  (line  27)
13573 * --reverse:                             sort invocation.     (line 157)
13574 * --rfc-2822:                            Options for date.    (line  36)
13575 * --rfc-3339=TIMESPEC:                   Options for date.    (line  48)
13576 * --rfc-822:                             Options for date.    (line  36)
13577 * --save:                                stty invocation.     (line  41)
13578 * --section-delimiter:                   nl invocation.       (line  68)
13579 * --sep-string:                          pr invocation.       (line 225)
13580 * --separate-dirs:                       du invocation.       (line 134)
13581 * --separator <1>:                       pr invocation.       (line 216)
13582 * --separator:                           tac invocation.      (line  33)
13583 * --serial:                              paste invocation.    (line  34)
13584 * --set:                                 Options for date.    (line  78)
13585 * --sh:                                  dircolors invocation.
13586                                                               (line  27)
13587 * --shell:                               su invocation.       (line  75)
13588 * --show-all:                            cat invocation.      (line  16)
13589 * --show-control-chars <1>:              Formatting the file names.
13590                                                               (line  78)
13591 * --show-control-chars:                  pr invocation.       (line  90)
13592 * --show-ends:                           cat invocation.      (line  27)
13593 * --show-nonprinting <1>:                pr invocation.       (line 251)
13594 * --show-nonprinting:                    cat invocation.      (line  49)
13595 * --show-tabs:                           cat invocation.      (line  42)
13596 * --si <1>:                              du invocation.       (line 123)
13597 * --si <2>:                              df invocation.       (line  93)
13598 * --si <3>:                              What information is listed.
13599                                                               (line 258)
13600 * --si:                                  Block size.          (line 138)
13601 * --silent <1>:                          tty invocation.      (line  18)
13602 * --silent <2>:                          chmod invocation.    (line  45)
13603 * --silent <3>:                          chgrp invocation.    (line  26)
13604 * --silent <4>:                          chown invocation.    (line  76)
13605 * --silent <5>:                          readlink invocation. (line  52)
13606 * --silent <6>:                          csplit invocation.   (line 100)
13607 * --silent <7>:                          tail invocation.     (line 135)
13608 * --silent:                              head invocation.     (line  36)
13609 * --size:                                What information is listed.
13610                                                               (line 242)
13611 * --size=BYTES:                          shred invocation.    (line 117)
13612 * --skip-bytes:                          od invocation.       (line  55)
13613 * --skip-chars:                          uniq invocation.     (line  41)
13614 * --skip-fields:                         uniq invocation.     (line  31)
13615 * --sleep-interval:                      tail invocation.     (line  90)
13616 * --sort:                                Sorting the output.  (line  32)
13617 * --spaces:                              fold invocation.     (line  29)
13618 * --sparse=WHEN:                         cp invocation.       (line 216)
13619 * --split-only:                          fmt invocation.      (line  47)
13620 * --squeeze-blank:                       cat invocation.      (line  35)
13621 * --stable:                              sort invocation.     (line 231)
13622 * --starting-line-number:                nl invocation.       (line 117)
13623 * --status:                              md5sum invocation.   (line  69)
13624 * --strings:                             od invocation.       (line  68)
13625 * --strip:                               install invocation.  (line  88)
13626 * --strip-trailing-slashes <1>:          mv invocation.       (line  89)
13627 * --strip-trailing-slashes:              cp invocation.       (line 250)
13628 * --suffix <1>:                          ln invocation.       (line 100)
13629 * --suffix <2>:                          mv invocation.       (line  94)
13630 * --suffix <3>:                          install invocation.  (line  92)
13631 * --suffix <4>:                          cp invocation.       (line 263)
13632 * --suffix <5>:                          csplit invocation.   (line  66)
13633 * --suffix:                              Backup options.      (line  50)
13634 * --suffix-length:                       split invocation.    (line  26)
13635 * --summarize:                           du invocation.       (line 130)
13636 * --symbolic:                            ln invocation.       (line  94)
13637 * --symbolic-link:                       cp invocation.       (line 255)
13638 * --sync:                                df invocation.       (line 100)
13639 * --sysv:                                sum invocation.      (line  31)
13640 * --tabs <1>:                            unexpand invocation. (line  24)
13641 * --tabs:                                expand invocation.   (line  22)
13642 * --tabsize:                             General output formatting.
13643                                                               (line  92)
13644 * --tagged-paragraph:                    fmt invocation.      (line  40)
13645 * --target-directory <1>:                ln invocation.       (line 105)
13646 * --target-directory <2>:                mv invocation.       (line  99)
13647 * --target-directory <3>:                install invocation.  (line  97)
13648 * --target-directory <4>:                cp invocation.       (line 268)
13649 * --target-directory:                    Target directory.    (line  31)
13650 * --temporary-directory:                 sort invocation.     (line 273)
13651 * --terse:                               stat invocation.     (line  48)
13652 * --text:                                md5sum invocation.   (line  79)
13653 * --time <1>:                            du invocation.       (line 138)
13654 * --time <2>:                            touch invocation.    (line  50)
13655 * --time:                                Sorting the output.  (line  13)
13656 * --time-style <1>:                      du invocation.       (line 153)
13657 * --time-style:                          Formatting file timestamps.
13658                                                               (line  26)
13659 * --total:                               du invocation.       (line  50)
13660 * --traditional:                         od invocation.       (line 197)
13661 * --type:                                df invocation.       (line 107)
13662 * --uniform-spacing:                     fmt invocation.      (line  53)
13663 * --unique <1>:                          uniq invocation.     (line  98)
13664 * --unique:                              sort invocation.     (line 282)
13665 * --universal:                           Options for date.    (line  83)
13666 * --unset:                               env invocation.      (line  39)
13667 * --update <1>:                          mv invocation.       (line  76)
13668 * --update:                              cp invocation.       (line 277)
13669 * --user:                                id invocation.       (line  41)
13670 * --utc:                                 Options for date.    (line  83)
13671 * --verbose <1>:                         chmod invocation.    (line  59)
13672 * --verbose <2>:                         chgrp invocation.    (line  58)
13673 * --verbose <3>:                         chown invocation.    (line 132)
13674 * --verbose <4>:                         rmdir invocation.    (line  31)
13675 * --verbose <5>:                         readlink invocation. (line  56)
13676 * --verbose <6>:                         mkdir invocation.    (line  51)
13677 * --verbose <7>:                         ln invocation.       (line 114)
13678 * --verbose <8>:                         shred invocation.    (line 129)
13679 * --verbose <9>:                         rm invocation.       (line  95)
13680 * --verbose <10>:                        mv invocation.       (line  86)
13681 * --verbose <11>:                        install invocation.  (line 106)
13682 * --verbose <12>:                        cp invocation.       (line 287)
13683 * --verbose <13>:                        split invocation.    (line  54)
13684 * --verbose <14>:                        tail invocation.     (line 139)
13685 * --verbose:                             head invocation.     (line  40)
13686 * --version:                             Common options.      (line  33)
13687 * --warn:                                md5sum invocation.   (line  88)
13688 * --width <1>:                           General output formatting.
13689                                                               (line 104)
13690 * --width <2>:                           fold invocation.     (line  35)
13691 * --width <3>:                           pr invocation.       (line 255)
13692 * --width <4>:                           fmt invocation.      (line  59)
13693 * --width:                               od invocation.       (line 153)
13694 * --words:                               wc invocation.       (line  49)
13695 * --wrap:                                base64 invocation.   (line  21)
13696 * --writable:                            who invocation.      (line  86)
13697 * --zero:                                shred invocation.    (line 143)
13698 * --zero-terminated <1>:                 shuf invocation.     (line  48)
13699 * --zero-terminated:                     sort invocation.     (line 296)
13700 * -0:                                    du invocation.       (line 116)
13701 * -1 <1>:                                General output formatting.
13702                                                               (line  10)
13703 * -1 <2>:                                join invocation.     (line  74)
13704 * -1:                                    comm invocation.     (line  23)
13705 * -2 <1>:                                join invocation.     (line  77)
13706 * -2:                                    comm invocation.     (line  23)
13707 * -3:                                    comm invocation.     (line  23)
13708 * -a <1>:                                uname invocation.    (line  30)
13709 * -a <2>:                                who invocation.      (line  36)
13710 * -a <3>:                                stty invocation.     (line  26)
13711 * -a <4>:                                tee invocation.      (line  25)
13712 * -a <5>:                                Connectives for test.
13713                                                               (line  12)
13714 * -a <6>:                                du invocation.       (line  21)
13715 * -a <7>:                                df invocation.       (line  32)
13716 * -a <8>:                                touch invocation.    (line  50)
13717 * -a:                                    cp invocation.       (line  54)
13718 * -A:                                    Which files are listed.
13719                                                               (line  17)
13720 * -a <1>:                                Which files are listed.
13721                                                               (line  13)
13722 * -a <2>:                                unexpand invocation. (line  37)
13723 * -a <3>:                                join invocation.     (line  60)
13724 * -a <4>:                                split invocation.    (line  26)
13725 * -a <5>:                                pr invocation.       (line  84)
13726 * -a:                                    od invocation.       (line 166)
13727 * -A <1>:                                od invocation.       (line  36)
13728 * -A:                                    cat invocation.      (line  16)
13729 * -b <1>:                                who invocation.      (line  40)
13730 * -b:                                    File type tests.     (line  10)
13731 * -B:                                    du invocation.       (line  45)
13732 * -b:                                    du invocation.       (line  41)
13733 * -B:                                    df invocation.       (line  38)
13734 * -b <1>:                                ln invocation.       (line  55)
13735 * -b <2>:                                mv invocation.       (line  50)
13736 * -b <3>:                                install invocation.  (line  40)
13737 * -b <4>:                                cp invocation.       (line  61)
13738 * -b <5>:                                dircolors invocation.
13739                                                               (line  27)
13740 * -b:                                    Formatting the file names.
13741                                                               (line  11)
13742 * -B:                                    Which files are listed.
13743                                                               (line  23)
13744 * -b <1>:                                cut invocation.      (line  26)
13745 * -b <2>:                                sort invocation.     (line  79)
13746 * -b <3>:                                md5sum invocation.   (line  38)
13747 * -b <4>:                                csplit invocation.   (line  66)
13748 * -b <5>:                                split invocation.    (line  37)
13749 * -b <6>:                                fold invocation.     (line  23)
13750 * -b <7>:                                od invocation.       (line 169)
13751 * -b <8>:                                nl invocation.       (line  47)
13752 * -b <9>:                                tac invocation.      (line  21)
13753 * -b <10>:                               cat invocation.      (line  20)
13754 * -b:                                    Backup options.      (line  13)
13755 * -c <1>:                                su invocation.       (line  39)
13756 * -c <2>:                                File type tests.     (line  13)
13757 * -c <3>:                                stat invocation.     (line  28)
13758 * -c <4>:                                du invocation.       (line  50)
13759 * -c <5>:                                touch invocation.    (line  54)
13760 * -c <6>:                                chmod invocation.    (line  39)
13761 * -c <7>:                                chgrp invocation.    (line  20)
13762 * -c <8>:                                chown invocation.    (line  70)
13763 * -c <9>:                                install invocation.  (line  44)
13764 * -c:                                    dircolors invocation.
13765                                                               (line  33)
13766 * -C:                                    General output formatting.
13767                                                               (line  15)
13768 * -c <1>:                                Sorting the output.  (line  13)
13769 * -c <2>:                                cut invocation.      (line  34)
13770 * -c <3>:                                uniq invocation.     (line  55)
13771 * -c <4>:                                shuf invocation.     (line  19)
13772 * -c <5>:                                sort invocation.     (line  18)
13773 * -c:                                    wc invocation.       (line  41)
13774 * -C:                                    split invocation.    (line  43)
13775 * -c <1>:                                tail invocation.     (line  36)
13776 * -c <2>:                                head invocation.     (line  24)
13777 * -c <3>:                                pr invocation.       (line  90)
13778 * -c <4>:                                fmt invocation.      (line  34)
13779 * -c:                                    od invocation.       (line 172)
13780 * -COLUMN:                               pr invocation.       (line  70)
13781 * -d <1>:                                Options for date.    (line  11)
13782 * -d <2>:                                who invocation.      (line  44)
13783 * -d:                                    File type tests.     (line  16)
13784 * -D:                                    du invocation.       (line  56)
13785 * -d <1>:                                touch invocation.    (line  58)
13786 * -d <2>:                                ln invocation.       (line  61)
13787 * -d <3>:                                install invocation.  (line  48)
13788 * -d:                                    cp invocation.       (line  89)
13789 * -D:                                    What information is listed.
13790                                                               (line  16)
13791 * -d <1>:                                Which files are listed.
13792                                                               (line  28)
13793 * -d <2>:                                paste invocation.    (line  43)
13794 * -d:                                    cut invocation.      (line  51)
13795 * -D:                                    uniq invocation.     (line  69)
13796 * -d <1>:                                uniq invocation.     (line  63)
13797 * -d <2>:                                sort invocation.     (line  85)
13798 * -d <3>:                                split invocation.    (line  51)
13799 * -d <4>:                                pr invocation.       (line  96)
13800 * -d <5>:                                base64 invocation.   (line  29)
13801 * -d <6>:                                od invocation.       (line 176)
13802 * -d:                                    nl invocation.       (line  68)
13803 * -e:                                    File characteristic tests.
13804                                                               (line   9)
13805 * -E:                                    echo invocation.     (line  63)
13806 * -e <1>:                                echo invocation.     (line  20)
13807 * -e <2>:                                readlink invocation. (line  35)
13808 * -e <3>:                                join invocation.     (line  64)
13809 * -e:                                    pr invocation.       (line 120)
13810 * -E:                                    cat invocation.      (line  27)
13811 * -e:                                    cat invocation.      (line  23)
13812 * -ef:                                   File characteristic tests.
13813                                                               (line  23)
13814 * -eq:                                   Numeric tests.       (line  16)
13815 * -f <1>:                                su invocation.       (line  44)
13816 * -f:                                    Options for date.    (line  22)
13817 * -F:                                    stty invocation.     (line  31)
13818 * -f <1>:                                File type tests.     (line  19)
13819 * -f <2>:                                stat invocation.     (line  23)
13820 * -f <3>:                                touch invocation.    (line  68)
13821 * -f <4>:                                chmod invocation.    (line  45)
13822 * -f <5>:                                chgrp invocation.    (line  26)
13823 * -f <6>:                                chown invocation.    (line  76)
13824 * -f <7>:                                readlink invocation. (line  29)
13825 * -f:                                    ln invocation.       (line  67)
13826 * -F:                                    ln invocation.       (line  61)
13827 * -f <1>:                                shred invocation.    (line 101)
13828 * -f <2>:                                rm invocation.       (line  35)
13829 * -f <3>:                                mv invocation.       (line  55)
13830 * -f:                                    cp invocation.       (line  96)
13831 * -F:                                    General output formatting.
13832                                                               (line  36)
13833 * -f <1>:                                Sorting the output.  (line  20)
13834 * -f <2>:                                cut invocation.      (line  44)
13835 * -f <3>:                                uniq invocation.     (line  31)
13836 * -f <4>:                                sort invocation.     (line  92)
13837 * -f:                                    csplit invocation.   (line  62)
13838 * -F:                                    tail invocation.     (line  79)
13839 * -f <1>:                                tail invocation.     (line  41)
13840 * -f:                                    pr invocation.       (line 128)
13841 * -F:                                    pr invocation.       (line 128)
13842 * -f <1>:                                od invocation.       (line 179)
13843 * -f:                                    nl invocation.       (line  75)
13844 * -f FORMAT:                             seq invocation.      (line  24)
13845 * -G:                                    id invocation.       (line  27)
13846 * -g <1>:                                id invocation.       (line  23)
13847 * -g:                                    stty invocation.     (line  41)
13848 * -G:                                    Access permission tests.
13849                                                               (line  31)
13850 * -g <1>:                                Access permission tests.
13851                                                               (line   9)
13852 * -g:                                    install invocation.  (line  54)
13853 * -G:                                    What information is listed.
13854                                                               (line 110)
13855 * -g <1>:                                What information is listed.
13856                                                               (line 105)
13857 * -g:                                    sort invocation.     (line  98)
13858 * -ge:                                   Numeric tests.       (line  16)
13859 * -gt:                                   Numeric tests.       (line  16)
13860 * -H:                                    who invocation.      (line  48)
13861 * -h:                                    File type tests.     (line  23)
13862 * -H:                                    du invocation.       (line  80)
13863 * -h:                                    du invocation.       (line  75)
13864 * -H:                                    df invocation.       (line  48)
13865 * -h:                                    df invocation.       (line  43)
13866 * -H:                                    chgrp invocation.    (line  70)
13867 * -h:                                    chgrp invocation.    (line  35)
13868 * -H:                                    chown invocation.    (line 143)
13869 * -h:                                    chown invocation.    (line 108)
13870 * -H:                                    cp invocation.       (line 109)
13871 * -h:                                    What information is listed.
13872                                                               (line 116)
13873 * -H:                                    Which files are listed.
13874                                                               (line  36)
13875 * -h <1>:                                pr invocation.       (line 134)
13876 * -h:                                    nl invocation.       (line  79)
13877 * -H:                                    Traversing symlinks. (line  18)
13878 * -h:                                    Block size.          (line 138)
13879 * -i <1>:                                env invocation.      (line  45)
13880 * -i <2>:                                uname invocation.    (line  35)
13881 * -i <3>:                                tee invocation.      (line  30)
13882 * -i <4>:                                df invocation.       (line  52)
13883 * -i:                                    ln invocation.       (line  71)
13884 * -I:                                    rm invocation.       (line  44)
13885 * -i <1>:                                rm invocation.       (line  39)
13886 * -i <2>:                                mv invocation.       (line  59)
13887 * -i <3>:                                cp invocation.       (line 116)
13888 * -i:                                    What information is listed.
13889                                                               (line 122)
13890 * -I:                                    Which files are listed.
13891                                                               (line  69)
13892 * -i <1>:                                expand invocation.   (line  34)
13893 * -i <2>:                                join invocation.     (line  69)
13894 * -i <3>:                                uniq invocation.     (line  59)
13895 * -i <4>:                                shuf invocation.     (line  23)
13896 * -i <5>:                                sort invocation.     (line 125)
13897 * -i <6>:                                pr invocation.       (line 140)
13898 * -i <7>:                                base64 invocation.   (line  35)
13899 * -i <8>:                                od invocation.       (line 182)
13900 * -i:                                    nl invocation.       (line  83)
13901 * -J:                                    pr invocation.       (line 147)
13902 * -j:                                    od invocation.       (line  55)
13903 * -k <1>:                                Access permission tests.
13904                                                               (line  12)
13905 * -k <2>:                                du invocation.       (line  85)
13906 * -k <3>:                                df invocation.       (line  57)
13907 * -k <4>:                                General output formatting.
13908                                                               (line  72)
13909 * -k <5>:                                sort invocation.     (line 193)
13910 * -k <6>:                                csplit invocation.   (line  85)
13911 * -k:                                    Block size.          (line 138)
13912 * -l <1>:                                su invocation.       (line  53)
13913 * -l:                                    who invocation.      (line  68)
13914 * -L <1>:                                File type tests.     (line  23)
13915 * -L <2>:                                stat invocation.     (line  17)
13916 * -L:                                    du invocation.       (line  96)
13917 * -l <1>:                                du invocation.       (line  91)
13918 * -l:                                    df invocation.       (line  63)
13919 * -L <1>:                                chgrp invocation.    (line  75)
13920 * -L <2>:                                chown invocation.    (line 148)
13921 * -L:                                    cp invocation.       (line 125)
13922 * -l <1>:                                cp invocation.       (line 121)
13923 * -l:                                    What information is listed.
13924                                                               (line 130)
13925 * -L <1>:                                Which files are listed.
13926                                                               (line  83)
13927 * -L:                                    wc invocation.       (line  57)
13928 * -l <1>:                                wc invocation.       (line  53)
13929 * -l <2>:                                split invocation.    (line  30)
13930 * -l <3>:                                pr invocation.       (line 156)
13931 * -l <4>:                                od invocation.       (line 185)
13932 * -l:                                    nl invocation.       (line  87)
13933 * -L:                                    Traversing symlinks. (line  22)
13934 * -le:                                   Numeric tests.       (line  16)
13935 * -lt:                                   Numeric tests.       (line  16)
13936 * -m <1>:                                su invocation.       (line  64)
13937 * -m <2>:                                uname invocation.    (line  41)
13938 * -m <3>:                                who invocation.      (line  51)
13939 * -m <4>:                                du invocation.       (line 101)
13940 * -m <5>:                                touch invocation.    (line  73)
13941 * -m <6>:                                readlink invocation. (line  41)
13942 * -m <7>:                                mknod invocation.    (line  43)
13943 * -m <8>:                                mkfifo invocation.   (line  21)
13944 * -m <9>:                                mkdir invocation.    (line  19)
13945 * -m <10>:                               install invocation.  (line  60)
13946 * -m:                                    General output formatting.
13947                                                               (line  78)
13948 * -M:                                    sort invocation.     (line 131)
13949 * -m <1>:                                sort invocation.     (line  32)
13950 * -m <2>:                                wc invocation.       (line  45)
13951 * -m:                                    pr invocation.       (line 164)
13952 * -n <1>:                                nice invocation.     (line  44)
13953 * -n <2>:                                uname invocation.    (line  46)
13954 * -n <3>:                                id invocation.       (line  31)
13955 * -n <4>:                                String tests.        (line  19)
13956 * -n <5>:                                echo invocation.     (line  17)
13957 * -n <6>:                                readlink invocation. (line  46)
13958 * -n:                                    ln invocation.       (line  75)
13959 * -N:                                    Formatting the file names.
13960                                                               (line  17)
13961 * -n <1>:                                What information is listed.
13962                                                               (line 232)
13963 * -n <2>:                                cut invocation.      (line  55)
13964 * -n <3>:                                shuf invocation.     (line  32)
13965 * -n <4>:                                sort invocation.     (line 140)
13966 * -n <5>:                                csplit invocation.   (line  80)
13967 * -n <6>:                                tail invocation.     (line 130)
13968 * -n:                                    head invocation.     (line  30)
13969 * -N:                                    pr invocation.       (line 198)
13970 * -n:                                    pr invocation.       (line 177)
13971 * -N:                                    od invocation.       (line  63)
13972 * -n <1>:                                nl invocation.       (line  95)
13973 * -n:                                    cat invocation.      (line  31)
13974 * -n NUMBER:                             shred invocation.    (line 106)
13975 * -ne:                                   Numeric tests.       (line  16)
13976 * -nt:                                   File characteristic tests.
13977                                                               (line  15)
13978 * -o <1>:                                uname invocation.    (line  57)
13979 * -o:                                    Connectives for test.
13980                                                               (line  15)
13981 * -O:                                    Access permission tests.
13982                                                               (line  28)
13983 * -o <1>:                                install invocation.  (line  72)
13984 * -o <2>:                                What information is listed.
13985                                                               (line 236)
13986 * -o <3>:                                shuf invocation.     (line  37)
13987 * -o <4>:                                sort invocation.     (line 213)
13988 * -o <5>:                                pr invocation.       (line 204)
13989 * -o:                                    od invocation.       (line 188)
13990 * -ot:                                   File characteristic tests.
13991                                                               (line  19)
13992 * -p <1>:                                su invocation.       (line  64)
13993 * -p:                                    uname invocation.    (line  50)
13994 * -P:                                    pathchk invocation.  (line  42)
13995 * -p <1>:                                pathchk invocation.  (line  29)
13996 * -p:                                    File type tests.     (line  28)
13997 * -P <1>:                                du invocation.       (line 107)
13998 * -P <2>:                                df invocation.       (line  74)
13999 * -P <3>:                                chgrp invocation.    (line  79)
14000 * -P:                                    chown invocation.    (line 152)
14001 * -p <1>:                                rmdir invocation.    (line  22)
14002 * -p <2>:                                mkdir invocation.    (line  34)
14003 * -p <3>:                                install invocation.  (line  78)
14004 * -p:                                    cp invocation.       (line 134)
14005 * -P:                                    cp invocation.       (line 129)
14006 * -p <1>:                                dircolors invocation.
14007                                                               (line  38)
14008 * -p <2>:                                General output formatting.
14009                                                               (line  83)
14010 * -p:                                    nl invocation.       (line 108)
14011 * -P:                                    Traversing symlinks. (line  26)
14012 * -q <1>:                                who invocation.      (line  55)
14013 * -q:                                    readlink invocation. (line  52)
14014 * -Q:                                    Formatting the file names.
14015                                                               (line  30)
14016 * -q <1>:                                Formatting the file names.
14017                                                               (line  23)
14018 * -q <2>:                                csplit invocation.   (line 100)
14019 * -q <3>:                                tail invocation.     (line 135)
14020 * -q:                                    head invocation.     (line  36)
14021 * -r:                                    uname invocation.    (line  61)
14022 * -R:                                    Options for date.    (line  36)
14023 * -r <1>:                                Options for date.    (line  30)
14024 * -r <2>:                                id invocation.       (line  36)
14025 * -r <3>:                                Access permission tests.
14026                                                               (line  15)
14027 * -r:                                    touch invocation.    (line  77)
14028 * -R <1>:                                chmod invocation.    (line  69)
14029 * -R <2>:                                chgrp invocation.    (line  66)
14030 * -R <3>:                                chown invocation.    (line 140)
14031 * -R:                                    rm invocation.       (line  91)
14032 * -r <1>:                                rm invocation.       (line  91)
14033 * -r:                                    cp invocation.       (line 200)
14034 * -R:                                    cp invocation.       (line 200)
14035 * -r:                                    Sorting the output.  (line  27)
14036 * -R <1>:                                Which files are listed.
14037                                                               (line  90)
14038 * -R:                                    sort invocation.     (line 162)
14039 * -r <1>:                                sort invocation.     (line 157)
14040 * -r <2>:                                sum invocation.      (line  25)
14041 * -r <3>:                                pr invocation.       (line 211)
14042 * -r:                                    tac invocation.      (line  26)
14043 * -s <1>:                                su invocation.       (line  75)
14044 * -s <2>:                                uname invocation.    (line  65)
14045 * -s <3>:                                Options for date.    (line  78)
14046 * -s <4>:                                who invocation.      (line  59)
14047 * -s <5>:                                tty invocation.      (line  18)
14048 * -s:                                    File characteristic tests.
14049                                                               (line  12)
14050 * -S <1>:                                File type tests.     (line  31)
14051 * -S:                                    du invocation.       (line 134)
14052 * -s <1>:                                du invocation.       (line 130)
14053 * -s:                                    readlink invocation. (line  52)
14054 * -S:                                    ln invocation.       (line 100)
14055 * -s:                                    ln invocation.       (line  94)
14056 * -S <1>:                                mv invocation.       (line  94)
14057 * -S:                                    install invocation.  (line  92)
14058 * -s:                                    install invocation.  (line  88)
14059 * -S:                                    cp invocation.       (line 263)
14060 * -s:                                    cp invocation.       (line 255)
14061 * -S:                                    Sorting the output.  (line  32)
14062 * -s <1>:                                What information is listed.
14063                                                               (line 242)
14064 * -s <2>:                                paste invocation.    (line  34)
14065 * -s <3>:                                cut invocation.      (line  59)
14066 * -s:                                    uniq invocation.     (line  41)
14067 * -S:                                    sort invocation.     (line 237)
14068 * -s <1>:                                sort invocation.     (line 231)
14069 * -s <2>:                                sum invocation.      (line  31)
14070 * -s <3>:                                csplit invocation.   (line 100)
14071 * -s:                                    fold invocation.     (line  29)
14072 * -S:                                    pr invocation.       (line 225)
14073 * -s <1>:                                pr invocation.       (line 216)
14074 * -s <2>:                                fmt invocation.      (line  47)
14075 * -s:                                    od invocation.       (line 191)
14076 * -S:                                    od invocation.       (line  68)
14077 * -s <1>:                                nl invocation.       (line 112)
14078 * -s <2>:                                tac invocation.      (line  33)
14079 * -s:                                    cat invocation.      (line  35)
14080 * -S:                                    Backup options.      (line  50)
14081 * -s BYTES:                              shred invocation.    (line 117)
14082 * -su:                                   su invocation.       (line  25)
14083 * -T:                                    who invocation.      (line  86)
14084 * -t <1>:                                File type tests.     (line  34)
14085 * -t:                                    stat invocation.     (line  48)
14086 * -T:                                    df invocation.       (line 113)
14087 * -t:                                    df invocation.       (line 107)
14088 * -T:                                    ln invocation.       (line 109)
14089 * -t:                                    ln invocation.       (line 105)
14090 * -T:                                    mv invocation.       (line 103)
14091 * -t:                                    mv invocation.       (line  99)
14092 * -T:                                    install invocation.  (line 101)
14093 * -t:                                    install invocation.  (line  97)
14094 * -T:                                    cp invocation.       (line 272)
14095 * -t:                                    cp invocation.       (line 268)
14096 * -T:                                    General output formatting.
14097                                                               (line  92)
14098 * -t <1>:                                Sorting the output.  (line  36)
14099 * -t <2>:                                unexpand invocation. (line  24)
14100 * -t:                                    expand invocation.   (line  22)
14101 * -T:                                    sort invocation.     (line 273)
14102 * -t <1>:                                sort invocation.     (line 253)
14103 * -t:                                    md5sum invocation.   (line  79)
14104 * -T:                                    pr invocation.       (line 246)
14105 * -t <1>:                                pr invocation.       (line 235)
14106 * -t <2>:                                fmt invocation.      (line  40)
14107 * -t:                                    od invocation.       (line  76)
14108 * -T:                                    cat invocation.      (line  42)
14109 * -t:                                    cat invocation.      (line  38)
14110 * -u <1>:                                env invocation.      (line  39)
14111 * -u <2>:                                Options for date.    (line  83)
14112 * -u <3>:                                who invocation.      (line  62)
14113 * -u <4>:                                id invocation.       (line  41)
14114 * -u <5>:                                Access permission tests.
14115                                                               (line  18)
14116 * -u <6>:                                shred invocation.    (line 123)
14117 * -u <7>:                                mv invocation.       (line  76)
14118 * -u:                                    cp invocation.       (line 277)
14119 * -U:                                    Sorting the output.  (line  49)
14120 * -u <1>:                                Sorting the output.  (line  42)
14121 * -u <2>:                                uniq invocation.     (line  98)
14122 * -u <3>:                                sort invocation.     (line 282)
14123 * -u <4>:                                fmt invocation.      (line  53)
14124 * -u:                                    cat invocation.      (line  45)
14125 * -v <1>:                                uname invocation.    (line  76)
14126 * -v <2>:                                chmod invocation.    (line  59)
14127 * -v <3>:                                chgrp invocation.    (line  58)
14128 * -v <4>:                                chown invocation.    (line 132)
14129 * -v <5>:                                rmdir invocation.    (line  31)
14130 * -v <6>:                                readlink invocation. (line  56)
14131 * -v <7>:                                mkdir invocation.    (line  51)
14132 * -v <8>:                                ln invocation.       (line 114)
14133 * -v <9>:                                shred invocation.    (line 129)
14134 * -v <10>:                               rm invocation.       (line  95)
14135 * -v <11>:                               mv invocation.       (line  86)
14136 * -v <12>:                               install invocation.  (line 106)
14137 * -v <13>:                               cp invocation.       (line 287)
14138 * -v <14>:                               Sorting the output.  (line  56)
14139 * -v <15>:                               tail invocation.     (line 139)
14140 * -v <16>:                               head invocation.     (line  40)
14141 * -v <17>:                               pr invocation.       (line 251)
14142 * -v <18>:                               od invocation.       (line 146)
14143 * -v <19>:                               nl invocation.       (line 117)
14144 * -v:                                    cat invocation.      (line  49)
14145 * -w <1>:                                who invocation.      (line  86)
14146 * -w <2>:                                Access permission tests.
14147                                                               (line  21)
14148 * -w <3>:                                General output formatting.
14149                                                               (line 104)
14150 * -w <4>:                                uniq invocation.     (line 103)
14151 * -w <5>:                                md5sum invocation.   (line  88)
14152 * -w <6>:                                wc invocation.       (line  49)
14153 * -w:                                    fold invocation.     (line  35)
14154 * -W:                                    pr invocation.       (line 264)
14155 * -w <1>:                                pr invocation.       (line 255)
14156 * -w <2>:                                fmt invocation.      (line  59)
14157 * -w <3>:                                base64 invocation.   (line  21)
14158 * -w <4>:                                od invocation.       (line 153)
14159 * -w:                                    nl invocation.       (line 122)
14160 * -WIDTH:                                fmt invocation.      (line  59)
14161 * -x <1>:                                Access permission tests.
14162                                                               (line  24)
14163 * -x <2>:                                du invocation.       (line 191)
14164 * -x <3>:                                df invocation.       (line 138)
14165 * -x <4>:                                shred invocation.    (line 133)
14166 * -x <5>:                                cp invocation.       (line 291)
14167 * -x:                                    General output formatting.
14168                                                               (line  88)
14169 * -X:                                    Sorting the output.  (line  63)
14170 * -x:                                    od invocation.       (line 194)
14171 * -X FILE:                               du invocation.       (line 201)
14172 * -z <1>:                                String tests.        (line  15)
14173 * -z <2>:                                shred invocation.    (line 143)
14174 * -z <3>:                                shuf invocation.     (line  48)
14175 * -z <4>:                                sort invocation.     (line 296)
14176 * -z:                                    csplit invocation.   (line  89)
14177 * .cshrc:                                su invocation.       (line  44)
14178 * /:                                     Numeric expressions. (line  15)
14179 * /bin/sh:                               su invocation.       (line  12)
14180 * /etc/passwd:                           su invocation.       (line  12)
14181 * /etc/shells:                           su invocation.       (line  64)
14182 * 128-bit checksum:                      md5sum invocation.   (line   6)
14183 * 16-bit checksum:                       sum invocation.      (line   6)
14184 * 160-bit checksum:                      sha1sum invocation.  (line   6)
14185 * 224-bit checksum:                      sha2 utilities.      (line   6)
14186 * 256-bit checksum:                      sha2 utilities.      (line   6)
14187 * 384-bit checksum:                      sha2 utilities.      (line   6)
14188 * 4.2 file system type:                  df invocation.       (line 125)
14189 * 512-bit checksum:                      sha2 utilities.      (line   6)
14190 * <:                                     Relations for expr.  (line  22)
14191 * <=:                                    Relations for expr.  (line  22)
14192 * = <1>:                                 Relations for expr.  (line  22)
14193 * =:                                     String tests.        (line  22)
14194 * ==:                                    Relations for expr.  (line  22)
14195 * >:                                     Relations for expr.  (line  22)
14196 * >=:                                    Relations for expr.  (line  22)
14197 * \( regexp operator:                    String expressions.  (line  24)
14198 * \+ regexp operator:                    String expressions.  (line  28)
14199 * \? regexp operator:                    String expressions.  (line  28)
14200 * \c:                                    printf invocation.   (line  23)
14201 * \OOO:                                  printf invocation.   (line  57)
14202 * \uhhhh:                                printf invocation.   (line  62)
14203 * \Uhhhhhhhh:                            printf invocation.   (line  62)
14204 * \xHH:                                  printf invocation.   (line  57)
14205 * \| regexp operator:                    String expressions.  (line  28)
14206 * _POSIX2_VERSION <1>:                   touch invocation.    (line  93)
14207 * _POSIX2_VERSION <2>:                   uniq invocation.     (line  46)
14208 * _POSIX2_VERSION <3>:                   sort invocation.     (line 328)
14209 * _POSIX2_VERSION <4>:                   tail invocation.     (line 150)
14210 * _POSIX2_VERSION:                       Standards conformance.
14211                                                               (line  19)
14212 * abbreviations for months:              Calendar date items. (line  38)
14213 * access permission tests:               Access permission tests.
14214                                                               (line   6)
14215 * access permissions, changing:          chmod invocation.    (line   6)
14216 * access time:                           dd invocation.       (line 171)
14217 * access time, changing:                 touch invocation.    (line  50)
14218 * access time, printing or sorting files by: Sorting the output.
14219                                                               (line  42)
14220 * access time, show the most recent:     du invocation.       (line 149)
14221 * across columns:                        pr invocation.       (line  84)
14222 * across, listing files:                 General output formatting.
14223                                                               (line  88)
14224 * adding permissions:                    Setting Permissions. (line  38)
14225 * addition:                              Numeric expressions. (line  11)
14226 * ago in date strings:                   Relative items in date strings.
14227                                                               (line  23)
14228 * all repeated lines, outputting:        uniq invocation.     (line  69)
14229 * alnum:                                 Character sets.      (line  91)
14230 * alpha:                                 Character sets.      (line  94)
14231 * alternate ebcdic, converting to:       dd invocation.       (line  67)
14232 * always color option:                   General output formatting.
14233                                                               (line  27)
14234 * always interactive option:             rm invocation.       (line  57)
14235 * am i:                                  who invocation.      (line  21)
14236 * am in date strings:                    Time of day items.   (line  22)
14237 * and operator <1>:                      Relations for expr.  (line  17)
14238 * and operator:                          Connectives for test.
14239                                                               (line  12)
14240 * append:                                dd invocation.       (line 141)
14241 * appending to the output file:          dd invocation.       (line 141)
14242 * appropriate privileges <1>:            nice invocation.     (line   6)
14243 * appropriate privileges <2>:            hostname invocation. (line   6)
14244 * appropriate privileges <3>:            Setting the time.    (line   6)
14245 * appropriate privileges:                install invocation.  (line  72)
14246 * arbitrary date strings, parsing:       Options for date.    (line  11)
14247 * arbitrary text, displaying:            echo invocation.     (line   6)
14248 * arithmetic tests:                      Numeric tests.       (line   6)
14249 * ASCII dump of files:                   od invocation.       (line   6)
14250 * ascii, converting to:                  dd invocation.       (line  59)
14251 * atime, changing:                       touch invocation.    (line  50)
14252 * atime, printing or sorting files by:   Sorting the output.  (line  42)
14253 * atime, show the most recent:           du invocation.       (line 149)
14254 * attributes, file:                      Changing file attributes.
14255                                                               (line   6)
14256 * authors of get_date:                   Authors of get_date. (line   6)
14257 * auto color option:                     General output formatting.
14258                                                               (line  25)
14259 * automounter file systems:              df invocation.       (line  32)
14260 * b for block special file:              mknod invocation.    (line  26)
14261 * background jobs, stopping at terminal write: Local.         (line  41)
14262 * backslash escapes <1>:                 echo invocation.     (line  20)
14263 * backslash escapes:                     Character sets.      (line  14)
14264 * backslash sequences for file names:    Formatting the file names.
14265                                                               (line  11)
14266 * backup files, ignoring:                Which files are listed.
14267                                                               (line  23)
14268 * backup options:                        Backup options.      (line   6)
14269 * backup suffix:                         Backup options.      (line  50)
14270 * backups, making <1>:                   ln invocation.       (line  55)
14271 * backups, making <2>:                   mv invocation.       (line  50)
14272 * backups, making <3>:                   install invocation.  (line  40)
14273 * backups, making <4>:                   cp invocation.       (line  61)
14274 * backups, making:                       Backup options.      (line  13)
14275 * backups, making only:                  cp invocation.       (line  42)
14276 * base64:                                base64 invocation.   (line   6)
14277 * Base64 decoding:                       base64 invocation.   (line  29)
14278 * base64 encoding:                       base64 invocation.   (line   6)
14279 * basename:                              basename invocation. (line   6)
14280 * baud rate, setting:                    Special.             (line  43)
14281 * beeping at input buffer full:          Input.               (line  56)
14282 * beginning of time:                     Time conversion specifiers.
14283                                                               (line  41)
14284 * beginning of time, for POSIX:          Seconds since the Epoch.
14285                                                               (line  13)
14286 * Bellovin, Steven M.:                   Authors of get_date. (line   6)
14287 * Berets, Jim:                           Authors of get_date. (line   6)
14288 * Berry, K. <1>:                         Authors of get_date. (line  14)
14289 * Berry, K.:                             Introduction.        (line  19)
14290 * binary:                                dd invocation.       (line 188)
14291 * binary I/O:                            dd invocation.       (line 188)
14292 * binary input files:                    md5sum invocation.   (line  38)
14293 * blank:                                 Character sets.      (line  97)
14294 * blank lines, numbering:                nl invocation.       (line  87)
14295 * blanks, ignoring leading:              sort invocation.     (line  79)
14296 * block (space-padding):                 dd invocation.       (line  76)
14297 * block size <1>:                        dd invocation.       (line  33)
14298 * block size:                            Block size.          (line   6)
14299 * block size of conversion:              dd invocation.       (line  38)
14300 * block size of input:                   dd invocation.       (line  25)
14301 * block size of output:                  dd invocation.       (line  29)
14302 * block special check:                   File type tests.     (line  10)
14303 * block special files:                   mknod invocation.    (line  11)
14304 * block special files, creating:         mknod invocation.    (line   6)
14305 * BLOCK_SIZE:                            Block size.          (line  12)
14306 * BLOCKSIZE:                             Block size.          (line  12)
14307 * body, numbering:                       nl invocation.       (line  17)
14308 * Bourne shell syntax for color setup:   dircolors invocation.
14309                                                               (line  27)
14310 * breaks, cause interrupts:              Input.               (line  10)
14311 * breaks, ignoring:                      Input.               (line   7)
14312 * brkint:                                Input.               (line  10)
14313 * bs:                                    dd invocation.       (line  33)
14314 * BSD sum:                               sum invocation.      (line  25)
14315 * BSD tail:                              tail invocation.     (line  19)
14316 * BSD touch compatibility:               touch invocation.    (line  68)
14317 * bsN:                                   Output.              (line  55)
14318 * bugs, reporting:                       Introduction.        (line  12)
14319 * built-in shell commands, conflicts with <1>: nice invocation.
14320                                                               (line  35)
14321 * built-in shell commands, conflicts with <2>: pwd invocation.
14322                                                               (line  10)
14323 * built-in shell commands, conflicts with: test invocation.   (line  28)
14324 * byte count:                            wc invocation.       (line   6)
14325 * byte-swapping:                         dd invocation.       (line  95)
14326 * c for character special file:          mknod invocation.    (line  29)
14327 * C shell syntax for color setup:        dircolors invocation.
14328                                                               (line  33)
14329 * C-s/C-q flow control:                  Input.               (line  38)
14330 * calendar date item:                    Calendar date items. (line   6)
14331 * case folding:                          sort invocation.     (line  92)
14332 * case translation:                      Local.               (line  36)
14333 * case, ignored in dates:                General date syntax. (line  64)
14334 * cat:                                   cat invocation.      (line   6)
14335 * cbreak:                                Combination.         (line  52)
14336 * cbs:                                   dd invocation.       (line  38)
14337 * CD-ROM file system type:               df invocation.       (line 129)
14338 * cdfs file system type:                 df invocation.       (line 129)
14339 * change or print terminal settings:     stty invocation.     (line   6)
14340 * changed files, verbosely describing:   chgrp invocation.    (line  20)
14341 * changed owners, verbosely describing:  chown invocation.    (line  70)
14342 * changing access permissions:           chmod invocation.    (line   6)
14343 * changing file attributes:              Changing file attributes.
14344                                                               (line   6)
14345 * changing file ownership:               chown invocation.    (line   6)
14346 * changing file timestamps:              touch invocation.    (line   6)
14347 * changing group ownership <1>:          chgrp invocation.    (line   6)
14348 * changing group ownership:              chown invocation.    (line   6)
14349 * changing special mode bits:            Changing Special Mode Bits.
14350                                                               (line   6)
14351 * character classes:                     Character sets.      (line  78)
14352 * character count:                       wc invocation.       (line   6)
14353 * character size:                        Control.             (line  19)
14354 * character special check:               File type tests.     (line  13)
14355 * character special files:               mknod invocation.    (line  11)
14356 * character special files, creating:     mknod invocation.    (line   6)
14357 * characters, special:                   Characters.          (line   6)
14358 * check file types:                      test invocation.     (line   6)
14359 * checking for sortedness:               sort invocation.     (line  18)
14360 * checksum, 128-bit:                     md5sum invocation.   (line   6)
14361 * checksum, 16-bit:                      sum invocation.      (line   6)
14362 * checksum, 160-bit:                     sha1sum invocation.  (line   6)
14363 * checksum, 224-bit:                     sha2 utilities.      (line   6)
14364 * checksum, 256-bit:                     sha2 utilities.      (line   6)
14365 * checksum, 384-bit:                     sha2 utilities.      (line   6)
14366 * checksum, 512-bit:                     sha2 utilities.      (line   6)
14367 * chgrp:                                 chgrp invocation.    (line   6)
14368 * chmod:                                 chmod invocation.    (line   6)
14369 * chown:                                 chown invocation.    (line   6)
14370 * chroot:                                chroot invocation.   (line   6)
14371 * cksum:                                 cksum invocation.    (line   6)
14372 * clocal:                                Control.             (line  33)
14373 * cntrl:                                 Character sets.      (line 100)
14374 * color database, printing:              dircolors invocation.
14375                                                               (line  38)
14376 * color setup:                           dircolors invocation.
14377                                                               (line   6)
14378 * color, distinguishing file types with: General output formatting.
14379                                                               (line  21)
14380 * cols:                                  Special.             (line  27)
14381 * column to wrap data after:             base64 invocation.   (line  21)
14382 * COLUMNS:                               Special.             (line  30)
14383 * columns:                               Special.             (line  27)
14384 * COLUMNS:                               General output formatting.
14385                                                               (line 104)
14386 * combination settings:                  Combination.         (line   6)
14387 * comm:                                  comm invocation.     (line   6)
14388 * command-line operands to shuffle:      shuf invocation.     (line  19)
14389 * commands for controlling processes:    Process control.     (line   6)
14390 * commands for delaying:                 Delaying.            (line   6)
14391 * commands for exit status:              Conditions.          (line   6)
14392 * commands for file name manipulation:   File name manipulation.
14393                                                               (line   6)
14394 * commands for invoking other commands:  Modified command invocation.
14395                                                               (line   6)
14396 * commands for printing text:            Printing text.       (line   6)
14397 * commands for printing the working context: Working context. (line   6)
14398 * commands for printing user information: User information.   (line   6)
14399 * commands for redirection:              Redirection.         (line   6)
14400 * commands for system context:           System context.      (line   6)
14401 * commas, outputting between files:      General output formatting.
14402                                                               (line  78)
14403 * comments, in dates:                    General date syntax. (line  64)
14404 * common field, joining on:              join invocation.     (line   6)
14405 * common lines:                          comm invocation.     (line  18)
14406 * common options:                        Common options.      (line   6)
14407 * compare values:                        test invocation.     (line   6)
14408 * comparing sorted files:                comm invocation.     (line   6)
14409 * comparison operators:                  Relations for expr.  (line  22)
14410 * concatenate and write files:           cat invocation.      (line   6)
14411 * conditional executability:             Conditional Executability.
14412                                                               (line   6)
14413 * conditions:                            Conditions.          (line   6)
14414 * conflicts with shell built-ins <1>:    nice invocation.     (line  35)
14415 * conflicts with shell built-ins <2>:    pwd invocation.      (line  10)
14416 * conflicts with shell built-ins:        test invocation.     (line  28)
14417 * connectives, logical <1>:              Relations for expr.  (line   6)
14418 * connectives, logical:                  Connectives for test.
14419                                                               (line   6)
14420 * context splitting:                     csplit invocation.   (line   6)
14421 * context, system:                       System context.      (line   6)
14422 * control characters, using ^C:          Local.               (line  51)
14423 * control settings:                      Control.             (line   6)
14424 * controlling terminal:                  dd invocation.       (line 176)
14425 * conv:                                  dd invocation.       (line  53)
14426 * conversion block size:                 dd invocation.       (line  38)
14427 * conversion specifiers, date:           Date conversion specifiers.
14428                                                               (line   6)
14429 * conversion specifiers, literal:        Literal conversion specifiers.
14430                                                               (line   6)
14431 * conversion specifiers, time:           Time conversion specifiers.
14432                                                               (line   6)
14433 * converting tabs to spaces:             expand invocation.   (line   6)
14434 * converting while copying a file:       dd invocation.       (line   6)
14435 * cooked:                                Combination.         (line  37)
14436 * Coordinated Universal Time:            Options for date.    (line  83)
14437 * copying directories recursively:       cp invocation.       (line  76)
14438 * copying existing permissions:          Copying Permissions. (line   6)
14439 * copying files:                         cat invocation.      (line   6)
14440 * copying files and directories:         cp invocation.       (line   6)
14441 * copying files and setting attributes:  install invocation.  (line   6)
14442 * core utilities:                        Top.                 (line  19)
14443 * count:                                 dd invocation.       (line  49)
14444 * cp:                                    cp invocation.       (line   6)
14445 * crashes and corruption:                sync invocation.     (line  11)
14446 * CRC checksum:                          cksum invocation.    (line   6)
14447 * cread:                                 Control.             (line  30)
14448 * creating directories:                  mkdir invocation.    (line   6)
14449 * creating FIFOs (named pipes):          mkfifo invocation.   (line   6)
14450 * creating links (hard only):            link invocation.     (line   6)
14451 * creating links (hard or soft):         ln invocation.       (line   6)
14452 * creating output file, avoiding:        dd invocation.       (line 103)
14453 * creating output file, requiring:       dd invocation.       (line 107)
14454 * crN:                                   Output.              (line  45)
14455 * crown margin:                          fmt invocation.      (line  34)
14456 * crt:                                   Combination.         (line  74)
14457 * crterase:                              Local.               (line  22)
14458 * crtkill:                               Local.               (line  56)
14459 * crtscts:                               Control.             (line  36)
14460 * csh syntax for color setup:            dircolors invocation.
14461                                                               (line  33)
14462 * csN:                                   Control.             (line  19)
14463 * csplit:                                csplit invocation.   (line   6)
14464 * cstopb:                                Control.             (line  27)
14465 * ctime, printing or sorting by:         Sorting the output.  (line  13)
14466 * ctime, show the most recent:           du invocation.       (line 144)
14467 * ctlecho:                               Local.               (line  51)
14468 * current working directory, printing:   pwd invocation.      (line   6)
14469 * cut:                                   cut invocation.      (line   6)
14470 * cyclic redundancy check:               cksum invocation.    (line   6)
14471 * data, erasing:                         shred invocation.    (line   6)
14472 * database for color setup, printing:    dircolors invocation.
14473                                                               (line  38)
14474 * date:                                  date invocation.     (line   6)
14475 * date conversion specifiers:            Date conversion specifiers.
14476                                                               (line   6)
14477 * date format, ISO 8601:                 Calendar date items. (line  30)
14478 * date input formats:                    Date input formats.  (line   6)
14479 * date options:                          Options for date.    (line   6)
14480 * date strings, parsing:                 Options for date.    (line  11)
14481 * day in date strings:                   Relative items in date strings.
14482                                                               (line  15)
14483 * day of week item:                      Day of week items.   (line   6)
14484 * dd:                                    dd invocation.       (line   6)
14485 * dec:                                   Combination.         (line  77)
14486 * decctlq:                               Combination.         (line  63)
14487 * Decode base64 data:                    base64 invocation.   (line  29)
14488 * delay for a specified time:            sleep invocation.    (line   6)
14489 * delaying commands:                     Delaying.            (line   6)
14490 * deleting characters:                   Squeezing.           (line   6)
14491 * dereferencing symbolic links:          ln invocation.       (line  40)
14492 * descriptor follow option:              tail invocation.     (line  41)
14493 * destination directory <1>:             ln invocation.       (line 105)
14494 * destination directory <2>:             mv invocation.       (line  99)
14495 * destination directory <3>:             install invocation.  (line  97)
14496 * destination directory <4>:             cp invocation.       (line 268)
14497 * destination directory:                 Target directory.    (line  15)
14498 * destinations, multiple output:         tee invocation.      (line   6)
14499 * device file, disk:                     df invocation.       (line  19)
14500 * df:                                    df invocation.       (line   6)
14501 * DF_BLOCK_SIZE:                         Block size.          (line  12)
14502 * dictionary order:                      sort invocation.     (line  85)
14503 * differing lines:                       comm invocation.     (line  18)
14504 * digit:                                 Character sets.      (line 103)
14505 * dir:                                   dir invocation.      (line   6)
14506 * dircolors:                             dircolors invocation.
14507                                                               (line   6)
14508 * direct:                                dd invocation.       (line 149)
14509 * direct I/O:                            dd invocation.       (line 149)
14510 * directories, copying:                  cp invocation.       (line   6)
14511 * directories, copying recursively:      cp invocation.       (line  76)
14512 * directories, creating:                 mkdir invocation.    (line   6)
14513 * directories, creating with given attributes: install invocation.
14514                                                               (line  48)
14515 * directories, removing (recursively):   rm invocation.       (line  91)
14516 * directories, removing empty:           rmdir invocation.    (line   6)
14517 * directory:                             dd invocation.       (line 152)
14518 * directory check:                       File type tests.     (line  16)
14519 * directory components, printing:        dirname invocation.  (line   6)
14520 * directory deletion, ignoring failures: rmdir invocation.    (line  17)
14521 * directory deletion, reporting:         rmdir invocation.    (line  31)
14522 * directory I/O:                         dd invocation.       (line 152)
14523 * directory listing:                     ls invocation.       (line   6)
14524 * directory listing, brief:              dir invocation.      (line   6)
14525 * directory listing, recursive:          Which files are listed.
14526                                                               (line  90)
14527 * directory listing, verbose:            vdir invocation.     (line   6)
14528 * directory order, listing by:           Sorting the output.  (line  20)
14529 * directory, stripping from file names:  basename invocation. (line   6)
14530 * dired Emacs mode support:              What information is listed.
14531                                                               (line  16)
14532 * dirname:                               dirname invocation.  (line   6)
14533 * disabling special characters:          Characters.          (line  13)
14534 * disambiguating group names and IDs:    Disambiguating names and IDs.
14535                                                               (line   6)
14536 * disk allocation:                       What information is listed.
14537                                                               (line 242)
14538 * disk device file:                      df invocation.       (line  19)
14539 * disk usage:                            Disk usage.          (line   6)
14540 * disk usage by file system:             df invocation.       (line   6)
14541 * disk usage for files:                  du invocation.       (line   6)
14542 * diskette file system:                  df invocation.       (line 133)
14543 * displacement of dates:                 Relative items in date strings.
14544                                                               (line   6)
14545 * displaying text:                       echo invocation.     (line   6)
14546 * displaying value of a symbolic link:   readlink invocation. (line   6)
14547 * division:                              Numeric expressions. (line  15)
14548 * do nothing, successfully:              true invocation.     (line   6)
14549 * do nothing, unsuccessfully:            false invocation.    (line   6)
14550 * DOS file system:                       df invocation.       (line 133)
14551 * double spacing:                        pr invocation.       (line  96)
14552 * down columns:                          pr invocation.       (line  70)
14553 * dsusp:                                 Characters.          (line  53)
14554 * dsync:                                 dd invocation.       (line 157)
14555 * du:                                    du invocation.       (line   6)
14556 * DU_BLOCK_SIZE:                         Block size.          (line  12)
14557 * ebcdic, converting to:                 dd invocation.       (line  63)
14558 * echo <1>:                              Local.               (line  18)
14559 * echo:                                  echo invocation.     (line   6)
14560 * echoctl:                               Local.               (line  51)
14561 * echoe:                                 Local.               (line  22)
14562 * echok:                                 Local.               (line  26)
14563 * echoke:                                Local.               (line  56)
14564 * echonl:                                Local.               (line  29)
14565 * echoprt:                               Local.               (line  46)
14566 * effective user and group IDs, printing: id invocation.      (line   6)
14567 * effective user ID, printing:           whoami invocation.   (line   6)
14568 * efs file system type:                  df invocation.       (line 125)
14569 * Eggert, Paul:                          Authors of get_date. (line   6)
14570 * eight-bit characters <1>:              Combination.         (line  55)
14571 * eight-bit characters:                  Control.             (line  19)
14572 * eight-bit input:                       Input.               (line  23)
14573 * ek:                                    Combination.         (line  22)
14574 * empty files, creating:                 touch invocation.    (line  11)
14575 * empty lines, numbering:                nl invocation.       (line  87)
14576 * entire files, output of:               Output of entire files.
14577                                                               (line   6)
14578 * env:                                   env invocation.      (line   6)
14579 * environment variables, printing:       printenv invocation. (line   6)
14580 * environment, preserving:               su invocation.       (line  64)
14581 * environment, printing:                 env invocation.      (line  30)
14582 * environment, running a program in a modified: env invocation.
14583                                                               (line   6)
14584 * eof:                                   Characters.          (line  32)
14585 * eol:                                   Characters.          (line  35)
14586 * eol2:                                  Characters.          (line  38)
14587 * epoch, for POSIX:                      Seconds since the Epoch.
14588                                                               (line  13)
14589 * epoch, seconds since:                  Time conversion specifiers.
14590                                                               (line  41)
14591 * equal string check:                    String tests.        (line  22)
14592 * equivalence classes:                   Character sets.      (line 127)
14593 * erase:                                 Characters.          (line  26)
14594 * erasing data:                          shred invocation.    (line   6)
14595 * error messages, omitting <1>:          chmod invocation.    (line  45)
14596 * error messages, omitting <2>:          chgrp invocation.    (line  26)
14597 * error messages, omitting:              chown invocation.    (line  76)
14598 * evaluation of expressions:             expr invocation.     (line   6)
14599 * even parity:                           Control.             (line  13)
14600 * evenp:                                 Combination.         (line   9)
14601 * exabyte, definition of:                Block size.          (line 116)
14602 * examples of date:                      Examples of date.    (line   6)
14603 * examples of expr:                      Examples of expr.    (line   6)
14604 * exbibyte, definition of:               Block size.          (line 120)
14605 * excl:                                  dd invocation.       (line 107)
14606 * excluding files from du:               du invocation.       (line 195)
14607 * executable file check:                 Access permission tests.
14608                                                               (line  24)
14609 * executables and file type, marking:    General output formatting.
14610                                                               (line  36)
14611 * execute/search permission:             Mode Structure.      (line  18)
14612 * execute/search permission, symbolic:   Setting Permissions. (line  63)
14613 * existence-of-file check:               File characteristic tests.
14614                                                               (line   9)
14615 * existing backup method:                Backup options.      (line  39)
14616 * exit status commands:                  Conditions.          (line   6)
14617 * exit status of chroot:                 chroot invocation.   (line  47)
14618 * exit status of env:                    env invocation.      (line  49)
14619 * exit status of expr:                   expr invocation.     (line  39)
14620 * exit status of false:                  false invocation.    (line   6)
14621 * exit status of ls:                     ls invocation.       (line  29)
14622 * exit status of nice:                   nice invocation.     (line  53)
14623 * exit status of nohup:                  nohup invocation.    (line  42)
14624 * exit status of pathchk:                pathchk invocation.  (line  50)
14625 * exit status of printenv:               printenv invocation. (line  17)
14626 * exit status of sort:                   sort invocation.     (line  58)
14627 * exit status of su:                     su invocation.       (line  80)
14628 * exit status of test:                   test invocation.     (line  40)
14629 * exit status of true:                   true invocation.     (line   6)
14630 * exit status of tty:                    tty invocation.      (line  21)
14631 * expand:                                expand invocation.   (line   6)
14632 * expr:                                  expr invocation.     (line   6)
14633 * expression evaluation <1>:             expr invocation.     (line   6)
14634 * expression evaluation:                 test invocation.     (line   6)
14635 * expressions, numeric:                  Numeric expressions. (line   6)
14636 * expressions, string:                   String expressions.  (line   6)
14637 * extension, sorting files by:           Sorting the output.  (line  63)
14638 * factor:                                factor invocation.   (line   6)
14639 * failure exit status:                   false invocation.    (line   6)
14640 * false:                                 false invocation.    (line   6)
14641 * fascism:                               su invocation.       (line  87)
14642 * fdatasync:                             dd invocation.       (line 121)
14643 * FDL, GNU Free Documentation License:   GNU Free Documentation License.
14644                                                               (line   6)
14645 * ffN:                                   Output.              (line  63)
14646 * field separator character:             sort invocation.     (line 253)
14647 * fields, padding numeric:               Padding and other flags.
14648                                                               (line   6)
14649 * FIFOs, creating:                       mkfifo invocation.   (line   6)
14650 * file attributes, changing:             Changing file attributes.
14651                                                               (line   6)
14652 * file characteristic tests:             File characteristic tests.
14653                                                               (line   6)
14654 * file contents, dumping unambiguously:  od invocation.       (line   6)
14655 * file information, preserving:          cp invocation.       (line 134)
14656 * file mode bits, numeric:               Numeric Modes.       (line   6)
14657 * file name manipulation:                File name manipulation.
14658                                                               (line   6)
14659 * file name pattern expansion, disabled: su invocation.       (line  44)
14660 * file names, checking validity and portability: pathchk invocation.
14661                                                               (line   6)
14662 * file names, stripping directory and suffix: basename invocation.
14663                                                               (line   6)
14664 * file offset radix:                     od invocation.       (line  36)
14665 * file ownership, changing:              chown invocation.    (line   6)
14666 * file sizes:                            du invocation.       (line  45)
14667 * file space usage:                      du invocation.       (line   6)
14668 * file status:                           stat invocation.     (line   6)
14669 * file system disk usage:                df invocation.       (line   6)
14670 * file system sizes:                     df invocation.       (line  38)
14671 * file system space, retrieving current data more slowly: df invocation.
14672                                                               (line 100)
14673 * file system space, retrieving old data more quickly: df invocation.
14674                                                               (line  67)
14675 * file system status:                    stat invocation.     (line   6)
14676 * file system types, limiting output to certain: df invocation.
14677                                                               (line  63)
14678 * file system types, printing:           df invocation.       (line 113)
14679 * file systems:                          stat invocation.     (line  23)
14680 * file systems and hard links:           ln invocation.       (line   6)
14681 * file systems, omitting copying to different: cp invocation. (line 291)
14682 * file timestamps, changing:             touch invocation.    (line   6)
14683 * file type and executables, marking:    General output formatting.
14684                                                               (line  36)
14685 * file type tests:                       File type tests.     (line   6)
14686 * file type, marking:                    General output formatting.
14687                                                               (line  47)
14688 * file types:                            Special file types.  (line   9)
14689 * file types, special:                   Special file types.  (line   6)
14690 * file utilities:                        Top.                 (line  19)
14691 * files beginning with -, removing:      rm invocation.       (line  98)
14692 * files, copying:                        cp invocation.       (line   6)
14693 * fingerprint, 128-bit:                  md5sum invocation.   (line   6)
14694 * fingerprint, 160-bit:                  sha1sum invocation.  (line   6)
14695 * fingerprint, 224-bit:                  sha2 utilities.      (line   6)
14696 * fingerprint, 256-bit:                  sha2 utilities.      (line   6)
14697 * fingerprint, 384-bit:                  sha2 utilities.      (line   6)
14698 * fingerprint, 512-bit:                  sha2 utilities.      (line   6)
14699 * first in date strings:                 General date syntax. (line  26)
14700 * first part of files, outputting:       head invocation.     (line   6)
14701 * fixed-length records, converting to variable-length: dd invocation.
14702                                                               (line  38)
14703 * flow control, hardware:                Control.             (line  36)
14704 * flow control, software:                Input.               (line  43)
14705 * flushing, disabling:                   Local.               (line  32)
14706 * fmt:                                   fmt invocation.      (line   6)
14707 * fold:                                  fold invocation.     (line   6)
14708 * folding long input lines:              fold invocation.     (line   6)
14709 * footers, numbering:                    nl invocation.       (line  17)
14710 * force deletion:                        shred invocation.    (line 101)
14711 * formatting file contents:              Formatting file contents.
14712                                                               (line   6)
14713 * formatting of numbers in seq:          seq invocation.      (line  24)
14714 * formatting times <1>:                  date invocation.     (line  20)
14715 * formatting times:                      pr invocation.       (line 100)
14716 * fortnight in date strings:             Relative items in date strings.
14717                                                               (line  15)
14718 * fsync:                                 dd invocation.       (line 125)
14719 * general date syntax:                   General date syntax. (line   6)
14720 * general numeric sort:                  sort invocation.     (line  98)
14721 * get_date:                              Date input formats.  (line   6)
14722 * gibibyte, definition of:               Block size.          (line  99)
14723 * gigabyte, definition of:               Block size.          (line  95)
14724 * giving away permissions:               Umask and Protection.
14725                                                               (line  12)
14726 * globbing, disabled:                    su invocation.       (line  44)
14727 * GMT:                                   Options for date.    (line  83)
14728 * grand total of disk space:             du invocation.       (line  50)
14729 * graph:                                 Character sets.      (line 106)
14730 * Greenwich Mean Time:                   Options for date.    (line  83)
14731 * group IDs, disambiguating:             Disambiguating names and IDs.
14732                                                               (line   6)
14733 * group names, disambiguating:           Disambiguating names and IDs.
14734                                                               (line   6)
14735 * group owner, default:                  Mode Structure.      (line  31)
14736 * group ownership of installed files, setting: install invocation.
14737                                                               (line  54)
14738 * group ownership, changing <1>:         chgrp invocation.    (line   6)
14739 * group ownership, changing:             chown invocation.    (line   6)
14740 * group wheel, not supported:            su invocation.       (line  87)
14741 * group, permissions for:                Setting Permissions. (line  26)
14742 * groups:                                groups invocation.   (line   6)
14743 * growing files:                         tail invocation.     (line  41)
14744 * hangups, immunity to:                  nohup invocation.    (line   6)
14745 * hard link check:                       File characteristic tests.
14746                                                               (line  23)
14747 * hard link, defined:                    ln invocation.       (line  32)
14748 * hard links:                            dd invocation.       (line 185)
14749 * hard links to directories:             ln invocation.       (line  61)
14750 * hard links, counting in du:            du invocation.       (line  91)
14751 * hard links, creating <1>:              ln invocation.       (line   6)
14752 * hard links, creating:                  link invocation.     (line   6)
14753 * hard links, preserving:                cp invocation.       (line  89)
14754 * hardware class:                        uname invocation.    (line  41)
14755 * hardware flow control:                 Control.             (line  36)
14756 * hardware platform:                     uname invocation.    (line  35)
14757 * hardware type:                         uname invocation.    (line  41)
14758 * hat notation for control characters:   Local.               (line  51)
14759 * head:                                  head invocation.     (line   6)
14760 * head of output:                        shuf invocation.     (line  32)
14761 * headers, numbering:                    nl invocation.       (line  17)
14762 * help, online:                          Common options.      (line  29)
14763 * hex dump of files:                     od invocation.       (line   6)
14764 * High Sierra file system:               df invocation.       (line 129)
14765 * holes, copying files with:             cp invocation.       (line 216)
14766 * HOME:                                  su invocation.       (line  18)
14767 * horizontal, listing files:             General output formatting.
14768                                                               (line  88)
14769 * host processor type:                   uname invocation.    (line  50)
14770 * hostid:                                hostid invocation.   (line   6)
14771 * hostname <1>:                          hostname invocation. (line   6)
14772 * hostname:                              uname invocation.    (line  46)
14773 * hour in date strings:                  Relative items in date strings.
14774                                                               (line  15)
14775 * hsfs file system type:                 df invocation.       (line 129)
14776 * human-readable output <1>:             du invocation.       (line  75)
14777 * human-readable output <2>:             df invocation.       (line  43)
14778 * human-readable output <3>:             What information is listed.
14779                                                               (line 116)
14780 * human-readable output:                 Block size.          (line  43)
14781 * hup[cl]:                               Control.             (line  23)
14782 * hurd, author, printing:                What information is listed.
14783                                                               (line  10)
14784 * ibs:                                   dd invocation.       (line  25)
14785 * icanon:                                Local.               (line  11)
14786 * icrnl:                                 Input.               (line  32)
14787 * id:                                    id invocation.       (line   6)
14788 * idle time:                             who invocation.      (line  62)
14789 * iexten:                                Local.               (line  15)
14790 * if:                                    dd invocation.       (line  17)
14791 * iflag:                                 dd invocation.       (line 130)
14792 * ignbrk:                                Input.               (line   7)
14793 * igncr:                                 Input.               (line  29)
14794 * ignore file systems:                   df invocation.       (line  32)
14795 * Ignore garbage in base64 stream:       base64 invocation.   (line  35)
14796 * ignoring case:                         sort invocation.     (line  92)
14797 * ignpar:                                Input.               (line  13)
14798 * imaxbel:                               Input.               (line  56)
14799 * immunity to hangups:                   nohup invocation.    (line   6)
14800 * implementation, hardware:              uname invocation.    (line  35)
14801 * including files from du <1>:           du invocation.       (line  62)
14802 * including files from du:               wc invocation.       (line  60)
14803 * indenting lines:                       pr invocation.       (line 204)
14804 * index:                                 String expressions.  (line  45)
14805 * information, about current users:      who invocation.      (line   6)
14806 * initial part of files, outputting:     head invocation.     (line   6)
14807 * initial tabs, converting:              expand invocation.   (line  34)
14808 * inlcr:                                 Input.               (line  26)
14809 * inode number, printing:                What information is listed.
14810                                                               (line 122)
14811 * inode usage:                           df invocation.       (line  52)
14812 * inode, and hard links:                 ln invocation.       (line  32)
14813 * inodes, written buffered:              sync invocation.     (line   6)
14814 * inpck:                                 Input.               (line  20)
14815 * input block size:                      dd invocation.       (line  25)
14816 * input encoding, UTF-8:                 Input.               (line  35)
14817 * input range to shuffle:                shuf invocation.     (line  23)
14818 * input settings:                        Input.               (line   6)
14819 * input tabs:                            pr invocation.       (line 120)
14820 * install:                               install invocation.  (line   6)
14821 * interactivity <1>:                     mv invocation.       (line  64)
14822 * interactivity:                         cp invocation.       (line 188)
14823 * intr:                                  Characters.          (line  20)
14824 * invocation of commands, modified:      Modified command invocation.
14825                                                               (line   6)
14826 * isig:                                  Local.               (line   7)
14827 * ISO 8601 date format:                  Calendar date items. (line  30)
14828 * ISO/IEC 10646:                         printf invocation.   (line  62)
14829 * ispeed:                                Special.             (line  16)
14830 * istrip:                                Input.               (line  23)
14831 * items in date strings:                 General date syntax. (line   6)
14832 * iterations, selecting the number of:   shred invocation.    (line 106)
14833 * iuclc:                                 Input.               (line  48)
14834 * iutf8:                                 Input.               (line  35)
14835 * ixany:                                 Input.               (line  52)
14836 * ixoff:                                 Input.               (line  43)
14837 * ixon:                                  Input.               (line  38)
14838 * join:                                  join invocation.     (line   6)
14839 * kernel name:                           uname invocation.    (line  65)
14840 * kernel release:                        uname invocation.    (line  61)
14841 * kernel version:                        uname invocation.    (line  76)
14842 * kibibyte, definition of:               Block size.          (line  83)
14843 * kibibytes for file sizes:              du invocation.       (line  85)
14844 * kibibytes for file system sizes:       df invocation.       (line  57)
14845 * kill <1>:                              kill invocation.     (line   6)
14846 * kill:                                  Characters.          (line  29)
14847 * kilobyte, definition of:               Block size.          (line  78)
14848 * Knuth, Donald E.:                      fmt invocation.      (line  19)
14849 * language, in dates:                    General date syntax. (line  40)
14850 * last DAY <1>:                          Day of week items.   (line  15)
14851 * last DAY:                              Options for date.    (line  11)
14852 * last in date strings:                  General date syntax. (line  26)
14853 * last modified dates, displaying in du: du invocation.       (line 138)
14854 * last part of files, outputting:        tail invocation.     (line   6)
14855 * LC_ALL <1>:                            ls invocation.       (line  17)
14856 * LC_ALL:                                sort invocation.     (line  49)
14857 * LC_COLLATE <1>:                        Relations for expr.  (line  22)
14858 * LC_COLLATE <2>:                        join invocation.     (line  14)
14859 * LC_COLLATE <3>:                        comm invocation.     (line  12)
14860 * LC_COLLATE <4>:                        uniq invocation.     (line  21)
14861 * LC_COLLATE:                            sort invocation.     (line  49)
14862 * LC_CTYPE <1>:                          printf invocation.   (line  62)
14863 * LC_CTYPE:                              sort invocation.     (line  79)
14864 * LC_MESSAGES:                           pr invocation.       (line  13)
14865 * LC_NUMERIC <1>:                        printf invocation.   (line  51)
14866 * LC_NUMERIC <2>:                        sort invocation.     (line  98)
14867 * LC_NUMERIC:                            Block size.          (line  57)
14868 * LC_TIME <1>:                           date invocation.     (line  11)
14869 * LC_TIME <2>:                           du invocation.       (line 158)
14870 * LC_TIME <3>:                           Formatting file timestamps.
14871                                                               (line  30)
14872 * LC_TIME <4>:                           sort invocation.     (line 131)
14873 * LC_TIME:                               pr invocation.       (line 107)
14874 * LCASE:                                 Combination.         (line  71)
14875 * lcase:                                 Combination.         (line  71)
14876 * lcase, converting to:                  dd invocation.       (line  87)
14877 * lchown <1>:                            chgrp invocation.    (line  30)
14878 * lchown:                                chown invocation.    (line 103)
14879 * leading directories, creating missing: install invocation.  (line  48)
14880 * leading directory components, stripping: basename invocation.
14881                                                               (line   6)
14882 * left margin:                           pr invocation.       (line 204)
14883 * length:                                String expressions.  (line  50)
14884 * limiting output of du:                 du invocation.       (line 111)
14885 * line:                                  Special.             (line  37)
14886 * line count:                            wc invocation.       (line   6)
14887 * line numbering:                        nl invocation.       (line   6)
14888 * line settings of terminal:             stty invocation.     (line   6)
14889 * line-breaking:                         fmt invocation.      (line  19)
14890 * line-by-line comparison:               comm invocation.     (line   6)
14891 * LINES:                                 Special.             (line  30)
14892 * link:                                  link invocation.     (line   6)
14893 * links, creating <1>:                   ln invocation.       (line   6)
14894 * links, creating:                       link invocation.     (line   6)
14895 * Linux file system types:               df invocation.       (line 125)
14896 * literal conversion specifiers:         Literal conversion specifiers.
14897                                                               (line   6)
14898 * litout:                                Combination.         (line  59)
14899 * ln:                                    ln invocation.       (line   6)
14900 * ln format for nl:                      nl invocation.       (line  98)
14901 * lnext:                                 Characters.          (line  62)
14902 * local file system types:               df invocation.       (line 125)
14903 * local settings:                        Local.               (line   6)
14904 * logging out and continuing to run:     nohup invocation.    (line   6)
14905 * logical and operator <1>:              Relations for expr.  (line  17)
14906 * logical and operator:                  Connectives for test.
14907                                                               (line  12)
14908 * logical connectives <1>:               Relations for expr.  (line   6)
14909 * logical connectives:                   Connectives for test.
14910                                                               (line   6)
14911 * logical or operator <1>:               Relations for expr.  (line  11)
14912 * logical or operator:                   Connectives for test.
14913                                                               (line  15)
14914 * logical pages, numbering on:           nl invocation.       (line  12)
14915 * login name, printing:                  logname invocation.  (line   6)
14916 * login sessions, printing users with:   users invocation.    (line   6)
14917 * login shell:                           su invocation.       (line  18)
14918 * login shell, creating:                 su invocation.       (line  53)
14919 * login time:                            who invocation.      (line  11)
14920 * LOGNAME:                               su invocation.       (line  18)
14921 * logname:                               logname invocation.  (line   6)
14922 * long ls format:                        What information is listed.
14923                                                               (line 130)
14924 * lower:                                 Character sets.      (line 109)
14925 * lowercase, translating to output:      Output.              (line  12)
14926 * ls:                                    ls invocation.       (line   6)
14927 * LS_BLOCK_SIZE:                         Block size.          (line  12)
14928 * LS_COLORS:                             dircolors invocation.
14929                                                               (line  16)
14930 * machine type:                          uname invocation.    (line  41)
14931 * machine-readable stty output:          stty invocation.     (line  41)
14932 * MacKenzie, D.:                         Introduction.        (line  19)
14933 * MacKenzie, David:                      Authors of get_date. (line   6)
14934 * Makefiles, installing programs in:     install invocation.  (line  30)
14935 * manipulating files:                    Basic operations.    (line   6)
14936 * manipulation of file names:            File name manipulation.
14937                                                               (line   6)
14938 * match:                                 String expressions.  (line  36)
14939 * matching patterns:                     String expressions.  (line  11)
14940 * MD5:                                   md5sum invocation.   (line   6)
14941 * md5sum:                                md5sum invocation.   (line   6)
14942 * mebibyte, definition of:               Block size.          (line  92)
14943 * mebibytes for file sizes:              du invocation.       (line 101)
14944 * megabyte, definition of:               Block size.          (line  88)
14945 * merging files:                         paste invocation.    (line   6)
14946 * merging files in parallel:             pr invocation.       (line   6)
14947 * merging sorted files:                  sort invocation.     (line  32)
14948 * message status:                        who invocation.      (line  86)
14949 * message-digest, 128-bit:               md5sum invocation.   (line   6)
14950 * message-digest, 160-bit:               sha1sum invocation.  (line   6)
14951 * message-digest, 224-bit:               sha2 utilities.      (line   6)
14952 * message-digest, 256-bit:               sha2 utilities.      (line   6)
14953 * message-digest, 384-bit:               sha2 utilities.      (line   6)
14954 * message-digest, 512-bit:               sha2 utilities.      (line   6)
14955 * Meyering, J.:                          Introduction.        (line  19)
14956 * Meyering, Jim:                         Authors of get_date. (line   6)
14957 * midnight in date strings:              Time of day items.   (line  22)
14958 * min:                                   Special.             (line   7)
14959 * minute in date strings:                Relative items in date strings.
14960                                                               (line  15)
14961 * minutes, time zone correction by:      Time of day items.   (line  30)
14962 * MIT AI lab:                            su invocation.       (line  92)
14963 * mkdir:                                 mkdir invocation.    (line   6)
14964 * mkfifo:                                mkfifo invocation.   (line   6)
14965 * mknod:                                 mknod invocation.    (line   6)
14966 * modem control:                         Control.             (line  33)
14967 * modes and umask:                       Umask and Protection.
14968                                                               (line   6)
14969 * modes of created directories, setting: mkdir invocation.    (line  19)
14970 * modes of created FIFOs, setting:       mkfifo invocation.   (line  21)
14971 * modification time, sorting files by:   Sorting the output.  (line  36)
14972 * modified command invocation:           Modified command invocation.
14973                                                               (line   6)
14974 * modified environment, running a program in a: env invocation.
14975                                                               (line   6)
14976 * modify time, changing:                 touch invocation.    (line  73)
14977 * month in date strings:                 Relative items in date strings.
14978                                                               (line  15)
14979 * month names in date strings:           Calendar date items. (line  38)
14980 * months, sorting by:                    sort invocation.     (line 131)
14981 * months, written-out:                   General date syntax. (line  36)
14982 * MS-DOS file system:                    df invocation.       (line 133)
14983 * mtime, changing:                       touch invocation.    (line  73)
14984 * multicolumn output, generating:        pr invocation.       (line   6)
14985 * multiple changes to permissions:       Multiple Changes.    (line   6)
14986 * multiplication:                        Numeric expressions. (line  15)
14987 * multipliers after numbers:             dd invocation.       (line 204)
14988 * mv:                                    mv invocation.       (line   6)
14989 * name follow option:                    tail invocation.     (line  41)
14990 * name of kernel:                        uname invocation.    (line  65)
14991 * named pipe check:                      File type tests.     (line  28)
14992 * named pipes, creating:                 mkfifo invocation.   (line   6)
14993 * network node name:                     uname invocation.    (line  46)
14994 * never interactive option:              rm invocation.       (line  52)
14995 * newer files, copying only:             cp invocation.       (line 277)
14996 * newer files, moving only:              mv invocation.       (line  76)
14997 * newer-than file check:                 File characteristic tests.
14998                                                               (line  15)
14999 * newline echoing after kill:            Local.               (line  26)
15000 * newline, echoing:                      Local.               (line  29)
15001 * newline, translating to crlf:          Output.              (line  19)
15002 * newline, translating to return:        Input.               (line  26)
15003 * next DAY <1>:                          Day of week items.   (line  15)
15004 * next DAY:                              Options for date.    (line  11)
15005 * next in date strings:                  General date syntax. (line  26)
15006 * NFS file system type:                  df invocation.       (line 120)
15007 * NFS mounts from BSD to HP-UX <1>:      du invocation.       (line 206)
15008 * NFS mounts from BSD to HP-UX:          What information is listed.
15009                                                               (line 250)
15010 * nice:                                  nice invocation.     (line   6)
15011 * niceness:                              nice invocation.     (line   6)
15012 * nl <1>:                                Combination.         (line  18)
15013 * nl:                                    nl invocation.       (line   6)
15014 * nlN:                                   Output.              (line  39)
15015 * no-op:                                 true invocation.     (line   6)
15016 * noatime:                               dd invocation.       (line 171)
15017 * nocreat:                               dd invocation.       (line 103)
15018 * noctty:                                dd invocation.       (line 176)
15019 * node name:                             uname invocation.    (line  46)
15020 * noerror:                               dd invocation.       (line 100)
15021 * noflsh:                                Local.               (line  32)
15022 * nofollow:                              dd invocation.       (line 182)
15023 * nohup:                                 nohup invocation.    (line   6)
15024 * nohup.out:                             nohup invocation.    (line   6)
15025 * nolinks:                               dd invocation.       (line 185)
15026 * non-directories, copying as special files: cp invocation.   (line  76)
15027 * non-directory suffix, stripping:       dirname invocation.  (line   6)
15028 * nonblock:                              dd invocation.       (line 168)
15029 * nonblocking I/O:                       dd invocation.       (line 168)
15030 * none backup method:                    Backup options.      (line  31)
15031 * none color option:                     General output formatting.
15032                                                               (line  23)
15033 * none, sorting option for ls:           Sorting the output.  (line  49)
15034 * nonempty file check:                   File characteristic tests.
15035                                                               (line  12)
15036 * nonprinting characters, ignoring:      sort invocation.     (line 125)
15037 * nonzero-length string check:           String tests.        (line  19)
15038 * noon in date strings:                  Time of day items.   (line  22)
15039 * not-equal string check:                String tests.        (line  25)
15040 * notrunc:                               dd invocation.       (line 113)
15041 * now in date strings:                   Relative items in date strings.
15042                                                               (line  33)
15043 * numbered backup method:                Backup options.      (line  35)
15044 * numbering lines:                       nl invocation.       (line   6)
15045 * numbers, written-out:                  General date syntax. (line  26)
15046 * numeric expressions:                   Numeric expressions. (line   6)
15047 * numeric field padding:                 Padding and other flags.
15048                                                               (line   6)
15049 * numeric modes:                         Numeric Modes.       (line   6)
15050 * numeric operations:                    Numeric operations.  (line   6)
15051 * numeric sequences:                     seq invocation.      (line   6)
15052 * numeric sort:                          sort invocation.     (line 140)
15053 * numeric tests:                         Numeric tests.       (line   6)
15054 * numeric uid and gid:                   What information is listed.
15055                                                               (line 232)
15056 * numeric user and group IDs:            What information is listed.
15057                                                               (line 232)
15058 * obs:                                   dd invocation.       (line  29)
15059 * ocrnl:                                 Output.              (line  16)
15060 * octal dump of files:                   od invocation.       (line   6)
15061 * octal numbers for file modes:          Numeric Modes.       (line   6)
15062 * od:                                    od invocation.       (line   6)
15063 * odd parity:                            Control.             (line  13)
15064 * oddp:                                  Combination.         (line  14)
15065 * of:                                    dd invocation.       (line  20)
15066 * ofdel:                                 Output.              (line  34)
15067 * ofill:                                 Output.              (line  30)
15068 * oflag:                                 dd invocation.       (line 134)
15069 * olcuc:                                 Output.              (line  12)
15070 * older-than file check:                 File characteristic tests.
15071                                                               (line  19)
15072 * once interactive option:               rm invocation.       (line  54)
15073 * one file system, restricting du to:    du invocation.       (line 191)
15074 * one file system, restricting rm to:    rm invocation.       (line  63)
15075 * one-line output format:                df invocation.       (line  74)
15076 * onlcr:                                 Output.              (line  19)
15077 * onlret:                                Output.              (line  27)
15078 * onocr:                                 Output.              (line  23)
15079 * operating on characters:               Operating on characters.
15080                                                               (line   6)
15081 * operating on sorted files:             Operating on sorted files.
15082                                                               (line   6)
15083 * operating system name:                 uname invocation.    (line  57)
15084 * opost:                                 Output.              (line   9)
15085 * option delimiter:                      Common options.      (line  36)
15086 * options for date:                      Options for date.    (line   6)
15087 * or operator <1>:                       Relations for expr.  (line  11)
15088 * or operator:                           Connectives for test.
15089                                                               (line  15)
15090 * ordinal numbers:                       General date syntax. (line  26)
15091 * ospeed:                                Special.             (line  19)
15092 * other permissions:                     Setting Permissions. (line  29)
15093 * output block size:                     dd invocation.       (line  29)
15094 * output file name prefix <1>:           csplit invocation.   (line  62)
15095 * output file name prefix:               split invocation.    (line  14)
15096 * output file name suffix:               csplit invocation.   (line  66)
15097 * output format:                         stat invocation.     (line  28)
15098 * output format, portable:               df invocation.       (line  74)
15099 * output null-byte-terminated lines:     du invocation.       (line 117)
15100 * output of entire files:                Output of entire files.
15101                                                               (line   6)
15102 * output of parts of files:              Output of parts of files.
15103                                                               (line   6)
15104 * output settings:                       Output.              (line   6)
15105 * output tabs:                           pr invocation.       (line 140)
15106 * overwriting of input, allowed <1>:     shuf invocation.     (line  37)
15107 * overwriting of input, allowed:         sort invocation.     (line 213)
15108 * owned by effective group ID check:     Access permission tests.
15109                                                               (line  31)
15110 * owned by effective user ID check:      Access permission tests.
15111                                                               (line  28)
15112 * owner of file, permissions for:        Setting Permissions. (line  23)
15113 * owner, default:                        Mode Structure.      (line  31)
15114 * ownership of installed files, setting: install invocation.  (line  72)
15115 * p for FIFO file:                       mknod invocation.    (line  23)
15116 * pad character:                         Output.              (line  34)
15117 * pad instead of timing for delaying:    Output.              (line  30)
15118 * padding of numeric fields:             Padding and other flags.
15119                                                               (line   6)
15120 * paragraphs, reformatting:              fmt invocation.      (line   6)
15121 * parenb:                                Control.             (line   9)
15122 * parent directories and cp:             cp invocation.       (line 177)
15123 * parent directories, creating:          mkdir invocation.    (line  34)
15124 * parent directories, creating missing:  install invocation.  (line  48)
15125 * parent directories, removing:          rmdir invocation.    (line  22)
15126 * parentheses for grouping:              expr invocation.     (line  31)
15127 * parity:                                Combination.         (line  10)
15128 * parity errors, marking:                Input.               (line  16)
15129 * parity, ignoring:                      Input.               (line  13)
15130 * parmrk:                                Input.               (line  16)
15131 * parodd:                                Control.             (line  13)
15132 * parsing date strings:                  Options for date.    (line  11)
15133 * parts of files, output of:             Output of parts of files.
15134                                                               (line   6)
15135 * pass8:                                 Combination.         (line  55)
15136 * passwd entry, and su shell:            su invocation.       (line  12)
15137 * paste:                                 paste invocation.    (line   6)
15138 * Paterson, R.:                          Introduction.        (line  19)
15139 * PATH <1>:                              su invocation.       (line  53)
15140 * PATH:                                  env invocation.      (line  24)
15141 * pathchk:                               pathchk invocation.  (line   6)
15142 * pattern matching:                      String expressions.  (line  11)
15143 * PC file system:                        df invocation.       (line 133)
15144 * pcfs:                                  df invocation.       (line 133)
15145 * pebibyte, definition of:               Block size.          (line 113)
15146 * permission tests:                      Access permission tests.
15147                                                               (line   6)
15148 * permissions of installed files, setting: install invocation.
15149                                                               (line  60)
15150 * permissions, changing access:          chmod invocation.    (line   6)
15151 * permissions, copying existing:         Copying Permissions. (line   6)
15152 * permissions, for changing file timestamps: touch invocation.
15153                                                               (line  16)
15154 * permissions, output by ls:             What information is listed.
15155                                                               (line 190)
15156 * petabyte, definition of:               Block size.          (line 109)
15157 * phone directory order:                 sort invocation.     (line  85)
15158 * pieces, splitting a file into:         split invocation.    (line   6)
15159 * Pinard, F. <1>:                        Authors of get_date. (line  14)
15160 * Pinard, F.:                            Introduction.        (line  19)
15161 * pipe fitting:                          tee invocation.      (line   6)
15162 * Plass, Michael F.:                     fmt invocation.      (line  19)
15163 * platform, hardware:                    uname invocation.    (line  35)
15164 * pm in date strings:                    Time of day items.   (line  22)
15165 * portable file names, checking for:     pathchk invocation.  (line   6)
15166 * portable output format:                df invocation.       (line  74)
15167 * POSIX:                                 Introduction.        (line  11)
15168 * POSIX output format:                   df invocation.       (line  74)
15169 * POSIXLY_CORRECT <1>:                   printf invocation.   (line  42)
15170 * POSIXLY_CORRECT <2>:                   echo invocation.     (line  68)
15171 * POSIXLY_CORRECT <3>:                   dd invocation.       (line 237)
15172 * POSIXLY_CORRECT <4>:                   sort invocation.     (line 221)
15173 * POSIXLY_CORRECT <5>:                   tail invocation.     (line  75)
15174 * POSIXLY_CORRECT <6>:                   pr invocation.       (line 107)
15175 * POSIXLY_CORRECT <7>:                   Standards conformance.
15176                                                               (line   6)
15177 * POSIXLY_CORRECT:                       Common options.      (line  11)
15178 * POSIXLY_CORRECT, and block size:       Block size.          (line  12)
15179 * pr:                                    pr invocation.       (line   6)
15180 * prime factors:                         factor invocation.   (line   6)
15181 * print:                                 Character sets.      (line 112)
15182 * print name of current directory:       pwd invocation.      (line   6)
15183 * print system information:              uname invocation.    (line   6)
15184 * print terminal file name:              tty invocation.      (line   6)
15185 * printenv:                              printenv invocation. (line   6)
15186 * printf:                                printf invocation.   (line   6)
15187 * printing all or some environment variables: printenv invocation.
15188                                                               (line   6)
15189 * printing color database:               dircolors invocation.
15190                                                               (line  38)
15191 * printing current user information:     who invocation.      (line   6)
15192 * printing current usernames:            users invocation.    (line   6)
15193 * printing groups a user is in:          groups invocation.   (line   6)
15194 * printing real and effective user and group IDs: id invocation.
15195                                                               (line   6)
15196 * printing text:                         echo invocation.     (line   6)
15197 * printing text, commands for:           Printing text.       (line   6)
15198 * printing the current time:             date invocation.     (line   6)
15199 * printing the effective user ID:        whoami invocation.   (line   6)
15200 * printing the host identifier:          hostid invocation.   (line   6)
15201 * printing the hostname:                 hostname invocation. (line   6)
15202 * printing user's login name:            logname invocation.  (line   6)
15203 * printing, preparing files for:         pr invocation.       (line   6)
15204 * processes, commands for controlling:   Process control.     (line   6)
15205 * prompting, and ln:                     ln invocation.       (line  71)
15206 * prompting, and mv:                     mv invocation.       (line  34)
15207 * prompting, and rm:                     rm invocation.       (line  11)
15208 * prompts, forcing:                      mv invocation.       (line  59)
15209 * prompts, omitting:                     mv invocation.       (line  55)
15210 * prterase:                              Local.               (line  46)
15211 * ptx:                                   ptx invocation.      (line   6)
15212 * punct:                                 Character sets.      (line 115)
15213 * pure numbers in date strings:          Pure numbers in date strings.
15214                                                               (line   6)
15215 * pwd:                                   pwd invocation.      (line   6)
15216 * quit:                                  Characters.          (line  23)
15217 * quoting style:                         Formatting the file names.
15218                                                               (line  34)
15219 * radix for file offsets:                od invocation.       (line  36)
15220 * random sort:                           sort invocation.     (line 162)
15221 * random source for shredding:           shred invocation.    (line 112)
15222 * random source for shuffling:           shuf invocation.     (line  43)
15223 * random source for sorting:             sort invocation.     (line 226)
15224 * random sources:                        Random sources.      (line   6)
15225 * ranges:                                Character sets.      (line  50)
15226 * raw:                                   Combination.         (line  43)
15227 * read errors, ignoring:                 dd invocation.       (line 100)
15228 * read from stdin and write to stdout and files: tee invocation.
15229                                                               (line   6)
15230 * read permission:                       Mode Structure.      (line  12)
15231 * read permission, symbolic:             Setting Permissions. (line  57)
15232 * read system call, and holes:           cp invocation.       (line 216)
15233 * readable file check:                   Access permission tests.
15234                                                               (line  15)
15235 * readlink:                              readlink invocation. (line   6)
15236 * real user and group IDs, printing:     id invocation.       (line   6)
15237 * recursive directory listing:           Which files are listed.
15238                                                               (line  90)
15239 * recursively changing access permissions: chmod invocation.  (line  69)
15240 * recursively changing file ownership:   chown invocation.    (line 140)
15241 * recursively changing group ownership:  chgrp invocation.    (line  66)
15242 * recursively copying directories:       cp invocation.       (line  76)
15243 * redirection:                           Redirection.         (line   6)
15244 * reformatting paragraph text:           fmt invocation.      (line   6)
15245 * regular expression matching:           String expressions.  (line  11)
15246 * regular file check:                    File type tests.     (line  19)
15247 * relations, numeric or string:          Relations for expr.  (line   6)
15248 * relative items in date strings:        Relative items in date strings.
15249                                                               (line   6)
15250 * release of kernel:                     uname invocation.    (line  61)
15251 * remainder:                             Numeric expressions. (line  15)
15252 * remote hostname:                       who invocation.      (line  11)
15253 * removing empty directories:            rmdir invocation.    (line   6)
15254 * removing files after shredding:        shred invocation.    (line 123)
15255 * removing files or directories:         rm invocation.       (line   6)
15256 * removing files or directories (via the unlink syscall): unlink invocation.
15257                                                               (line   6)
15258 * removing permissions:                  Setting Permissions. (line  42)
15259 * repeated characters:                   Character sets.      (line  71)
15260 * repeated lines, outputting:            uniq invocation.     (line  63)
15261 * repeated output of a string:           yes invocation.      (line   6)
15262 * restricted deletion flag:              Mode Structure.      (line  56)
15263 * restricted shell:                      su invocation.       (line  64)
15264 * return, ignoring:                      Input.               (line  29)
15265 * return, translating to newline <1>:    Output.              (line  16)
15266 * return, translating to newline:        Input.               (line  32)
15267 * reverse sorting <1>:                   Sorting the output.  (line  27)
15268 * reverse sorting:                       sort invocation.     (line 157)
15269 * reversing files:                       tac invocation.      (line   6)
15270 * rm:                                    rm invocation.       (line   6)
15271 * rmdir:                                 rmdir invocation.    (line   6)
15272 * rn format for nl:                      nl invocation.       (line 101)
15273 * root as default owner:                 install invocation.  (line  72)
15274 * root directory, allow recursive destruction: rm invocation. (line  84)
15275 * root directory, allow recursive modification <1>: chmod invocation.
15276                                                               (line  54)
15277 * root directory, allow recursive modification <2>: chgrp invocation.
15278                                                               (line  48)
15279 * root directory, allow recursive modification: chown invocation.
15280                                                               (line 121)
15281 * root directory, disallow recursive destruction: rm invocation.
15282                                                               (line  79)
15283 * root directory, disallow recursive modification <1>: chmod invocation.
15284                                                               (line  49)
15285 * root directory, disallow recursive modification <2>: chgrp invocation.
15286                                                               (line  43)
15287 * root directory, disallow recursive modification: chown invocation.
15288                                                               (line 116)
15289 * root directory, running a program in a specified: chroot invocation.
15290                                                               (line   6)
15291 * root, becoming:                        su invocation.       (line   6)
15292 * rows:                                  Special.             (line  22)
15293 * rprnt:                                 Characters.          (line  56)
15294 * RTS/CTS flow control:                  Control.             (line  36)
15295 * running a program in a modified environment: env invocation.
15296                                                               (line   6)
15297 * running a program in a specified root directory: chroot invocation.
15298                                                               (line   6)
15299 * rz format for nl:                      nl invocation.       (line 104)
15300 * Salz, Rich:                            Authors of get_date. (line   6)
15301 * same file check:                       File characteristic tests.
15302                                                               (line  23)
15303 * sane:                                  Combination.         (line  26)
15304 * scheduling, affecting:                 nice invocation.     (line   6)
15305 * screen columns:                        fold invocation.     (line  14)
15306 * seconds since the epoch:               Time conversion specifiers.
15307                                                               (line  41)
15308 * section delimiters of pages:           nl invocation.       (line  68)
15309 * seek:                                  dd invocation.       (line  46)
15310 * self-backups:                          cp invocation.       (line  42)
15311 * send a signal to processes:            kill invocation.     (line   6)
15312 * sentences and line-breaking:           fmt invocation.      (line  19)
15313 * separator for numbers in seq:          seq invocation.      (line  42)
15314 * seq:                                   seq invocation.      (line   6)
15315 * sequence of numbers:                   seq invocation.      (line   6)
15316 * set-group-ID:                          Mode Structure.      (line  49)
15317 * set-group-ID check:                    Access permission tests.
15318                                                               (line   9)
15319 * set-user-ID:                           Mode Structure.      (line  42)
15320 * set-user-ID check:                     Access permission tests.
15321                                                               (line  18)
15322 * setgid:                                Mode Structure.      (line  49)
15323 * setting permissions:                   Setting Permissions. (line  46)
15324 * setting the hostname:                  hostname invocation. (line   6)
15325 * setting the time:                      Setting the time.    (line   6)
15326 * setuid:                                Mode Structure.      (line  42)
15327 * setup for color:                       dircolors invocation.
15328                                                               (line   6)
15329 * sh syntax for color setup:             dircolors invocation.
15330                                                               (line  27)
15331 * SHA-1:                                 sha1sum invocation.  (line   6)
15332 * SHA-2:                                 sha2 utilities.      (line   6)
15333 * sha1sum:                               sha1sum invocation.  (line   6)
15334 * sha224sum:                             sha2 utilities.      (line   6)
15335 * sha256sum:                             sha2 utilities.      (line   6)
15336 * sha384sum:                             sha2 utilities.      (line   6)
15337 * sha512sum:                             sha2 utilities.      (line   6)
15338 * SHELL:                                 su invocation.       (line  18)
15339 * SHELL environment variable, and color: dircolors invocation.
15340                                                               (line  16)
15341 * shell utilities:                       Top.                 (line  19)
15342 * shred:                                 shred invocation.    (line   6)
15343 * shuf:                                  shuf invocation.     (line   6)
15344 * shuffling files:                       shuf invocation.     (line   6)
15345 * SI output <1>:                         du invocation.       (line 123)
15346 * SI output <2>:                         df invocation.       (line  93)
15347 * SI output <3>:                         What information is listed.
15348                                                               (line 258)
15349 * SI output:                             Block size.          (line  43)
15350 * simple backup method:                  Backup options.      (line  44)
15351 * SIMPLE_BACKUP_SUFFIX:                  Backup options.      (line  50)
15352 * single-column output of files:         General output formatting.
15353                                                               (line  10)
15354 * size:                                  Special.             (line  30)
15355 * size for main memory sorting:          sort invocation.     (line 237)
15356 * size of file to shred:                 shred invocation.    (line 117)
15357 * size of files, reporting:              What information is listed.
15358                                                               (line 242)
15359 * size of files, sorting files by:       Sorting the output.  (line  32)
15360 * skip:                                  dd invocation.       (line  43)
15361 * sleep:                                 sleep invocation.    (line   6)
15362 * socket check:                          File type tests.     (line  31)
15363 * software flow control:                 Input.               (line  43)
15364 * sort:                                  sort invocation.     (line   6)
15365 * sort field:                            sort invocation.     (line 193)
15366 * sort stability:                        sort invocation.     (line  38)
15367 * sort zero-terminated lines <1>:        shuf invocation.     (line  48)
15368 * sort zero-terminated lines:            sort invocation.     (line 296)
15369 * sort's last-resort comparison:         sort invocation.     (line  38)
15370 * sorted files, operations on:           Operating on sorted files.
15371                                                               (line   6)
15372 * sorting files:                         sort invocation.     (line   6)
15373 * sorting ls output:                     Sorting the output.  (line   6)
15374 * space:                                 Character sets.      (line 118)
15375 * sparse files, copying:                 cp invocation.       (line 216)
15376 * special characters:                    Characters.          (line   6)
15377 * special file types:                    Special file types.  (line   6)
15378 * special files:                         mknod invocation.    (line  11)
15379 * special settings:                      Special.             (line   6)
15380 * specifying sets of characters:         Character sets.      (line   6)
15381 * speed:                                 Special.             (line  40)
15382 * split:                                 split invocation.    (line   6)
15383 * splitting a file into pieces:          split invocation.    (line   6)
15384 * splitting a file into pieces by context: csplit invocation. (line   6)
15385 * squeezing blank lines:                 cat invocation.      (line  35)
15386 * squeezing repeat characters:           Squeezing.           (line   6)
15387 * Stallman, R.:                          Introduction.        (line  19)
15388 * standard input:                        Common options.      (line  41)
15389 * standard output:                       Common options.      (line  41)
15390 * start:                                 Characters.          (line  44)
15391 * stat:                                  stat invocation.     (line   6)
15392 * status time, printing or sorting by:   Sorting the output.  (line  13)
15393 * status time, show the most recent:     du invocation.       (line 144)
15394 * sticky:                                Mode Structure.      (line  56)
15395 * sticky bit check:                      Access permission tests.
15396                                                               (line  12)
15397 * stop:                                  Characters.          (line  47)
15398 * stop bits:                             Control.             (line  27)
15399 * strftime and date:                     date invocation.     (line  20)
15400 * string constants, outputting:          od invocation.       (line  68)
15401 * string expressions:                    String expressions.  (line   6)
15402 * string tests:                          String tests.        (line   6)
15403 * strip directory and suffix from file names: basename invocation.
15404                                                               (line   6)
15405 * stripping non-directory suffix:        dirname invocation.  (line   6)
15406 * stripping symbol table information:    install invocation.  (line  88)
15407 * stripping trailing slashes <1>:        mv invocation.       (line  89)
15408 * stripping trailing slashes:            cp invocation.       (line 250)
15409 * stty:                                  stty invocation.     (line   6)
15410 * su:                                    su invocation.       (line   6)
15411 * substitute user and group IDs:         su invocation.       (line   6)
15412 * substr:                                String expressions.  (line  40)
15413 * subtracting permissions:               Setting Permissions. (line  42)
15414 * subtraction:                           Numeric expressions. (line  11)
15415 * successful exit:                       true invocation.     (line   6)
15416 * suffix, stripping from file names:     basename invocation. (line   6)
15417 * sum:                                   sum invocation.      (line   6)
15418 * summarizing files:                     Summarizing files.   (line   6)
15419 * super-user, becoming:                  su invocation.       (line   6)
15420 * superblock, writing:                   sync invocation.     (line   6)
15421 * supplementary groups, printing:        groups invocation.   (line   6)
15422 * susp:                                  Characters.          (line  50)
15423 * swab (byte-swapping):                  dd invocation.       (line  95)
15424 * swap space, saving text image in:      Mode Structure.      (line  56)
15425 * swtch:                                 Characters.          (line  41)
15426 * symbol table information, stripping:   install invocation.  (line  88)
15427 * symbolic (soft) links, creating:       ln invocation.       (line   6)
15428 * symbolic link check:                   File type tests.     (line  23)
15429 * symbolic link to directory, controlling traversal of: Traversing symlinks.
15430                                                               (line   6)
15431 * symbolic link to directory, never traverse <1>: chgrp invocation.
15432                                                               (line  79)
15433 * symbolic link to directory, never traverse <2>: chown invocation.
15434                                                               (line 152)
15435 * symbolic link to directory, never traverse: Traversing symlinks.
15436                                                               (line  26)
15437 * symbolic link to directory, traverse each that is encountered <1>: chgrp invocation.
15438                                                               (line  75)
15439 * symbolic link to directory, traverse each that is encountered <2>: chown invocation.
15440                                                               (line 148)
15441 * symbolic link to directory, traverse each that is encountered: Traversing symlinks.
15442                                                               (line  22)
15443 * symbolic link to directory, traverse each that is specified on the command line <1>: chgrp invocation.
15444                                                               (line  70)
15445 * symbolic link to directory, traverse each that is specified on the command line <2>: chown invocation.
15446                                                               (line 143)
15447 * symbolic link to directory, traverse each that is specified on the command line: Traversing symlinks.
15448                                                               (line  18)
15449 * symbolic link, defined:                ln invocation.       (line  40)
15450 * symbolic links and pwd:                pwd invocation.      (line   6)
15451 * symbolic links, changing group:        chgrp invocation.    (line  35)
15452 * symbolic links, changing owner <1>:    chgrp invocation.    (line  30)
15453 * symbolic links, changing owner:        chown invocation.    (line  80)
15454 * symbolic links, copying:               cp invocation.       (line  89)
15455 * symbolic links, copying with:          cp invocation.       (line 255)
15456 * symbolic links, dereferencing:         Which files are listed.
15457                                                               (line  36)
15458 * symbolic links, dereferencing in du:   du invocation.       (line  96)
15459 * symbolic links, dereferencing in stat: stat invocation.     (line  17)
15460 * symbolic links, following:             dd invocation.       (line 182)
15461 * symbolic links, permissions of:        chmod invocation.    (line  10)
15462 * symbolic modes:                        Symbolic Modes.      (line   6)
15463 * sync <1>:                              sync invocation.     (line   6)
15464 * sync:                                  dd invocation.       (line 165)
15465 * sync (padding with nulls):             dd invocation.       (line 116)
15466 * synchronize disk and memory:           sync invocation.     (line   6)
15467 * synchronized data and metadata I/O:    dd invocation.       (line 165)
15468 * synchronized data and metadata writes, before finishing: dd invocation.
15469                                                               (line 125)
15470 * synchronized data reads:               dd invocation.       (line 157)
15471 * synchronized data writes, before finishing: dd invocation.  (line 121)
15472 * syslog:                                su invocation.       (line  29)
15473 * system context:                        System context.      (line   6)
15474 * system information, printing:          uname invocation.    (line   6)
15475 * system name, printing:                 hostname invocation. (line   6)
15476 * System V sum:                          sum invocation.      (line  31)
15477 * tab stops, setting:                    expand invocation.   (line  22)
15478 * tabN:                                  Output.              (line  51)
15479 * tabs:                                  Combination.         (line  66)
15480 * tabs to spaces, converting:            expand invocation.   (line   6)
15481 * tac:                                   tac invocation.      (line   6)
15482 * tagged paragraphs:                     fmt invocation.      (line  40)
15483 * tail:                                  tail invocation.     (line   6)
15484 * tandem:                                Input.               (line  43)
15485 * target directory <1>:                  ln invocation.       (line 105)
15486 * target directory <2>:                  mv invocation.       (line  99)
15487 * target directory <3>:                  install invocation.  (line  97)
15488 * target directory <4>:                  cp invocation.       (line 268)
15489 * target directory:                      Target directory.    (line   6)
15490 * tebibyte, definition of:               Block size.          (line 106)
15491 * tee:                                   tee invocation.      (line   6)
15492 * telephone directory order:             sort invocation.     (line  85)
15493 * temporary directory:                   sort invocation.     (line 273)
15494 * terabyte, definition of:               Block size.          (line 102)
15495 * TERM:                                  su invocation.       (line  53)
15496 * terminal check:                        File type tests.     (line  34)
15497 * terminal file name, printing:          tty invocation.      (line   6)
15498 * terminal lines, currently used:        who invocation.      (line  11)
15499 * terminal settings:                     stty invocation.     (line   6)
15500 * terminal, using color iff:             General output formatting.
15501                                                               (line  25)
15502 * terse output:                          stat invocation.     (line  48)
15503 * test:                                  test invocation.     (line   6)
15504 * text:                                  dd invocation.       (line 192)
15505 * text I/O:                              dd invocation.       (line 192)
15506 * text image, saving in swap space:      Mode Structure.      (line  56)
15507 * text input files:                      md5sum invocation.   (line  79)
15508 * text utilities:                        Top.                 (line  19)
15509 * text, displaying:                      echo invocation.     (line   6)
15510 * text, reformatting:                    fmt invocation.      (line   6)
15511 * this in date strings:                  Relative items in date strings.
15512                                                               (line  33)
15513 * time <1>:                              Special.             (line  11)
15514 * time:                                  touch invocation.    (line  58)
15515 * time conversion specifiers:            Time conversion specifiers.
15516                                                               (line   6)
15517 * time formats <1>:                      date invocation.     (line  20)
15518 * time formats:                          pr invocation.       (line 100)
15519 * time of day item:                      Time of day items.   (line   6)
15520 * time setting:                          Setting the time.    (line   6)
15521 * time style <1>:                        du invocation.       (line 153)
15522 * time style:                            Formatting file timestamps.
15523                                                               (line  26)
15524 * time units:                            sleep invocation.    (line  11)
15525 * time zone correction:                  Time of day items.   (line  30)
15526 * time zone item <1>:                    Time zone items.     (line   6)
15527 * time zone item:                        General date syntax. (line  44)
15528 * time, printing or setting:             date invocation.     (line   6)
15529 * TIME_STYLE <1>:                        du invocation.       (line 181)
15530 * TIME_STYLE:                            Formatting file timestamps.
15531                                                               (line 106)
15532 * timestamps of installed files, preserving: install invocation.
15533                                                               (line  78)
15534 * timestamps, changing file:             touch invocation.    (line   6)
15535 * TMPDIR:                                sort invocation.     (line  64)
15536 * today in date strings:                 Relative items in date strings.
15537                                                               (line  33)
15538 * tomorrow:                              Options for date.    (line  11)
15539 * tomorrow in date strings:              Relative items in date strings.
15540                                                               (line  29)
15541 * topological sort:                      tsort invocation.    (line   6)
15542 * tostop:                                Local.               (line  41)
15543 * total counts:                          wc invocation.       (line  12)
15544 * touch:                                 touch invocation.    (line   6)
15545 * tr:                                    tr invocation.       (line   6)
15546 * trailing slashes:                      Trailing slashes.    (line   6)
15547 * translating characters:                Translating.         (line   6)
15548 * true:                                  true invocation.     (line   6)
15549 * truncating output file, avoiding:      dd invocation.       (line 113)
15550 * tsort:                                 tsort invocation.    (line   6)
15551 * tty:                                   tty invocation.      (line   6)
15552 * Twenex:                                su invocation.       (line  92)
15553 * two-way parity:                        Control.             (line   9)
15554 * type size:                             od invocation.       (line 113)
15555 * TZ <1>:                                Specifying time zone rules.
15556                                                               (line   6)
15557 * TZ <2>:                                Options for date.    (line  83)
15558 * TZ <3>:                                date invocation.     (line  16)
15559 * TZ <4>:                                who invocation.      (line  26)
15560 * TZ <5>:                                stat invocation.     (line 131)
15561 * TZ <6>:                                touch invocation.    (line  37)
15562 * TZ <7>:                                Formatting file timestamps.
15563                                                               (line  18)
15564 * TZ:                                    pr invocation.       (line 113)
15565 * u, and disabling special characters:   Characters.          (line  13)
15566 * ucase, converting to:                  dd invocation.       (line  90)
15567 * ufs file system type:                  df invocation.       (line 125)
15568 * umask and modes:                       Umask and Protection.
15569                                                               (line   6)
15570 * uname:                                 uname invocation.    (line   6)
15571 * unblock:                               dd invocation.       (line  81)
15572 * unexpand:                              unexpand invocation. (line   6)
15573 * Unicode:                               printf invocation.   (line  62)
15574 * uniq:                                  uniq invocation.     (line   6)
15575 * unique lines, outputting:              uniq invocation.     (line  98)
15576 * uniquify files:                        uniq invocation.     (line   6)
15577 * uniquifying output:                    sort invocation.     (line 282)
15578 * unlink:                                unlink invocation.   (line   6)
15579 * unprintable characters, ignoring:      sort invocation.     (line 125)
15580 * unsorted directory listing:            Sorting the output.  (line  20)
15581 * upper:                                 Character sets.      (line 121)
15582 * uppercase, translating to lowercase:   Input.               (line  48)
15583 * use time, changing:                    touch invocation.    (line  50)
15584 * use time, printing or sorting files by: Sorting the output. (line  13)
15585 * use time, show the most recent:        du invocation.       (line 144)
15586 * USER:                                  su invocation.       (line  18)
15587 * user ID, switching:                    su invocation.       (line   6)
15588 * user IDs, disambiguating:              Disambiguating names and IDs.
15589                                                               (line   6)
15590 * user information, commands for:        User information.    (line   6)
15591 * user name, printing:                   logname invocation.  (line   6)
15592 * user names, disambiguating:            Disambiguating names and IDs.
15593                                                               (line   6)
15594 * usernames, printing current:           users invocation.    (line   6)
15595 * users:                                 users invocation.    (line   6)
15596 * UTC:                                   Options for date.    (line  83)
15597 * utmp <1>:                              who invocation.      (line  15)
15598 * utmp <2>:                              users invocation.    (line  14)
15599 * utmp:                                  logname invocation.  (line   6)
15600 * valid file names, checking for:        pathchk invocation.  (line   6)
15601 * variable-length records, converting to fixed-length: dd invocation.
15602                                                               (line  38)
15603 * vdir:                                  vdir invocation.     (line   6)
15604 * verbose ls format:                     What information is listed.
15605                                                               (line 130)
15606 * verifying MD5 checksums:               md5sum invocation.   (line  69)
15607 * version number, finding:               Common options.      (line  33)
15608 * version of kernel:                     uname invocation.    (line  76)
15609 * version, sorting option for ls:        Sorting the output.  (line  56)
15610 * version-control Emacs variable:        Backup options.      (line  24)
15611 * VERSION_CONTROL <1>:                   ln invocation.       (line  55)
15612 * VERSION_CONTROL <2>:                   mv invocation.       (line  50)
15613 * VERSION_CONTROL <3>:                   install invocation.  (line  40)
15614 * VERSION_CONTROL <4>:                   cp invocation.       (line  61)
15615 * VERSION_CONTROL:                       Backup options.      (line  13)
15616 * vertical sorted files in columns:      General output formatting.
15617                                                               (line  15)
15618 * vtN:                                   Output.              (line  59)
15619 * wc:                                    wc invocation.       (line   6)
15620 * week in date strings:                  Relative items in date strings.
15621                                                               (line  15)
15622 * werase:                                Characters.          (line  59)
15623 * wheel group, not supported:            su invocation.       (line  87)
15624 * who:                                   who invocation.      (line   6)
15625 * who am i:                              who invocation.      (line  21)
15626 * whoami:                                whoami invocation.   (line   6)
15627 * word count:                            wc invocation.       (line   6)
15628 * working context:                       Working context.     (line   6)
15629 * working directory, printing:           pwd invocation.      (line   6)
15630 * wrap data:                             base64 invocation.   (line  21)
15631 * wrapping long input lines:             fold invocation.     (line   6)
15632 * writable file check:                   Access permission tests.
15633                                                               (line  21)
15634 * write permission:                      Mode Structure.      (line  15)
15635 * write permission, symbolic:            Setting Permissions. (line  60)
15636 * write, allowed:                        who invocation.      (line  86)
15637 * wtmp <1>:                              who invocation.      (line  15)
15638 * wtmp:                                  users invocation.    (line  14)
15639 * xcase:                                 Local.               (line  36)
15640 * xdigit:                                Character sets.      (line 124)
15641 * XON/XOFF flow control:                 Input.               (line  38)
15642 * year in date strings:                  Relative items in date strings.
15643                                                               (line  15)
15644 * yes:                                   yes invocation.      (line   6)
15645 * yesterday:                             Options for date.    (line  11)
15646 * yesterday in date strings:             Relative items in date strings.
15647                                                               (line  29)
15648 * yottabyte, definition of:              Block size.          (line 131)
15649 * Youmans, B.:                           Introduction.        (line  19)
15650 * zero-length string check:              String tests.        (line  15)
15651 * zettabyte, definition of:              Block size.          (line 123)
15652 * |:                                     Relations for expr.  (line  11)
15653
15654
15655 \1f
15656 Tag Table:
15657 Node: Top\7f7718
15658 Node: Introduction\7f20818
15659 Node: Common options\7f22377
15660 Node: Exit status\7f25162
15661 Node: Backup options\7f25892
15662 Node: Block size\7f27816
15663 Node: Disambiguating names and IDs\7f32732
15664 Ref: Disambiguating names and IDs-Footnote-1\7f34290
15665 Node: Random sources\7f34360
15666 Node: Target directory\7f36109
15667 Node: Trailing slashes\7f39594
15668 Node: Traversing symlinks\7f40615
15669 Node: Treating / specially\7f41686
15670 Node: Special built-in utilities\7f43227
15671 Node: Standards conformance\7f44362
15672 Node: Output of entire files\7f45878
15673 Node: cat invocation\7f46479
15674 Node: tac invocation\7f48207
15675 Node: nl invocation\7f49469
15676 Node: od invocation\7f53348
15677 Node: base64 invocation\7f59711
15678 Node: Formatting file contents\7f61073
15679 Node: fmt invocation\7f61524
15680 Node: pr invocation\7f64337
15681 Node: fold invocation\7f77122
15682 Node: Output of parts of files\7f78582
15683 Node: head invocation\7f79090
15684 Node: tail invocation\7f80806
15685 Node: split invocation\7f88629
15686 Node: csplit invocation\7f90715
15687 Node: Summarizing files\7f94827
15688 Node: wc invocation\7f95475
15689 Node: sum invocation\7f98360
15690 Node: cksum invocation\7f99765
15691 Node: md5sum invocation\7f100905
15692 Node: sha1sum invocation\7f105599
15693 Node: sha2 utilities\7f106379
15694 Node: Operating on sorted files\7f107003
15695 Node: sort invocation\7f107659
15696 Ref: sort invocation-Footnote-1\7f127034
15697 Node: shuf invocation\7f127586
15698 Node: uniq invocation\7f130150
15699 Node: comm invocation\7f134230
15700 Node: tsort invocation\7f135558
15701 Node: tsort background\7f138592
15702 Node: ptx invocation\7f140355
15703 Node: General options in ptx\7f143159
15704 Node: Charset selection in ptx\7f143740
15705 Node: Input processing in ptx\7f144642
15706 Node: Output formatting in ptx\7f150063
15707 Node: Compatibility in ptx\7f156629
15708 Node: Operating on fields within a line\7f159858
15709 Node: cut invocation\7f160262
15710 Node: paste invocation\7f163581
15711 Node: join invocation\7f164909
15712 Node: Operating on characters\7f169133
15713 Node: tr invocation\7f169569
15714 Node: Character sets\7f171287
15715 Node: Translating\7f175718
15716 Node: Squeezing\7f177809
15717 Node: expand invocation\7f180876
15718 Node: unexpand invocation\7f182358
15719 Node: Directory listing\7f184176
15720 Node: ls invocation\7f184662
15721 Ref: ls invocation-Footnote-1\7f186476
15722 Node: Which files are listed\7f186698
15723 Node: What information is listed\7f190358
15724 Node: Sorting the output\7f199334
15725 Node: More details about version sort\7f201654
15726 Node: General output formatting\7f203152
15727 Node: Formatting file timestamps\7f207060
15728 Node: Formatting the file names\7f212401
15729 Node: dir invocation\7f215317
15730 Node: vdir invocation\7f215728
15731 Node: dircolors invocation\7f216106
15732 Node: Basic operations\7f217586
15733 Node: cp invocation\7f218206
15734 Node: dd invocation\7f230266
15735 Node: install invocation\7f238684
15736 Node: mv invocation\7f242911
15737 Node: rm invocation\7f247201
15738 Node: shred invocation\7f251515
15739 Node: Special file types\7f259000
15740 Node: link invocation\7f260496
15741 Node: ln invocation\7f261502
15742 Node: mkdir invocation\7f266564
15743 Node: mkfifo invocation\7f268813
15744 Node: mknod invocation\7f269818
15745 Node: readlink invocation\7f271577
15746 Node: rmdir invocation\7f273320
15747 Node: unlink invocation\7f274593
15748 Node: Changing file attributes\7f275552
15749 Node: chown invocation\7f276366
15750 Node: chgrp invocation\7f282552
15751 Node: chmod invocation\7f285602
15752 Node: touch invocation\7f288357
15753 Node: Disk usage\7f292953
15754 Node: df invocation\7f293545
15755 Node: du invocation\7f299217
15756 Node: stat invocation\7f307207
15757 Node: sync invocation\7f311049
15758 Node: Printing text\7f311976
15759 Node: echo invocation\7f312350
15760 Node: printf invocation\7f314527
15761 Node: yes invocation\7f319234
15762 Node: Conditions\7f319846
15763 Node: false invocation\7f320437
15764 Node: true invocation\7f321472
15765 Node: test invocation\7f322751
15766 Node: File type tests\7f324711
15767 Node: Access permission tests\7f325593
15768 Node: File characteristic tests\7f326478
15769 Node: String tests\7f327243
15770 Node: Numeric tests\7f327908
15771 Node: Connectives for test\7f328705
15772 Node: expr invocation\7f329058
15773 Node: String expressions\7f331319
15774 Node: Numeric expressions\7f333902
15775 Node: Relations for expr\7f334540
15776 Node: Examples of expr\7f335740
15777 Node: Redirection\7f336468
15778 Node: tee invocation\7f336913
15779 Node: File name manipulation\7f337978
15780 Node: basename invocation\7f338426
15781 Node: dirname invocation\7f339873
15782 Node: pathchk invocation\7f341079
15783 Node: Working context\7f342743
15784 Node: pwd invocation\7f343387
15785 Node: stty invocation\7f344061
15786 Node: Control\7f346821
15787 Node: Input\7f347581
15788 Node: Output\7f349057
15789 Node: Local\7f350313
15790 Node: Combination\7f351895
15791 Node: Characters\7f354057
15792 Node: Special\7f355611
15793 Node: printenv invocation\7f356977
15794 Node: tty invocation\7f357740
15795 Node: User information\7f358446
15796 Node: id invocation\7f359081
15797 Node: logname invocation\7f360297
15798 Node: whoami invocation\7f360924
15799 Node: groups invocation\7f361411
15800 Node: users invocation\7f362147
15801 Node: who invocation\7f363094
15802 Node: System context\7f365863
15803 Node: date invocation\7f366353
15804 Node: Time conversion specifiers\7f368011
15805 Node: Date conversion specifiers\7f370411
15806 Node: Literal conversion specifiers\7f373535
15807 Node: Padding and other flags\7f373893
15808 Node: Setting the time\7f376087
15809 Node: Options for date\7f377093
15810 Node: Examples of date\7f380398
15811 Ref: %s-examples\7f381841
15812 Node: uname invocation\7f384026
15813 Node: hostname invocation\7f386599
15814 Node: hostid invocation\7f387212
15815 Node: Modified command invocation\7f387899
15816 Node: chroot invocation\7f388525
15817 Node: env invocation\7f390644
15818 Node: nice invocation\7f392723
15819 Node: nohup invocation\7f396219
15820 Node: su invocation\7f398210
15821 Node: Process control\7f402683
15822 Node: kill invocation\7f402906
15823 Node: Delaying\7f407272
15824 Node: sleep invocation\7f407469
15825 Node: Numeric operations\7f408333
15826 Node: factor invocation\7f408665
15827 Node: seq invocation\7f410003
15828 Node: File permissions\7f414284
15829 Node: Mode Structure\7f414902
15830 Node: Symbolic Modes\7f418597
15831 Node: Setting Permissions\7f419695
15832 Node: Copying Permissions\7f422308
15833 Node: Changing Special Mode Bits\7f423127
15834 Node: Conditional Executability\7f424949
15835 Node: Multiple Changes\7f425493
15836 Node: Umask and Protection\7f427160
15837 Node: Numeric Modes\7f428265
15838 Node: Directory Setuid and Setgid\7f430165
15839 Node: Date input formats\7f432427
15840 Node: General date syntax\7f434780
15841 Node: Calendar date items\7f437739
15842 Node: Time of day items\7f439744
15843 Node: Time zone items\7f441868
15844 Node: Day of week items\7f443110
15845 Node: Relative items in date strings\7f444107
15846 Node: Pure numbers in date strings\7f446917
15847 Node: Seconds since the Epoch\7f447906
15848 Node: Specifying time zone rules\7f449535
15849 Node: Authors of get_date\7f451907
15850 Node: Opening the software toolbox\7f452667
15851 Node: Toolbox introduction\7f453328
15852 Node: I/O redirection\7f456051
15853 Node: The who command\7f458885
15854 Node: The cut command\7f459782
15855 Node: The sort command\7f460845
15856 Node: The uniq command\7f461549
15857 Node: Putting the tools together\7f462239
15858 Ref: Putting the tools together-Footnote-1\7f474196
15859 Node: Copying This Manual\7f474270
15860 Node: GNU Free Documentation License\7f474525
15861 Node: Index\7f496926
15862 \1f
15863 End Tag Table