START-INFO-DIR-ENTRY * GNU Utilities: (coreutils). GNU Utilities. * Common options: (coreutils)Common options. Common options. * File permissions: (coreutils)File permissions. Access modes. * Date input formats: (coreutils)Date input formats. * basename: (coreutils)basename invocation. Strip directory and suffix. * cat: (coreutils)cat invocation. Concatenate and write files. * chgrp: (coreutils)chgrp invocation. Change file groups. * chmod: (coreutils)chmod invocation. Change file permissions. * chown: (coreutils)chown invocation. Change file owners/groups. * chroot: (coreutils)chroot invocation. Specify the root directory. * cksum: (coreutils)cksum invocation. Print POSIX CRC checksum. * comm: (coreutils)comm invocation. Compare sorted files by line. * cp: (coreutils)cp invocation. Copy files. * csplit: (coreutils)csplit invocation. Split by context. * cut: (coreutils)cut invocation. Print selected parts of lines. * date: (coreutils)date invocation. Print/set system date and time. * dd: (coreutils)dd invocation. Copy and convert a file. * df: (coreutils)df invocation. Report filesystem disk usage. * dir: (coreutils)dir invocation. List directories briefly. * dircolors: (coreutils)dircolors invocation. Color setup for ls. * dirname: (coreutils)dirname invocation. Strip non-directory suffix. * du: (coreutils)du invocation. Report on disk usage. * echo: (coreutils)echo invocation. Print a line of text. * env: (coreutils)env invocation. Modify the environment. * expand: (coreutils)expand invocation. Convert tabs to spaces. * expr: (coreutils)expr invocation. Evaluate expressions. * factor: (coreutils)factor invocation. Print prime factors * false: (coreutils)false invocation. Do nothing, unsuccessfully. * fmt: (coreutils)fmt invocation. Reformat paragraph text. * fold: (coreutils)fold invocation. Wrap long input lines. * groups: (coreutils)groups invocation. Print group names a user is in. * head: (coreutils)head invocation. Output the first part of files. * hostid: (coreutils)hostid invocation. Print numeric host identifier. * hostname: (coreutils)hostname invocation. Print or set system name. * id: (coreutils)id invocation. Print real/effective uid/gid. * install: (coreutils)install invocation. Copy and change attributes. * join: (coreutils)join invocation. Join lines on a common field. * kill: (coreutils)kill invocation. Send a signal to processes. * link: (coreutils)link invocation. Make hard links between files. * ln: (coreutils)ln invocation. Make links between files. * logname: (coreutils)logname invocation. Print current login name. * ls: (coreutils)ls invocation. List directory contents. * md5sum: (coreutils)md5sum invocation. Print or check message-digests. * mkdir: (coreutils)mkdir invocation. Create directories. * mkfifo: (coreutils)mkfifo invocation. Create FIFOs (named pipes). * mknod: (coreutils)mknod invocation. Create special files. * mv: (coreutils)mv invocation. Rename files. * nice: (coreutils)nice invocation. Modify scheduling priority. * nl: (coreutils)nl invocation. Number lines and write files. * nohup: (coreutils)nohup invocation. Immunize to hangups. * od: (coreutils)od invocation. Dump files in octal, etc. * paste: (coreutils)paste invocation. Merge lines of files. * pathchk: (coreutils)pathchk invocation. Check file name portability. * pr: (coreutils)pr invocation. Paginate or columnate files. * printenv: (coreutils)printenv invocation. Print environment variables. * printf: (coreutils)printf invocation. Format and print data. * ptx: (coreutils)ptx invocation. Produce permuted indexes. * pwd: (coreutils)pwd invocation. Print working directory. * rm: (coreutils)rm invocation. Remove files. * rmdir: (coreutils)rmdir invocation. Remove empty directories. * seq: (coreutils)seq invocation. Print numeric sequences * shred: (coreutils)shred invocation. Remove files more securely. * sleep: (coreutils)sleep invocation. Delay for a specified time. * sort: (coreutils)sort invocation. Sort text files. * split: (coreutils)split invocation. Split into fixed-size pieces. * stat: (coreutils)stat invocation. Report file or filesystem status. * stty: (coreutils)stty invocation. Print/change terminal settings. * su: (coreutils)su invocation. Modify user and group id. * sum: (coreutils)sum invocation. Print traditional checksum. * sync: (coreutils)sync invocation. Synchronize memory and disk. * tac: (coreutils)tac invocation. Reverse files. * tail: (coreutils)tail invocation. Output the last part of files. * tee: (coreutils)tee invocation. Redirect to multiple files. * test: (coreutils)test invocation. File/string tests. * touch: (coreutils)touch invocation. Change file timestamps. * tr: (coreutils)tr invocation. Translate characters. * true: (coreutils)true invocation. Do nothing, successfully. * tsort: (coreutils)tsort invocation. Topological sort. * tty: (coreutils)tty invocation. Print terminal name. * uname: (coreutils)uname invocation. Print system information. * unexpand: (coreutils)unexpand invocation. Convert spaces to tabs. * unlink: (coreutils)unlink invocation. Remove files via unlink syscall. * uniq: (coreutils)uniq invocation. Uniquify files. * users: (coreutils)users invocation. Print current user names. * vdir: (coreutils)vdir invocation. List directories verbosely. * wc: (coreutils)wc invocation. Byte, word, and line counts. * who: (coreutils)who invocation. Print who is logged in. * whoami: (coreutils)whoami invocation. Print effective user id. * yes: (coreutils)yes invocation. Print a string indefinitely. END-INFO-DIR-ENTRY This manual documents version 4.5.4 of the GNU command line utilities. Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". copying GNU Core-utils ************** Introduction ************ This manual is a work in progress: many sections make no attempt to explain basic concepts in a way suitable for novices. Thus, if you are interested, please get involved in improving this manual. The entire GNU community will benefit. The GNU utilities documented here are mostly compatible with the POSIX standard. Please report bugs to . Remember to include the version number, machine architecture, input files, and any other information needed to reproduce the bug: your input, what you expected, what you got, and why it is wrong. Diffs are welcome, but please include a description of the problem as well, since this is sometimes difficult to infer. *Note Bugs: (gcc)Bugs. This manual was originally derived from the Unix man pages in the distributions, which were written by David MacKenzie and updated by Jim Meyering. What you are reading now is the authoritative documentation for these utilities; the man pages are no longer being maintained. The original `fmt' man page was written by Ross Paterson. Franc,ois Pinard did the initial conversion to Texinfo format. Karl Berry did the indexing, some reorganization, and editing of the results. Brian Youmans of the Free Software Foundation office staff combined the manuals for textutils, fileutils, and sh-utils to produce the present omnibus manual. Richard Stallman contributed his usual invaluable insights to the overall process. Common options ************** Certain options are available in all of these programs. Rather than writing identical descriptions for each of the programs, they are described here. (In fact, every GNU program accepts (or should accept) these options.) Normally options and operands can appear in any order, and programs act as if all the options appear before any operands. For example, `sort -r passwd -t :' acts like `sort -r -t : passwd', since `:' is an option-argument of `-t'. However, if the `POSIXLY_CORRECT' environment variable is set, options must appear before operands, unless otherwise specified for a particular command. Some of these programs recognize the `--help' and `--version' options only when one of them is the sole command line argument. `--help' Print a usage message listing all available options, then exit successfully. `--version' Print the version number, then exit successfully. `--' Delimit the option list. Later arguments, if any, are treated as operands even if they begin with `-'. For example, `sort -- -r' reads from the file named `-r'. A single `-' is not really an option, though it looks like one. It stands for standard input, or for standard output if that is clear from the context, and it can be used either as an operand or as an option-argument. For example, `sort -o - -' outputs to standard output and reads from standard input, and is equivalent to plain `sort'. Unless otherwise specified, `-' can appear in any context that requires a file name. Backup options ============== Some GNU programs (at least `cp', `install', `ln', and `mv') optionally make backups of files before writing new versions. These options control the details of these backups. The options are also briefly mentioned in the descriptions of the particular programs. `-b' `--backup[=METHOD]' Make a backup of each file that would otherwise be overwritten or removed. Without this option, the original versions are destroyed. Use METHOD to determine the type of backups to make. When this option is used but METHOD is not specified, then the value of the `VERSION_CONTROL' environment variable is used. And if `VERSION_CONTROL' is not set, the default backup type is `existing'. Note that the short form of this option, `-b' does not accept any argument. Using `-b' is equivalent to using `--backup=existing'. This option corresponds to the Emacs variable `version-control'; the values for METHOD are the same as those used in Emacs. This option also accepts more descriptive names. The valid METHODs are (unique abbreviations are accepted): `none' `off' Never make backups. `numbered' `t' Always make numbered backups. `existing' `nil' Make numbered backups of files that already have them, simple backups of the others. `simple' `never' Always make simple backups. Please note `never' is not to be confused with `none'. `-S SUFFIX' `--suffix=SUFFIX' Append SUFFIX to each backup file made with `-b'. If this option is not specified, the value of the `SIMPLE_BACKUP_SUFFIX' environment variable is used. And if `SIMPLE_BACKUP_SUFFIX' is not set, the default is `~', just as in Emacs. `--version-control=METHOD' This option is obsolete and will be removed in a future release. It has been replaced with `--backup'. Block size ========== Some GNU programs (at least `df', `du', and `ls') display sizes in "blocks". You can adjust the block size and method of display to make sizes easier to read. The block size used for display is independent of any filesystem block size. Fractional block counts are rounded up to the nearest integer. The default block size is chosen by examining the following environment variables in turn; the first one that is set determines the block size. `DF_BLOCK_SIZE' This specifies the default block size for the `df' command. Similarly, `DU_BLOCK_SIZE' specifies the default for `du' and `LS_BLOCK_SIZE' for `ls'. `BLOCK_SIZE' This specifies the default block size for all three commands, if the above command-specific environment variables are not set. `POSIXLY_CORRECT' If neither the `COMMAND_BLOCK_SIZE' nor the `BLOCK_SIZE' variables are set, but this variable is set, the block size defaults to 512. If none of the above environment variables are set, the block size currently defaults to 1024 bytes in most contexts, but this number may change in the future. For `ls' file sizes, the block size defaults to 1 byte. A block size specification can be a positive integer specifying the number of bytes per block, or it can be `human-readable' or `si' to select a human-readable format. Integers may be followed by suffixes that are upward compatible with the SI prefixes (http://www.bipm.fr/enus/3_SI/si-prefixes.html) for decimal multiples and with the IEC 60027-2 prefixes for binary multiples (http://physics.nist.gov/cuu/Units/binary.html). With human-readable formats, output sizes are followed by a size letter such as `M' for megabytes. `BLOCK_SIZE=human-readable' uses powers of 1024; `M' stands for 1,048,576 bytes. `BLOCK_SIZE=si' is similar, but uses powers of 1000 and appends `B'; `MB' stands for 1,000,000 bytes. A block size specification preceded by `'' causes output sizes to be displayed with thousands separators. The `LC_NUMERIC' locale specifies the thousands separator and grouping. For example, in an American English locale, `--block-size="'1kB"' would cause a size of 1234000 bytes to be displayed as `1,234'. In the default C locale, there is no thousands separator so a leading `'' has no effect. An integer block size can be followed by a suffix to specify a multiple of that size. A bare size letter, or one followed by `iB', specifies a multiple using powers of 1024. A size letter followed by `B' specifies powers of 1000 instead. For example, `1M' and `1MiB' are equivalent to `1048576', whereas `1MB' is equivalent to `1000000'. A plain suffix without a preceding integer acts as if `1' were prepended, except that it causes a size indication to be appended to the output. For example, `--block-size="kB"' displays 3000 as `3kB'. The following suffixes are defined. Large sizes like `1Y' may be rejected by your computer due to limitations of its arithmetic. `kB' kilobyte: 10^3 = 1000. `k' `K' `KiB' kibibyte: 2^10 = 1024. `K' is special: the SI prefix is `k' and the IEC 60027-2 prefix is `Ki', but tradition and POSIX use `k' to mean `KiB'. `MB' megabyte: 10^6 = 1,000,000. `M' `MiB' mebibyte: 2^20 = 1,048,576. `GB' gigabyte: 10^9 = 1,000,000,000. `G' `GiB' gibibyte: 2^30 = 1,073,741,824. `TB' terabyte: 10^12 = 1,000,000,000,000. `T' `TiB' tebibyte: 2^40 = 1,099,511,627,776. `PB' petabyte: 10^15 = 1,000,000,000,000,000. `P' `PiB' pebibyte: 2^50 = 1,125,899,906,842,624. `EB' exabyte: 10^18 = 1,000,000,000,000,000,000. `E' `EiB' exbibyte: 2^60 = 1,152,921,504,606,846,976. `ZB' zettabyte: 10^21 = 1,000,000,000,000,000,000,000 `Z' `ZiB' 2^70 = 1,180,591,620,717,411,303,424. (`Zi' is a GNU extension to IEC 60027-2.) `YB' yottabyte: 10^24 = 1,000,000,000,000,000,000,000,000. `Y' `YiB' 2^80 = 1,208,925,819,614,629,174,706,176. (`Yi' is a GNU extension to IEC 60027-2.) Block size defaults can be overridden by an explicit `--block-size=SIZE' option. The `-k' option is equivalent to `--block-size=1K', which is the default unless the `POSIXLY_CORRECT' environment variable is set. The `-h' or `--human-readable' option is equivalent to `--block-size=human-readable'. The `--si' option is equivalent to `--block-size=si'. Target directory ================ Some GNU programs (at least `cp', `install', `ln', and `mv') allow you to specify the target directory via this option: `--target-directory=DIRECTORY' Specify the destination DIRECTORY. The interface for most programs is that after processing options and a finite (possibly zero) number of fixed-position arguments, the remaining argument list is either expected to be empty, or is a list of items (usually files) that will all be handled identically. The `xargs' program is designed to work well with this convention. The commands in the `mv'-family are unusual in that they take a variable number of arguments with a special case at the _end_ (namely, the target directory). This makes it nontrivial to perform some operations, e.g., "move all files from here to ../d/", because `mv * ../d/' might exhaust the argument space, and `ls | xargs ...' doesn't have a clean way to specify an extra final argument for each invocation of the subject command. (It can be done by going through a shell command, but that requires more human labor and brain power than it should.) The `--target-directory' option allows the `cp', `install', `ln', and `mv' programs to be used conveniently with `xargs'. For example, you can move the files from the current directory to a sibling directory, `d' like this: (However, this doesn't move files whose names begin with `.'.) ls |xargs mv --target-directory=../d If you use the GNU `find' program, you can move _all_ files with this command: find . -mindepth 1 -maxdepth 1 \ | xargs mv --target-directory=../d But that will fail if there are no files in the current directory or if any file has a name containing a newline character. The following example removes those limitations and requires both GNU `find' and GNU `xargs': find . -mindepth 1 -maxdepth 1 -print0 \ | xargs --null --no-run-if-empty \ mv --target-directory=../d Trailing slashes ================ Some GNU programs (at least `cp' and `mv') allow you to remove any trailing slashes from each SOURCE argument before operating on it. The `--strip-trailing-slashes' option enables this behavior. This is useful when a SOURCE argument may have a trailing slash and specify a symbolic link to a directory. This scenario is in fact rather common because some shells can automatically append a trailing slash when performing file name completion on such symbolic links. Without this option, `mv', for example, (via the system's rename function) must interpret a trailing slash as a request to dereference the symbolic link and so must rename the indirectly referenced _directory_ and not the symbolic link. Although it may seem surprising that such behavior be the default, it is required by POSIX and is consistent with other parts of that standard. Standards conformance ===================== In a few cases, the GNU utilities' default behavior is incompatible with the POSIX standard. To suppress these incompatibilities, define the `POSIXLY_CORRECT' environment variable. Unless you are checking for POSIX conformance, you probably do not need to define `POSIXLY_CORRECT'. Newer versions of POSIX are occasionally incompatible with older versions. For example, older versions of POSIX required the command `sort +1' to sort based on the second and succeeding fields in each input line, but starting with POSIX 1003.1-2001 the same command is required to sort the file named `+1', and you must instead use the command `sort -k 2' to get the field-based sort. The GNU utilities normally conform to the version of POSIX that is standard for your system. To cause them to conform to a different version of POSIX, define the `_POSIX2_VERSION' environment variable to a value of the form YYYYMM specifying the year and month the standard was adopted. Two values are currently supported for `_POSIX2_VERSION': `199209' stands for POSIX 1003.2-1992, and `200112' stands for POSIX 1003.1-2001. For example, if you are running older software that assumes an older version of POSIX and uses `sort +1', you can work around the compatibility problems by setting `_POSIX2_VERSION=199209' in your environment. Output of entire files ********************** These commands read and write entire files, possibly transforming them in some way. `cat': Concatenate and write files ================================== `cat' copies each FILE (`-' means standard input), or standard input if none are given, to standard output. Synopsis: cat [OPTION] [FILE]... The program accepts the following options. Also see *Note Common options::. `-A' `--show-all' Equivalent to `-vET'. `-B' `--binary' On MS-DOS and MS-Windows only, read and write the files in binary mode. By default, `cat' on MS-DOS/MS-Windows uses binary mode only when standard output is redirected to a file or a pipe; this option overrides that. Binary file I/O is used so that the files retain their format (Unix text as opposed to DOS text and binary), because `cat' is frequently used as a file-copying program. Some options (see below) cause `cat' to read and write files in text mode because in those cases the original file contents aren't important (e.g., when lines are numbered by `cat', or when line endings should be marked). This is so these options work as DOS/Windows users would expect; for example, DOS-style text files have their lines end with the CR-LF pair of characters, which won't be processed as an empty line by `-b' unless the file is read in text mode. `-b' `--number-nonblank' Number all nonblank output lines, starting with 1. On MS-DOS and MS-Windows, this option causes `cat' to read and write files in text mode. `-e' Equivalent to `-vE'. `-E' `--show-ends' Display a `$' after the end of each line. On MS-DOS and MS-Windows, this option causes `cat' to read and write files in text mode. `-n' `--number' Number all output lines, starting with 1. On MS-DOS and MS-Windows, this option causes `cat' to read and write files in text mode. `-s' `--squeeze-blank' Replace multiple adjacent blank lines with a single blank line. On MS-DOS and MS-Windows, this option causes `cat' to read and write files in text mode. `-t' Equivalent to `-vT'. `-T' `--show-tabs' Display TAB characters as `^I'. `-u' Ignored; for Unix compatibility. `-v' `--show-nonprinting' Display control characters except for LFD and TAB using `^' notation and precede characters that have the high bit set with `M-'. On MS-DOS and MS-Windows, this option causes `cat' to read files and standard input in DOS binary mode, so the CR characters at the end of each line are also visible. `tac': Concatenate and write files in reverse ============================================= `tac' copies each FILE (`-' means standard input), or standard input if none are given, to standard output, reversing the records (lines by default) in each separately. Synopsis: tac [OPTION]... [FILE]... "Records" are separated by instances of a string (newline by default). By default, this separator string is attached to the end of the record that it follows in the file. The program accepts the following options. Also see *Note Common options::. `-b' `--before' The separator is attached to the beginning of the record that it precedes in the file. `-r' `--regex' Treat the separator string as a regular expression. Users of `tac' on MS-DOS/MS-Windows should note that, since `tac' reads files in binary mode, each line of a text file might end with a CR/LF pair instead of the Unix-style LF. `-s SEPARATOR' `--separator=SEPARATOR' Use SEPARATOR as the record separator, instead of newline. `nl': Number lines and write files ================================== `nl' writes each FILE (`-' means standard input), or standard input if none are given, to standard output, with line numbers added to some or all of the lines. Synopsis: nl [OPTION]... [FILE]... `nl' decomposes its input into (logical) pages; by default, the line number is reset to 1 at the top of each logical page. `nl' treats all of the input files as a single document; it does not reset line numbers or logical pages between files. A logical page consists of three sections: header, body, and footer. Any of the sections can be empty. Each can be numbered in a different style from the others. The beginnings of the sections of logical pages are indicated in the input file by a line containing exactly one of these delimiter strings: `\:\:\:' start of header; `\:\:' start of body; `\:' start of footer. The two characters from which these strings are made can be changed from `\' and `:' via options (see below), but the pattern and length of each string cannot be changed. A section delimiter is replaced by an empty line on output. Any text that comes before the first section delimiter string in the input file is considered to be part of a body section, so `nl' treats a file that contains no section delimiters as a single body section. The program accepts the following options. Also see *Note Common options::. `-b STYLE' `--body-numbering=STYLE' Select the numbering style for lines in the body section of each logical page. When a line is not numbered, the current line number is not incremented, but the line number separator character is still prepended to the line. The styles are: `a' number all lines, `t' number only nonempty lines (default for body), `n' do not number lines (default for header and footer), `pREGEXP' number only lines that contain a match for REGEXP. `-d CD' `--section-delimiter=CD' Set the section delimiter characters to CD; default is `\:'. If only C is given, the second remains `:'. (Remember to protect `\' or other metacharacters from shell expansion with quotes or extra backslashes.) `-f STYLE' `--footer-numbering=STYLE' Analogous to `--body-numbering'. `-h STYLE' `--header-numbering=STYLE' Analogous to `--body-numbering'. `-i NUMBER' `--page-increment=NUMBER' Increment line numbers by NUMBER (default 1). `-l NUMBER' `--join-blank-lines=NUMBER' Consider NUMBER (default 1) consecutive empty lines to be one logical line for numbering, and only number the last one. Where fewer than NUMBER consecutive empty lines occur, do not number them. An empty line is one that contains no characters, not even spaces or tabs. `-n FORMAT' `--number-format=FORMAT' Select the line numbering format (default is `rn'): `ln' left justified, no leading zeros; `rn' right justified, no leading zeros; `rz' right justified, leading zeros. `-p' `--no-renumber' Do not reset the line number at the start of a logical page. `-s STRING' `--number-separator=STRING' Separate the line number from the text line in the output with STRING (default is the TAB character). `-v NUMBER' `--starting-line-number=NUMBER' Set the initial line number on each logical page to NUMBER (default 1). `-w NUMBER' `--number-width=NUMBER' Use NUMBER characters for line numbers (default 6). `od': Write files in octal or other formats =========================================== `od' writes an unambiguous representation of each FILE (`-' means standard input), or standard input if none are given. Synopses: od [OPTION]... [FILE]... od --traditional [FILE] [[+]OFFSET [[+]LABEL]] Each line of output consists of the offset in the input, followed by groups of data from the file. By default, `od' prints the offset in octal, and each group of file data is two bytes of input printed as a single octal number. The program accepts the following options. Also see *Note Common options::. `-A RADIX' `--address-radix=RADIX' Select the base in which file offsets are printed. RADIX can be one of the following: `d' decimal; `o' octal; `x' hexadecimal; `n' none (do not print offsets). The default is octal. `-j BYTES' `--skip-bytes=BYTES' Skip BYTES input bytes before formatting and writing. If BYTES begins with `0x' or `0X', it is interpreted in hexadecimal; otherwise, if it begins with `0', in octal; otherwise, in decimal. Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by 1048576. `-N BYTES' `--read-bytes=BYTES' Output at most BYTES bytes of the input. Prefixes and suffixes on `bytes' are interpreted as for the `-j' option. `-s N' `--strings[=N]' Instead of the normal output, output only "string constants": at least N consecutive ASCII graphic characters, followed by a null (zero) byte. If N is omitted with `--strings', the default is 3. On older systems, GNU `od' instead supports an obsolete option `-s[N]', where N also defaults to 3. POSIX 1003.1-2001 (*note Standards conformance::) does not allow `-s' without an argument; use `--strings' instead. `-t TYPE' `--format=TYPE' Select the format in which to output the file data. TYPE is a string of one or more of the below type indicator characters. If you include more than one type indicator character in a single TYPE string, or use this option more than once, `od' writes one copy of each output line using each of the data types that you specified, in the order that you specified. Adding a trailing "z" to any type specification appends a display of the ASCII character representation of the printable characters to the output line generated by the type specification. `a' named character `c' ASCII character or backslash escape, `d' signed decimal `f' floating point `o' octal `u' unsigned decimal `x' hexadecimal The type `a' outputs things like `sp' for space, `nl' for newline, and `nul' for a null (zero) byte. Type `c' outputs ` ', `\n', and `\0', respectively. Except for types `a' and `c', you can specify the number of bytes to use in interpreting each number in the given data type by following the type indicator character with a decimal integer. Alternately, you can specify the size of one of the C compiler's built-in data types by following the type indicator character with one of the following characters. For integers (`d', `o', `u', `x'): `C' char `S' short `I' int `L' long For floating point (`f'): F float D double L long double `-v' `--output-duplicates' Output consecutive lines that are identical. By default, when two or more consecutive output lines would be identical, `od' outputs only the first line, and puts just an asterisk on the following line to indicate the elision. `-w N' `--width[=N]' Dump `n' input bytes per output line. This must be a multiple of the least common multiple of the sizes associated with the specified output types. If this option is not given at all, the default is 16. If N is omitted with `--width', the default is 32. On older systems, GNU `od' instead supports an obsolete option `-w[N]', where N also defaults to 32. POSIX 1003.1-2001 (*note Standards conformance::) does not allow `-w' without an argument; use `--width' instead. The next several options are shorthands for format specifications. GNU `od' accepts any combination of shorthands and format specification options. These options accumulate. `-a' Output as named characters. Equivalent to `-ta'. `-b' Output as octal bytes. Equivalent to `-toC'. `-c' Output as ASCII characters or backslash escapes. Equivalent to `-tc'. `-d' Output as unsigned decimal shorts. Equivalent to `-tu2'. `-f' Output as floats. Equivalent to `-tfF'. `-h' Output as hexadecimal shorts. Equivalent to `-tx2'. `-i' Output as decimal shorts. Equivalent to `-td2'. `-l' Output as decimal longs. Equivalent to `-td4'. `-o' Output as octal shorts. Equivalent to `-to2'. `-x' Output as hexadecimal shorts. Equivalent to `-tx2'. `--traditional' Recognize the non-option arguments that traditional `od' accepted. The following syntax: od --traditional [FILE] [[+]OFFSET[.][b] [[+]LABEL[.][b]]] can be used to specify at most one file and optional arguments specifying an offset and a pseudo-start address, LABEL. By default, OFFSET is interpreted as an octal number specifying how many input bytes to skip before formatting and writing. The optional trailing decimal point forces the interpretation of OFFSET as a decimal number. If no decimal is specified and the offset begins with `0x' or `0X' it is interpreted as a hexadecimal number. If there is a trailing `b', the number of bytes skipped will be OFFSET multiplied by 512. The LABEL argument is interpreted just like OFFSET, but it specifies an initial pseudo-address. The pseudo-addresses are displayed in parentheses following any normal address. Formatting file contents ************************ These commands reformat the contents of files. `fmt': Reformat paragraph text ============================== `fmt' fills and joins lines to produce output lines of (at most) a given number of characters (75 by default). Synopsis: fmt [OPTION]... [FILE]... `fmt' reads from the specified FILE arguments (or standard input if none are given), and writes to standard output. By default, blank lines, spaces between words, and indentation are preserved in the output; successive input lines with different indentation are not joined; tabs are expanded on input and introduced on output. `fmt' prefers breaking lines at the end of a sentence, and tries to avoid line breaks after the first word of a sentence or before the last word of a sentence. A "sentence break" is defined as either the end of a paragraph or a word ending in any of `.?!', followed by two spaces or end of line, ignoring any intervening parentheses or quotes. Like TeX, `fmt' reads entire "paragraphs" before choosing line breaks; the algorithm is a variant of that in "Breaking Paragraphs Into Lines" (Donald E. Knuth and Michael F. Plass, `Software--Practice and Experience', 11 (1981), 1119-1184). The program accepts the following options. Also see *Note Common options::. `-c' `--crown-margin' "Crown margin" mode: preserve the indentation of the first two lines within a paragraph, and align the left margin of each subsequent line with that of the second line. `-t' `--tagged-paragraph' "Tagged paragraph" mode: like crown margin mode, except that if indentation of the first line of a paragraph is the same as the indentation of the second, the first line is treated as a one-line paragraph. `-s' `--split-only' Split lines only. Do not join short lines to form longer ones. This prevents sample lines of code, and other such "formatted" text from being unduly combined. `-u' `--uniform-spacing' Uniform spacing. Reduce spacing between words to one space, and spacing between sentences to two spaces. `-WIDTH' `-w WIDTH' `--width=WIDTH' Fill output lines up to WIDTH characters (default 75). `fmt' initially tries to make lines about 7% shorter than this, to give it room to balance line lengths. `-p PREFIX' `--prefix=PREFIX' Only lines beginning with PREFIX (possibly preceded by whitespace) are subject to formatting. The prefix and any preceding whitespace are stripped for the formatting and then re-attached to each formatted output line. One use is to format certain kinds of program comments, while leaving the code unchanged. `pr': Paginate or columnate files for printing ============================================== `pr' writes each FILE (`-' means standard input), or standard input if none are given, to standard output, paginating and optionally outputting in multicolumn format; optionally merges all FILEs, printing all in parallel, one per column. Synopsis: pr [OPTION]... [FILE]... By default, a 5-line header is printed at each page: two blank lines; a line with the date, the filename, and the page count; and two more blank lines. A footer of five blank lines is also printed. With the `-F' option, a 3-line header is printed: the leading two blank lines are omitted; no footer is used. The default PAGE_LENGTH in both cases is 66 lines. The default number of text lines changes from 56 (without `-F') to 63 (with `-F'). The text line of the header takes the form `DATE STRING PAGE', with spaces inserted around STRING so that the line takes up the full PAGE_WIDTH. Here, DATE is the date (see the `-D' or `--date-format' option for details), STRING is the centered header string, and PAGE identifies the page number. The `LC_MESSAGES' locale category affects the spelling of PAGE; in the default C locale, it is `Page NUMBER' where NUMBER is the decimal page number. Form feeds in the input cause page breaks in the output. Multiple form feeds produce empty pages. Columns are of equal width, separated by an optional string (default is `space'). For multicolumn output, lines will always be truncated to PAGE_WIDTH (default 72), unless you use the `-J' option. For single column output no line truncation occurs by default. Use `-W' option to truncate lines in that case. The following changes were made in version 1.22i and apply to later versions of `pr': - Brian * Some small LETTER OPTIONS (`-s', `-w') have been redefined for better POSIX compliance. The output of some further cases has been adapted to other Unix systems. These changes are not compatible with earlier versions of the program. * Some NEW CAPITAL LETTER options (`-J', `-S', `-W') have been introduced to turn off unexpected interferences of small letter options. The `-N' option and the second argument LAST_PAGE of `+FIRST_PAGE' offer more flexibility. The detailed handling of form feeds set in the input files requires the `-T' option. * Capital letter options override small letter ones. * Some of the option-arguments (compare `-s', `-e', `-i', `-n') cannot be specified as separate arguments from the preceding option letter (already stated in the POSIX specification). The program accepts the following options. Also see *Note Common options::. `+FIRST_PAGE[:LAST_PAGE]' `--pages=FIRST_PAGE[:LAST_PAGE]' Begin printing with page FIRST_PAGE and stop with LAST_PAGE. Missing `:LAST_PAGE' implies end of file. While estimating the number of skipped pages each form feed in the input file results in a new page. Page counting with and without `+FIRST_PAGE' is identical. By default, counting starts with the first page of input file (not first page printed). Line numbering may be altered by `-N' option. `-COLUMN' `--columns=COLUMN' With each single FILE, produce COLUMN columns of output (default is 1) and print columns down, unless `-a' is used. The column width is automatically decreased as COLUMN increases; unless you use the `-W/-w' option to increase PAGE_WIDTH as well. This option might well cause some lines to be truncated. The number of lines in the columns on each page are balanced. The options `-e' and `-i' are on for multiple text-column output. Together with `-J' option column alignment and line truncation is turned off. Lines of full length are joined in a free field format and `-S' option may set field separators. `-COLUMN' may not be used with `-m' option. `-a' `--across' With each single FILE, print columns across rather than down. The `-COLUMN' option must be given with COLUMN greater than one. If a line is too long to fit in a column, it is truncated. `-c' `--show-control-chars' Print control characters using hat notation (e.g., `^G'); print other nonprinting characters in octal backslash notation. By default, nonprinting characters are not changed. `-d' `--double-space' Double space the output. `-D FORMAT' `--date-format=FORMAT' Format header dates using FORMAT, using the same conventions as for the the command `date +FORMAT'; *Note date invocation::. Except for directives, which start with `%', characters in FORMAT are printed unchanged. You can use this option to specify an arbitrary string in place of the header date, e.g., `--date-format="Monday morning"'. If the `POSIXLY_CORRECT' environment variable is not set, the date format defaults to `%Y-%m-%d %H:%M' (for example, `2001-12-04 23:59'); otherwise, the format depends on the `LC_TIME' locale category, with the default being `%b %e %H:%M %Y' (for example, `Dec 4 23:59 2001'. `-e[IN-TABCHAR[IN-TABWIDTH]]' `--expand-tabs[=IN-TABCHAR[IN-TABWIDTH]]' Expand TABs to spaces on input. Optional argument IN-TABCHAR is the input tab character (default is the TAB character). Second optional argument IN-TABWIDTH is the input tab character's width (default is 8). `-f' `-F' `--form-feed' Use a form feed instead of newlines to separate output pages. The default page length of 66 lines is not altered. But the number of lines of text per page changes from default 56 to 63 lines. `-h HEADER' `--header=HEADER' Replace the filename in the header with the centered string HEADER. When using the shell, HEADER should be quoted and should be separated from `-h' by a space. `-i[OUT-TABCHAR[OUT-TABWIDTH]]' `--output-tabs[=OUT-TABCHAR[OUT-TABWIDTH]]' Replace spaces with TABs on output. Optional argument OUT-TABCHAR is the output tab character (default is the TAB character). Second optional argument OUT-TABWIDTH is the output tab character's width (default is 8). `-J' `--join-lines' Merge lines of full length. Used together with the column options `-COLUMN', `-a -COLUMN' or `-m'. Turns off `-W/-w' line truncation; no column alignment used; may be used with `--sep-string[=STRING]'. `-J' has been introduced (together with `-W' and `--sep-string') to disentangle the old (POSIX-compliant) options `-w' and `-s' along with the three column options. `-l PAGE_LENGTH' `--length=PAGE_LENGTH' Set the page length to PAGE_LENGTH (default 66) lines, including the lines of the header [and the footer]. If PAGE_LENGTH is less than or equal to 10 (or <= 3 with `-F'), the header and footer are omitted, and all form feeds set in input files are eliminated, as if the `-T' option had been given. `-m' `--merge' Merge and print all FILEs in parallel, one in each column. If a line is too long to fit in a column, it is truncated, unless the `-J' option is used. `--sep-string[=STRING]' may be used. Empty pages in some FILEs (form feeds set) produce empty columns, still marked by STRING. The result is a continuous line numbering and column marking throughout the whole merged file. Completely empty merged pages show no separators or line numbers. The default header becomes `DATE PAGE' with spaces inserted in the middle; this may be used with the `-h' or `--header' option to fill up the middle blank part. `-n[NUMBER-SEPARATOR[DIGITS]]' `--number-lines[=NUMBER-SEPARATOR[DIGITS]]' Provide DIGITS digit line numbering (default for DIGITS is 5). With multicolumn output the number occupies the first DIGITS column positions of each text column or only each line of `-m' output. With single column output the number precedes each line just as `-m' does. Default counting of the line numbers starts with the first line of the input file (not the first line printed, compare the `--page' option and `-N' option). Optional argument NUMBER-SEPARATOR is the character appended to the line number to separate it from the text followed. The default separator is the TAB character. In a strict sense a TAB is always printed with single column output only. The TAB-width varies with the TAB-position, e.g. with the left MARGIN specified by `-o' option. With multicolumn output priority is given to `equal width of output columns' (a POSIX specification). The TAB-width is fixed to the value of the first column and does not change with different values of left MARGIN. That means a fixed number of spaces is always printed in the place of the NUMBER-SEPARATOR TAB. The tabification depends upon the output position. `-N LINE_NUMBER' `--first-line-number=LINE_NUMBER' Start line counting with the number LINE_NUMBER at first line of first page printed (in most cases not the first line of the input file). `-o MARGIN' `--indent=MARGIN' Indent each line with a margin MARGIN spaces wide (default is zero). The total page width is the size of the margin plus the PAGE_WIDTH set with the `-W/-w' option. A limited overflow may occur with numbered single column output (compare `-n' option). `-r' `--no-file-warnings' Do not print a warning message when an argument FILE cannot be opened. (The exit status will still be nonzero, however.) `-s[CHAR]' `--separator[=CHAR]' Separate columns by a single character CHAR. The default for CHAR is the TAB character without `-w' and `no character' with `-w'. Without `-s' the default separator `space' is set. `-s[char]' turns off line truncation of all three column options (`-COLUMN'|`-a -COLUMN'|`-m') unless `-w' is set. This is a POSIX-compliant formulation. `-S STRING' `--sep-string[=STRING]' Use STRING to separate output columns. The `-S' option doesn't affect the `-W/-w' option, unlike the `-s' option which does. It does not affect line truncation or column alignment. Without `-S', and with `-J', `pr' uses the default output separator, TAB. Without `-S' or `-J', `pr' uses a `space' (same as `-S" "'). With `-SSTRING', STRING must be nonempty; `--sep-string' with no STRING is equivalent to `--sep-string=""'. On older systems, `pr' instead supports an obsolete option `-S[STRING]', where STRING is optional. POSIX 1003.1-2001 (*note Standards conformance::) does not allow this older usage. To specify an empty STRING portably, use `--sep-string'. `-t' `--omit-header' Do not print the usual header [and footer] on each page, and do not fill out the bottom of pages (with blank lines or a form feed). No page structure is produced, but form feeds set in the input files are retained. The predefined pagination is not changed. `-t' or `-T' may be useful together with other options; e.g.: `-t -e4', expand TAB characters in the input file to 4 spaces but don't make any other changes. Use of `-t' overrides `-h'. `-T' `--omit-pagination' Do not print header [and footer]. In addition eliminate all form feeds set in the input files. `-v' `--show-nonprinting' Print nonprinting characters in octal backslash notation. `-w PAGE_WIDTH' `--width=PAGE_WIDTH' Set page width to PAGE_WIDTH characters for multiple text-column output only (default for PAGE_WIDTH is 72). `-s[CHAR]' turns off the default page width and any line truncation and column alignment. Lines of full length are merged, regardless of the column options set. No PAGE_WIDTH setting is possible with single column output. A POSIX-compliant formulation. `-W PAGE_WIDTH' `--page_width=PAGE_WIDTH' Set the page width to PAGE_WIDTH characters. That's valid with and without a column option. Text lines are truncated, unless `-J' is used. Together with one of the three column options (`-COLUMN', `-a -COLUMN' or `-m') column alignment is always used. The separator options `-S' or `-s' don't affect the `-W' option. Default is 72 characters. Without `-W PAGE_WIDTH' and without any of the column options NO line truncation is used (defined to keep downward compatibility and to meet most frequent tasks). That's equivalent to `-W 72 -J'. The header line is never truncated. `fold': Wrap input lines to fit in specified width ================================================== `fold' writes each FILE (`-' means standard input), or standard input if none are given, to standard output, breaking long lines. Synopsis: fold [OPTION]... [FILE]... By default, `fold' breaks lines wider than 80 columns. The output is split into as many lines as necessary. `fold' counts screen columns by default; thus, a tab may count more than one column, backspace decreases the column count, and carriage return sets the column to zero. The program accepts the following options. Also see *Note Common options::. `-b' `--bytes' Count bytes rather than columns, so that tabs, backspaces, and carriage returns are each counted as taking up one column, just like other characters. `-s' `--spaces' Break at word boundaries: the line is broken after the last blank before the maximum line length. If the line contains no such blanks, the line is broken at the maximum line length as usual. `-w WIDTH' `--width=WIDTH' Use a maximum line length of WIDTH columns instead of 80. On older systems, `fold' supports an obsolete option `-WIDTH'. POSIX 1003.1-2001 (*note Standards conformance::) does not allow this; use `-w WIDTH' instead. Output of parts of files ************************ These commands output pieces of the input. `head': Output the first part of files ====================================== `head' prints the first part (10 lines by default) of each FILE; it reads from standard input if no files are given or when given a FILE of `-'. Synopsis: head [OPTION]... [FILE]... If more than one FILE is specified, `head' prints a one-line header consisting of ==> FILE NAME <== before the output for each FILE. The program accepts the following options. Also see *Note Common options::. `-c BYTES' `--bytes=BYTES' Print the first BYTES bytes, instead of initial lines. Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by 1048576. `-n N' `--lines=N' Output the first N lines. `-q' `--quiet' `--silent' Never print file name headers. `-v' `--verbose' Always print file name headers. On older systems, `head' supports an obsolete option `-COUNTOPTIONS', which is recognized only if it is specified first. COUNT is a decimal number optionally followed by a size letter (`b', `k', `m') as in `-c', or `l' to mean count by lines, or other option letters (`cqv'). POSIX 1003.1-2001 (*note Standards conformance::) does not allow this; use `-c COUNT' or `-n COUNT' instead. `tail': Output the last part of files ===================================== `tail' prints the last part (10 lines by default) of each FILE; it reads from standard input if no files are given or when given a FILE of `-'. Synopsis: tail [OPTION]... [FILE]... If more than one FILE is specified, `tail' prints a one-line header consisting of ==> FILE NAME <== before the output for each FILE. GNU `tail' can output any amount of data (some other versions of `tail' cannot). It also has no `-r' option (print in reverse), since reversing a file is really a different job from printing the end of a file; BSD `tail' (which is the one with `-r') can only reverse files that are at most as large as its buffer, which is typically 32 KiB. A more reliable and versatile way to reverse files is the GNU `tac' command. If any option-argument is a number N starting with a `+', `tail' begins printing with the Nth item from the start of each file, instead of from the end. The program accepts the following options. Also see *Note Common options::. `-c BYTES' `--bytes=BYTES' Output the last BYTES bytes, instead of final lines. Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by 1048576. `-f' `--follow[=HOW]' Loop forever trying to read more characters at the end of the file, presumably because the file is growing. This option is ignored when reading from a pipe. If more than one file is given, `tail' prints a header whenever it gets output from a different file, to indicate which file that output is from. There are two ways to specify how you'd like to track files with this option, but that difference is noticeable only when a followed file is removed or renamed. If you'd like to continue to track the end of a growing file even after it has been unlinked, use `--follow=descriptor'. This is the default behavior, but it is not useful if you're tracking a log file that may be rotated (removed or renamed, then reopened). In that case, use `--follow=name' to track the named file by reopening it periodically to see if it has been removed and recreated by some other program. No matter which method you use, if the tracked file is determined to have shrunk, `tail' prints a message saying the file has been truncated and resumes tracking the end of the file from the newly-determined endpoint. When a file is removed, `tail''s behavior depends on whether it is following the name or the descriptor. When following by name, tail can detect that a file has been removed and gives a message to that effect, and if `--retry' has been specified it will continue checking periodically to see if the file reappears. When following a descriptor, tail does not detect that the file has been unlinked or renamed and issues no message; even though the file may no longer be accessible via its original name, it may still be growing. The option values `descriptor' and `name' may be specified only with the long form of the option, not with `-f'. `-F' This option is the same as `--follow=name --retry'. That is, tail will attempt to reopen a file when it is removed. Should this fail, tail will keep trying until it becomes accessible again. `--retry' This option is meaningful only when following by name. Without this option, when tail encounters a file that doesn't exist or is otherwise inaccessible, it reports that fact and never checks it again. `--sleep-interval=NUMBER' Change the number of seconds to wait between iterations (the default is 1.0). During one iteration, every specified file is checked to see if it has Historical implementations of `tail' have required that NUMBER be an integer. However, GNU `tail' accepts an arbitrary floating point number. `--pid=PID' When following by name or by descriptor, you may specify the process ID, PID, of the sole writer of all FILE arguments. Then, shortly after that process terminates, tail will also terminate. This will work properly only if the writer and the tailing process are running on the same machine. For example, to save the output of a build in a file and to watch the file grow, if you invoke `make' and `tail' like this then the tail process will stop when your build completes. Without this option, you would have had to kill the `tail -f' process yourself. $ make >& makerr & tail --pid=$! -f makerr If you specify a PID that is not in use or that does not correspond to the process that is writing to the tailed files, then `tail' may terminate long before any FILEs stop growing or it may not terminate until long after the real writer has terminated. Note that `--pid' cannot be supported on some systems; `tail' will print a warning if this is the case. `--max-unchanged-stats=N' When tailing a file by name, if there have been N (default n=5) consecutive iterations for which the size has remained the same, then `open'/`fstat' the file to determine if that file name is still associated with the same device/inode-number pair as before. When following a log file that is rotated, this is approximately the number of seconds between when tail prints the last pre-rotation lines and when it prints the lines that have accumulated in the new log file. This option is meaningful only when following by name. `-n N' `--lines=N' Output the last N lines. `-q' `--quiet' `--silent' Never print file name headers. `-v' `--verbose' Always print file name headers. On older systems, `tail' supports an obsolete option `-COUNTOPTIONS', which is recognized only if it is specified first. COUNT is a decimal number optionally followed by a size letter (`b', `k', `m') as in `-c', or `l' to mean count by lines, or other option letters (`cfqv'). Some older `tail' implementations also support an obsolete option `+COUNT' with the same meaning as `-+COUNT'. POSIX 1003.1-2001 (*note Standards conformance::) does not allow these options; use `-c COUNT' or `-n COUNT' instead. `split': Split a file into fixed-size pieces ============================================ `split' creates output files containing consecutive sections of INPUT (standard input if none is given or INPUT is `-'). Synopsis: split [OPTION] [INPUT [PREFIX]] By default, `split' puts 1000 lines of INPUT (or whatever is left over for the last section), into each output file. The output files' names consist of PREFIX (`x' by default) followed by a group of letters (`aa', `ab', ... by default), such that concatenating the output files in sorted order by file name produces the original input file. If the output file names are exhausted, `split' reports an error without deleting the output files that it did create. The program accepts the following options. Also see *Note Common options::. `-a LENGTH' `--suffix-length=LENGTH' Use suffixes of length LENGTH. The default LENGTH is 2. `-l LINES' `--lines=LINES' Put LINES lines of INPUT into each output file. On older systems, `split' supports an obsolete option `-LINES'. POSIX 1003.1-2001 (*note Standards conformance::) does not allow this; use `-l LINES' instead. `-b BYTES' `--bytes=BYTES' Put the first BYTES bytes of INPUT into each output file. Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by 1048576. `-C BYTES' `--line-bytes=BYTES' Put into each output file as many complete lines of INPUT as possible without exceeding BYTES bytes. For lines longer than BYTES bytes, put BYTES bytes into each output file until less than BYTES bytes of the line are left, then continue normally. BYTES has the same format as for the `--bytes' option. `--verbose' Write a diagnostic to standard error just before each output file is opened. `csplit': Split a file into context-determined pieces ===================================================== `csplit' creates zero or more output files containing sections of INPUT (standard input if INPUT is `-'). Synopsis: csplit [OPTION]... INPUT PATTERN... The contents of the output files are determined by the PATTERN arguments, as detailed below. An error occurs if a PATTERN argument refers to a nonexistent line of the input file (e.g., if no remaining line matches a given regular expression). After every PATTERN has been matched, any remaining input is copied into one last output file. By default, `csplit' prints the number of bytes written to each output file after it has been created. The types of pattern arguments are: `N' Create an output file containing the input up to but not including line N (a positive integer). If followed by a repeat count, also create an output file containing the next LINE lines of the input file once for each repeat. `/REGEXP/[OFFSET]' Create an output file containing the current line up to (but not including) the next line of the input file that contains a match for REGEXP. The optional OFFSET is a `+' or `-' followed by a positive integer. If it is given, the input up to the matching line plus or minus OFFSET is put into the output file, and the line after that begins the next section of input. `%REGEXP%[OFFSET]' Like the previous type, except that it does not create an output file, so that section of the input file is effectively ignored. `{REPEAT-COUNT}' Repeat the previous pattern REPEAT-COUNT additional times. REPEAT-COUNT can either be a positive integer or an asterisk, meaning repeat as many times as necessary until the input is exhausted. The output files' names consist of a prefix (`xx' by default) followed by a suffix. By default, the suffix is an ascending sequence of two-digit decimal numbers from `00' to `99'. In any case, concatenating the output files in sorted order by filename produces the original input file. By default, if `csplit' encounters an error or receives a hangup, interrupt, quit, or terminate signal, it removes any output files that it has created so far before it exits. The program accepts the following options. Also see *Note Common options::. `-f PREFIX' `--prefix=PREFIX' Use PREFIX as the output file name prefix. `-b SUFFIX' `--suffix=SUFFIX' Use SUFFIX as the output file name suffix. When this option is specified, the suffix string must include exactly one `printf(3)'-style conversion specification, possibly including format specification flags, a field width, a precision specifications, or all of these kinds of modifiers. The format letter must convert a binary integer argument to readable form; thus, only `d', `i', `u', `o', `x', and `X' conversions are allowed. The entire SUFFIX is given (with the current output file number) to `sprintf(3)' to form the file name suffixes for each of the individual output files in turn. If this option is used, the `--digits' option is ignored. `-n DIGITS' `--digits=DIGITS' Use output file names containing numbers that are DIGITS digits long instead of the default 2. `-k' `--keep-files' Do not remove output files when errors are encountered. `-z' `--elide-empty-files' Suppress the generation of zero-length output files. (In cases where the section delimiters of the input file are supposed to mark the first lines of each of the sections, the first output file will generally be a zero-length file unless you use this option.) The output file sequence numbers always run consecutively starting from 0, even when this option is specified. `-s' `-q' `--silent' `--quiet' Do not print counts of output file sizes. Summarizing files ***************** These commands generate just a few numbers representing entire contents of files. `wc': Print byte, word, and line counts ======================================= `wc' counts the number of bytes, characters, whitespace-separated words, and newlines in each given FILE, or standard input if none are given or for a FILE of `-'. Synopsis: wc [OPTION]... [FILE]... `wc' prints one line of counts for each file, and if the file was given as an argument, it prints the file name following the counts. If more than one FILE is given, `wc' prints a final line containing the cumulative counts, with the file name `total'. The counts are printed in this order: newlines, words, characters, bytes. By default, each count is output right-justified in a 7-byte field with one space between fields so that the numbers and file names line up nicely in columns. However, POSIX requires that there be exactly one space separating columns. You can make `wc' use the POSIX-mandated output format by setting the `POSIXLY_CORRECT' environment variable. By default, `wc' prints three counts: the newline, words, and byte counts. Options can specify that only certain counts be printed. Options do not undo others previously given, so wc --bytes --words prints both the byte counts and the word counts. With the `--max-line-length' option, `wc' prints the length of the longest line per file, and if there is more than one file it prints the maximum (not the sum) of those lengths. The program accepts the following options. Also see *Note Common options::. `-c' `--bytes' Print only the byte counts. `-m' `--chars' Print only the character counts. `-w' `--words' Print only the word counts. `-l' `--lines' Print only the newline counts. `-L' `--max-line-length' Print only the maximum line lengths. `sum': Print checksum and block counts ====================================== `sum' computes a 16-bit checksum for each given FILE, or standard input if none are given or for a FILE of `-'. Synopsis: sum [OPTION]... [FILE]... `sum' prints the checksum for each FILE followed by the number of blocks in the file (rounded up). If more than one FILE is given, file names are also printed (by default). (With the `--sysv' option, corresponding file names are printed when there is at least one file argument.) By default, GNU `sum' computes checksums using an algorithm compatible with BSD `sum' and prints file sizes in units of 1024-byte blocks. The program accepts the following options. Also see *Note Common options::. `-r' Use the default (BSD compatible) algorithm. This option is included for compatibility with the System V `sum'. Unless `-s' was also given, it has no effect. `-s' `--sysv' Compute checksums using an algorithm compatible with System V `sum''s default, and print file sizes in units of 512-byte blocks. `sum' is provided for compatibility; the `cksum' program (see next section) is preferable in new applications. `cksum': Print CRC checksum and byte counts =========================================== `cksum' computes a cyclic redundancy check (CRC) checksum for each given FILE, or standard input if none are given or for a FILE of `-'. Synopsis: cksum [OPTION]... [FILE]... `cksum' prints the CRC checksum for each file along with the number of bytes in the file, and the filename unless no arguments were given. `cksum' is typically used to ensure that files transferred by unreliable means (e.g., netnews) have not been corrupted, by comparing the `cksum' output for the received files with the `cksum' output for the original files (typically given in the distribution). The CRC algorithm is specified by the POSIX standard. It is not compatible with the BSD or System V `sum' algorithms (see the previous section); it is more robust. The only options are `--help' and `--version'. *Note Common options::. `md5sum': Print or check message-digests ======================================== `md5sum' computes a 128-bit checksum (or "fingerprint" or "message-digest") for each specified FILE. If a FILE is specified as `-' or if no files are given `md5sum' computes the checksum for the standard input. `md5sum' can also determine whether a file and checksum are consistent. Synopses: md5sum [OPTION]... [FILE]... md5sum [OPTION]... --check [FILE] For each FILE, `md5sum' outputs the MD5 checksum, a flag indicating a binary or text input file, and the filename. If FILE is omitted or specified as `-', standard input is read. The program accepts the following options. Also see *Note Common options::. `-b' `--binary' Treat all input files as binary. This option has no effect on Unix systems, since they don't distinguish between binary and text files. This option is useful on systems that have different internal and external character representations. On MS-DOS and MS-Windows, this is the default. `-c' `--check' Read filenames and checksum information from the single FILE (or from stdin if no FILE was specified) and report whether each named file and the corresponding checksum data are consistent. The input to this mode of `md5sum' is usually the output of a prior, checksum-generating run of `md5sum'. Each valid line of input consists of an MD5 checksum, a binary/text flag, and then a filename. Binary files are marked with `*', text with ` '. For each such line, `md5sum' reads the named file and computes its MD5 checksum. Then, if the computed message digest does not match the one on the line with the filename, the file is noted as having failed the test. Otherwise, the file passes the test. By default, for each valid line, one line is written to standard output indicating whether the named file passed the test. After all checks have been performed, if there were any failures, a warning is issued to standard error. Use the `--status' option to inhibit that output. If any listed file cannot be opened or read, if any valid line has an MD5 checksum inconsistent with the associated file, or if no valid line is found, `md5sum' exits with nonzero status. Otherwise, it exits successfully. `--status' This option is useful only when verifying checksums. When verifying checksums, don't generate the default one-line-per-file diagnostic and don't output the warning summarizing any failures. Failures to open or read a file still evoke individual diagnostics to standard error. If all listed files are readable and are consistent with the associated MD5 checksums, exit successfully. Otherwise exit with a status code indicating there was a failure. `-t' `--text' Treat all input files as text files. This is the reverse of `--binary'. `-w' `--warn' When verifying checksums, warn about improperly formatted MD5 checksum lines. This option is useful only if all but a few lines in the checked input are valid. Operating on sorted files ************************* These commands work with (or produce) sorted files. `sort': Sort text files ======================= `sort' sorts, merges, or compares all the lines from the given files, or standard input if none are given or for a FILE of `-'. By default, `sort' writes the results to standard output. Synopsis: sort [OPTION]... [FILE]... `sort' has three modes of operation: sort (the default), merge, and check for sortedness. The following options change the operation mode: `-c' `--check' Check whether the given files are already sorted: if they are not all sorted, print an error message and exit with a status of 1. Otherwise, exit successfully. `-m' `--merge' Merge the given files by sorting them as a group. Each input file must always be individually sorted. It always works to sort instead of merge; merging is provided because it is faster, in the case where it works. A pair of lines is compared as follows: if any key fields have been specified, `sort' compares each pair of fields, in the order specified on the command line, according to the associated ordering options, until a difference is found or no fields are left. Unless otherwise specified, all comparisons use the character collating sequence specified by the `LC_COLLATE' locale. (1) If any of the global options `bdfgiMnr' are given but no key fields are specified, `sort' compares the entire lines according to the global options. Finally, as a last resort when all keys compare equal (or if no ordering options were specified at all), `sort' compares the entire lines. The last resort comparison honors the `--reverse' (`-r') global option. The `--stable' (`-s') option disables this last-resort comparison so that lines in which all fields compare equal are left in their original relative order. If no fields or global options are specified, `--stable' (`-s') has no effect. GNU `sort' (as specified for all GNU utilities) has no limits on input line length or restrictions on bytes allowed within lines. In addition, if the final byte of an input file is not a newline, GNU `sort' silently supplies one. A line's trailing newline is not part of the line for comparison purposes. Upon any error, `sort' exits with a status of `2'. If the environment variable `TMPDIR' is set, `sort' uses its value as the directory for temporary files instead of `/tmp'. The `--temporary-directory' (`-T') option in turn overrides the environment variable. The following options affect the ordering of output lines. They may be specified globally or as part of a specific key field. If no key fields are specified, global options apply to comparison of entire lines; otherwise the global options are inherited by key fields that do not specify any special options of their own. In pre-POSIX versions of `sort', global options affect only later key fields, so portable shell scripts should specify global options first. `-b' `--ignore-leading-blanks' Ignore leading blanks when finding sort keys in each line. The `LC_CTYPE' locale determines character types. `-d' `--dictionary-order' Sort in "phone directory" order: ignore all characters except letters, digits and blanks when sorting. The `LC_CTYPE' locale determines character types. `-f' `--ignore-case' Fold lowercase characters into the equivalent uppercase characters when comparing so that, for example, `b' and `B' sort as equal. The `LC_CTYPE' locale determines character types. `-g' `--general-numeric-sort' Sort numerically, using the standard C function `strtod' to convert a prefix of each line to a double-precision floating point number. This allows floating point numbers to be specified in scientific notation, like `1.0e-34' and `10e100'. The `LC_NUMERIC' locale determines the decimal-point character. Do not report overflow, underflow, or conversion errors. Use the following collating sequence: * Lines that do not start with numbers (all considered to be equal). * NaNs ("Not a Number" values, in IEEE floating point arithmetic) in a consistent but machine-dependent order. * Minus infinity. * Finite numbers in ascending numeric order (with -0 and +0 equal). * Plus infinity. Use this option only if there is no alternative; it is much slower than `--numeric-sort' (`-n') and it can lose information when converting to floating point. `-i' `--ignore-nonprinting' Ignore nonprinting characters. The `LC_CTYPE' locale determines character types. `-M' `--month-sort' An initial string, consisting of any amount of whitespace, followed by a month name abbreviation, is folded to UPPER case and compared in the order `JAN' < `FEB' < ... < `DEC'. Invalid names compare low to valid names. The `LC_TIME' locale category determines the month spellings. `-n' `--numeric-sort' Sort numerically: the number begins each line; specifically, it consists of optional whitespace, an optional `-' sign, and zero or more digits possibly separated by thousands separators, optionally followed by a decimal-point character and zero or more digits. The `LC_NUMERIC' locale specifies the decimal-point character and thousands separator. Numeric sort uses what might be considered an unconventional method to compare strings representing floating point numbers. Rather than first converting each string to the C `double' type and then comparing those values, `sort' aligns the decimal-point characters in the two strings and compares the strings a character at a time. One benefit of using this approach is its speed. In practice this is much more efficient than performing the two corresponding string-to-double (or even string-to-integer) conversions and then comparing doubles. In addition, there is no corresponding loss of precision. Converting each string to `double' before comparison would limit precision to about 16 digits on most systems. Neither a leading `+' nor exponential notation is recognized. To compare such strings numerically, use the `--general-numeric-sort' (`-g') option. `-r' `--reverse' Reverse the result of comparison, so that lines with greater key values appear earlier in the output instead of later. Other options are: `-o OUTPUT-FILE' `--output=OUTPUT-FILE' Write output to OUTPUT-FILE instead of standard output. If necessary, `sort' reads input before opening OUTPUT-FILE, so you can safely sort a file in place by using commands like `sort -o F F' and `cat F | sort -o F'. On newer systems, `-o' cannot appear after an input file if `POSIXLY_CORRECT' is set, e.g., `sort F -o F'. Portable scripts should specify `-o OUTPUT-FILE' before any input files. `-S SIZE' `--buffer-size=SIZE' Use a main-memory sort buffer of the given SIZE. By default, SIZE is in units of 1024 bytes. Appending `%' causes SIZE to be interpreted as a percentage of physical memory. Appending `K' multiplies SIZE by 1024 (the default), `M' by 1,048,576, `G' by 1,073,741,824, and so on for `T', `P', `E', `Z', and `Y'. Appending `b' causes SIZE to be interpreted as a byte count, with no multiplication. This option can improve the performance of `sort' by causing it to start with a larger or smaller sort buffer than the default. However, this option affects only the initial buffer size. The buffer grows beyond SIZE if `sort' encounters input lines larger than SIZE. `-t SEPARATOR' `--field-separator=SEPARATOR' Use character SEPARATOR as the field separator when finding the sort keys in each line. By default, fields are separated by the empty string between a non-whitespace character and a whitespace character. That is, given the input line ` foo bar', `sort' breaks it into fields ` foo' and ` bar'. The field separator is not considered to be part of either the field preceding or the field following. But note that sort fields that extend to the end of the line, as `-k 2', or sort fields consisting of a range, as `-k 2,3', retain the field separators present between the endpoints of the range. `-T TEMPDIR' `--temporary-directory=TEMPDIR' Use directory TEMPDIR to store temporary files, overriding the `TMPDIR' environment variable. If this option is given more than once, temporary files are stored in all the directories given. If you have a large sort or merge that is I/O-bound, you can often improve performance by using this option to specify directories on different disks and controllers. `-u' `--unique' Normally, output only the first of a sequence of lines that compare equal. For the `--check' (`-c') option, check that no pair of consecutive lines compares equal. `-k POS1[,POS2]' `--key=POS1[,POS2]' Specify a sort field that consists of the part of the line between POS1 and POS2 (or the end of the line, if POS2 is omitted), _inclusive_. Fields and character positions are numbered starting with 1. So to sort on the second field, you'd use `--key=2,2' (`-k 2,2'). See below for more examples. `-z' `--zero-terminated' Treat the input as a set of lines, each terminated by a zero byte (ASCII NUL (Null) character) instead of an ASCII LF (Line Feed). This option can be useful in conjunction with `perl -0' or `find -print0' and `xargs -0' which do the same in order to reliably handle arbitrary pathnames (even those which contain Line Feed characters.) Historical (BSD and System V) implementations of `sort' have differed in their interpretation of some options, particularly `-b', `-f', and `-n'. GNU sort follows the POSIX behavior, which is usually (but not always!) like the System V behavior. According to POSIX, `-n' no longer implies `-b'. For consistency, `-M' has been changed in the same way. This may affect the meaning of character positions in field specifications in obscure cases. The only fix is to add an explicit `-b'. A position in a sort field specified with the `-k' option has the form `F.C', where F is the number of the field to use and C is the number of the first character from the beginning of the field. In a start position, an omitted `.C' stands for the field's first character. In an end position, an omitted or zero `.C' stands for the field's last character. If the `-b' option was specified, the `.C' part of a field specification is counted from the first nonblank character of the field. A sort key position may also have any of the option letters `Mbdfinr' appended to it, in which case the global ordering options are not used for that particular field. The `-b' option may be independently attached to either or both of the start and end positions of a field specification, and if it is inherited from the global options it will be attached to both. Keys may span multiple fields. On older systems, `sort' supports an obsolete origin-zero syntax `+POS1 [-POS2]' for specifying sort keys. POSIX 1003.1-2001 (*note Standards conformance::) does not allow this; use `-k' instead. Here are some examples to illustrate various combinations of options. * Sort in descending (reverse) numeric order. sort -nr * Sort alphabetically, omitting the first and second fields. This uses a single key composed of the characters beginning at the start of field three and extending to the end of each line. sort -k 3 * Sort numerically on the second field and resolve ties by sorting alphabetically on the third and fourth characters of field five. Use `:' as the field delimiter. sort -t : -k 2,2n -k 5.3,5.4 Note that if you had written `-k 2' instead of `-k 2,2' `sort' would have used all characters beginning in the second field and extending to the end of the line as the primary _numeric_ key. For the large majority of applications, treating keys spanning more than one field as numeric will not do what you expect. Also note that the `n' modifier was applied to the field-end specifier for the first key. It would have been equivalent to specify `-k 2n,2' or `-k 2n,2n'. All modifiers except `b' apply to the associated _field_, regardless of whether the modifier character is attached to the field-start and/or the field-end part of the key specifier. * Sort the password file on the fifth field and ignore any leading white space. Sort lines with equal values in field five on the numeric user ID in field three. sort -t : -k 5b,5 -k 3,3n /etc/passwd An alternative is to use the global numeric modifier `-n'. sort -t : -n -k 5b,5 -k 3,3 /etc/passwd * Generate a tags file in case-insensitive sorted order. find src -type f -print0 | sort -t / -z -f | xargs -0 etags --append The use of `-print0', `-z', and `-0' in this case means that pathnames that contain Line Feed characters will not get broken up by the sort operation. Finally, to ignore both leading and trailing white space, you could have applied the `b' modifier to the field-end specifier for the first key, sort -t : -n -k 5b,5b -k 3,3 /etc/passwd or by using the global `-b' modifier instead of `-n' and an explicit `n' with the second key specifier. sort -t : -b -k 5,5 -k 3,3n /etc/passwd ---------- Footnotes ---------- (1) If you use a non-POSIX locale (e.g., by setting `LC_ALL' to `en_US'), then `sort' may produce output that is sorted differently than you're accustomed to. In that case, set the `LC_ALL' environment variable to `C'. Note that setting only `LC_COLLATE' has two problems. First, it is ineffective if `LC_ALL' is also set. Second, it has undefined behavior if `LC_CTYPE' (or `LANG', if `LC_CTYPE' is unset) is set to an incompatible value. For example, you get undefined behavior if `LC_CTYPE' is `ja_JP.PCK' but `LC_COLLATE' is `en_US.UTF-8'. `uniq': Uniquify files ====================== `uniq' writes the unique lines in the given `input', or standard input if nothing is given or for an INPUT name of `-'. Synopsis: uniq [OPTION]... [INPUT [OUTPUT]] By default, `uniq' prints the unique lines in a sorted file, i.e., discards all but one of identical successive lines. Optionally, it can instead show only lines that appear exactly once, or lines that appear more than once. The input need not be sorted, but duplicate input lines are detected only if they are adjacent. If you want to discard non-adjacent duplicate lines, perhaps you want to use `sort -u'. Comparisons use the character collating sequence specified by the `LC_COLLATE' locale category. If no OUTPUT file is specified, `uniq' writes to standard output. The program accepts the following options. Also see *Note Common options::. `-f N' `--skip-fields=N' Skip N fields on each line before checking for uniqueness. Fields are sequences of non-space non-tab characters that are separated from each other by at least one space or tab. On older systems, `uniq' supports an obsolete option `-N'. POSIX 1003.1-2001 (*note Standards conformance::) does not allow this; use `-f N' instead. `-s N' `--skip-chars=N' Skip N characters before checking for uniqueness. If you use both the field and character skipping options, fields are skipped over first. On older systems, `uniq' supports an obsolete option `+N'. POSIX 1003.1-2001 (*note Standards conformance::) does not allow this; use `-s N' instead. `-c' `--count' Print the number of times each line occurred along with the line. `-i' `--ignore-case' Ignore differences in case when comparing lines. `-d' `--repeated' Print one copy of each duplicate line. `-D' `--all-repeated[=DELIMIT-METHOD]' Print all copies of each duplicate line. This option is useful mainly in conjunction with other options e.g., to ignore case or to compare only selected fields. The optional DELIMIT-METHOD tells how to delimit groups of duplicate lines, and must be one of the following: `none' Do not delimit groups of duplicate lines. This is equivalent to `--all-repeated' (`-D'). `prepend' Output a newline before each group of duplicate lines. `separate' Separate groups of duplicate lines with a single newline. This is the same as using `prepend', except that there is no newline before the first group, and hence may be better suited for output direct to users. Note that when groups are delimited and the input stream contains two or more consecutive blank lines, then the output is ambiguous. To avoid that, filter the input through `tr -s '\n'' to replace each sequence of consecutive newlines with a single newline. This is a GNU extension. `-u' `--unique' Print non-duplicate lines. `-w N' `--check-chars=N' Compare N characters on each line (after skipping any specified fields and characters). By default the entire rest of the lines are compared. `comm': Compare two sorted files line by line ============================================= `comm' writes to standard output lines that are common, and lines that are unique, to two input files; a file name of `-' means standard input. Synopsis: comm [OPTION]... FILE1 FILE2 Before `comm' can be used, the input files must be sorted using the collating sequence specified by the `LC_COLLATE' locale. If an input file ends in a non-newline character, a newline is silently appended. The `sort' command with no options always outputs a file that is suitable input to `comm'. With no options, `comm' produces three column output. Column one contains lines unique to FILE1, column two contains lines unique to FILE2, and column three contains lines common to both files. Columns are separated by a single TAB character. The options `-1', `-2', and `-3' suppress printing of the corresponding columns. Also see *Note Common options::. Unlike some other comparison utilities, `comm' has an exit status that does not depend on the result of the comparison. Upon normal completion `comm' produces an exit code of zero. If there is an error it exits with nonzero status. `tsort': Topological sort ========================= `tsort' performs a topological sort on the given FILE, or standard input if no input file is given or for a FILE of `-'. For more details and some history, see *Note tsort background::. Synopsis: tsort [OPTION] [FILE] `tsort' reads its input as pairs of strings, separated by blanks, indicating a partial ordering. The output is a total ordering that corresponds to the given partial ordering. For example tsort < out $ dd bs=1 skip=252 count=6 < out 2>/dev/null; echo deeper Note that although the listing above includes a trailing slash for the `deeper' entry, the offsets select the name without the trailing slash. However, if you invoke `ls' with `--dired' along with an option like `--escape' (aka `-b') and operate on a file whose name contains special characters, notice that the backslash _is_ included: $ touch 'a b' $ ls -blog --dired 'a b' -rw-r--r-- 1 0 Nov 9 18:41 a\ b //DIRED// 40 44 //DIRED-OPTIONS// --quoting-style=escape If you use a quoting style that adds quote marks (e.g., `--quoting-style=c'), then the offsets include the quote marks. So beware that the user may select the quoting style via the environment variable `QUOTING_STYLE'. Hence, applications using `--dired' should either specify an explicit `--quoting-style=literal' option (aka `-N' or `--literal') on the command line, or else be prepared to parse the escaped names. `--full-time' Produce long format directory listings, and list times in full. It is equivalent to using `--format=long' with `--time-style=full-iso' (*note Formatting file timestamps::). `-g' Produce long format directory listings, but don't display owner information. `-G' `--no-group' Inhibit display of group information in a long format directory listing. (This is the default in some non-GNU versions of `ls', so we provide this option for compatibility.) `-h' `--human-readable' Append a size letter to each size, such as `M' for mebibytes. Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes. This option is equivalent to `--block-size=human' (*note Block size::). Use the `--si' option if you prefer powers of 1000. `-i' `--inode' Print the inode number (also called the file serial number and index number) of each file to the left of the file name. (This number uniquely identifies each file within a particular filesystem.) `-l' `--format=long' `--format=verbose' In addition to the name of each file, print the file type, permissions, number of hard links, owner name, group name, size, and timestamp (*note Formatting file timestamps::), normally the modification time. Normally the size is printed as a byte count without punctuation, but this can be overridden (*note Block size::). For example, `-h' prints an abbreviated, human-readable count, and `--block-size="'1"' prints a byte count with the thousands separator of the current locale. For each directory that is listed, preface the files with a line `total BLOCKS', where BLOCKS is the total disk allocation for all files in that directory. The block size currently defaults to 1024 bytes, but this can be overridden (*note Block size::). The BLOCKS computed counts each hard link separately; this is arguably a deficiency. The permissions listed are similar to symbolic mode specifications (*note Symbolic Modes::). But `ls' combines multiple bits into the third character of each set of permissions as follows: `s' If the setuid or setgid bit and the corresponding executable bit are both set. `S' If the setuid or setgid bit is set but the corresponding executable bit is not set. `t' If the sticky bit and the other-executable bit are both set. `T' If the sticky bit is set but the other-executable bit is not set. `x' If the executable bit is set and none of the above apply. `-' Otherwise. Following the permission bits is a single character that specifies whether an alternate access method applies to the file. When that character is a space, there is no alternate access method. When it is a printing character (e.g., `+'), then there is such a method. `-n' `--numeric-uid-gid' Produce long format directory listings, but display numeric UIDs and GIDs instead of the owner and group names. `-o' Produce long format directory listings, but don't display group information. It is equivalent to using `--format=long' with `--no-group' . `-s' `--size' Print the disk allocation of each file to the left of the file name. This is the amount of disk space used by the file, which is usually a bit more than the file's size, but it can be less if the file has holes. Normally the disk allocation is printed in units of 1024 bytes, but this can be overridden (*note Block size::). For files that are NFS-mounted from an HP-UX system to a BSD system, this option reports sizes that are half the correct values. On HP-UX systems, it reports sizes that are twice the correct values for files that are NFS-mounted from BSD systems. This is due to a flaw in HP-UX; it also affects the HP-UX `ls' program. `--si' Append an SI-style abbreviation to each size, such as `MB' for megabytes. Powers of 1000 are used, not 1024; `MB' stands for 1,000,000 bytes. This option is equivalent to `--block-size=si'. Use the `-h' or `--human-readable' option if you prefer powers of 1024. Sorting the output ------------------ These options change the order in which `ls' sorts the information it outputs. By default, sorting is done by character code (e.g., ASCII order). `-c' `--time=ctime' `--time=status' `--time=use' If the long listing format (e.g., `-l', `-o') is being used, print the status change time (the `ctime' in the inode) instead of the modification time. When explicitly sorting by time (`--sort=time' or `-t') or when not using a long listing format, sort according to the status change time. `-f' Primarily, like `-U'--do not sort; list the files in whatever order they are stored in the directory. But also enable `-a' (list all files) and disable `-l', `--color', and `-s' (if they were specified before the `-f'). `-r' `--reverse' Reverse whatever the sorting method is--e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever. `-S' `--sort=size' Sort by file size, largest first. `-t' `--sort=time' Sort by modification time (the `mtime' in the inode), newest first. `-u' `--time=atime' `--time=access' If the long listing format (e.g., `--format=long') is being used, print the last access time (the `atime' in the inode). When explicitly sorting by time (`--sort=time' or `-t') or when not using a long listing format, sort according to the access time. `-U' `--sort=none' Do not sort; list the files in whatever order they are stored in the directory. (Do not do any of the other unrelated things that `-f' does.) This is especially useful when listing very large directories, since not doing any sorting can be noticeably faster. `-v' `--sort=version' Sort by version name and number, lowest first. It behaves like a default sort, except that each sequence of decimal digits is treated numerically as an index/version number. (*Note More details about version sort::.) `-X' `--sort=extension' Sort directory contents alphabetically by file extension (characters after the last `.'); files with no extension are sorted first. More details about version sort ------------------------------- The version sort takes into account the fact that file names frequently include indices or version numbers. Standard sorting functions usually do not produce the ordering that people expect because comparisons are made on a character-by-character basis. The version sort addresses this problem, and is especially useful when browsing directories that contain many files with indices/version numbers in their names: > ls -1 > ls -1v foo.zml-1.gz foo.zml-1.gz foo.zml-100.gz foo.zml-2.gz foo.zml-12.gz foo.zml-6.gz foo.zml-13.gz foo.zml-12.gz foo.zml-2.gz foo.zml-13.gz foo.zml-25.gz foo.zml-25.gz foo.zml-6.gz foo.zml-100.gz Note also that numeric parts with leading zeroes are considered as fractional one: > ls -1 > ls -1v abc-1.007.tgz abc-1.007.tgz abc-1.012b.tgz abc-1.01a.tgz abc-1.01a.tgz abc-1.012b.tgz General output formatting ------------------------- These options affect the appearance of the overall output. `-1' `--format=single-column' List one file per line. This is the default for `ls' when standard output is not a terminal. `-C' `--format=vertical' List files in columns, sorted vertically. This is the default for `ls' if standard output is a terminal. It is always the default for the `dir' and `d' programs. GNU `ls' uses variable width columns to display as many files as possible in the fewest lines. `--color [=WHEN]' Specify whether to use color for distinguishing file types. WHEN may be omitted, or one of: * none - Do not use color at all. This is the default. * auto - Only use color if standard output is a terminal. * always - Always use color. Specifying `--color' and no WHEN is equivalent to `--color=always'. Piping a colorized listing through a pager like `more' or `less' usually produces unreadable results. However, using `more -f' does seem to work. `-F' `--classify' `--indicator-style=classify' Append a character to each file name indicating the file type. Also, for regular files that are executable, append `*'. The file type indicators are `/' for directories, `@' for symbolic links, `|' for FIFOs, `=' for sockets, and nothing for regular files. Do not follow symbolic links listed on the command line unless the `--dereference-command-line' (`-H') or `--dereference' (`-L') options are specified. `--indicator-style=WORD' Append a character indicator with style WORD to entry names, as follows: `none' Do not append any character indicator; this is the default. `file-type' Append `/' for directories, `@' for symbolic links, `|' for FIFOs, `=' for sockets, and nothing for regular files. This is the same as the `-p' or `--file-type' option. `classify' Append `*' for executable regular files, otherwise behave as for `file-type'. This is the same as the `-F' or `--classify' option. `-k' Print file sizes in 1024-byte blocks, overriding the default block size (*note Block size::). This option is equivalent to `--block-size=1K'. `-m' `--format=commas' List files horizontally, with as many as will fit on each line, separated by `, ' (a comma and a space). `-p' `--file-type' `--indicator-style=file-type' Append a character to each file name indicating the file type. This is like `-F', except that executables are not marked. `-x FORMAT' `--format=across' `--format=horizontal' List the files in columns, sorted horizontally. `-T COLS' `--tabsize=COLS' Assume that each tabstop is COLS columns wide. The default is 8. `ls' uses tabs where possible in the output, for efficiency. If COLS is zero, do not use tabs at all. `-w' `--width=COLS' Assume the screen is COLS columns wide. The default is taken from the terminal settings if possible; otherwise the environment variable `COLUMNS' is used if it is set; otherwise the default is 80. Formatting file timestamps -------------------------- By default, file timestamps are listed in abbreviated form. Most locales use a timestamp like `2002-03-30 23:45'. However, the default POSIX locale uses a date like `Mar 30 2002' for non-recent timestamps, and a date-without-year and time like `Mar 30 23:45' for recent timestamps. A timestamp is considered to be "recent" if it is less than six months old, and is not dated in the future. If a timestamp dated today is not listed in recent form, the timestamp is in the future, which means you probably have clock skew problems which may break programs like `make' that rely on file timestamps. The following option changes how file timestamps are printed. `--time-style=STYLE' List timestamps in style STYLE. The STYLE should be one of the following: `+FORMAT' List timestamps using FORMAT, where FORMAT is interpreted like the format argument of `date' (*note date invocation::). For example, `--time-style="+%Y-%m-%d %H:%M:S"' causes `ls' to list timestamps like `2002-03-30 23:45:56'. As with `date', FORMAT's interpretation is affected by the `LC_TIME' locale category. If FORMAT contains two format strings separated by a newline, the former is used for non-recent files and the latter for recent files; if you want output columns to line up, you may need to insert spaces in one of the two formats. `full-iso' List timestamps in full using ISO 8601 date, time, and time zone format with nanosecond precision, e.g., `2002-03-30 23:45:56.477817180 -0700'. This style is equivalent to `+%Y-%m-%d %H:%M:%S.%N %z'. This is useful because the time output includes all the information that is available from the operating system. For example, this can help explain `make''s behavior, since GNU `make' uses the full timestamp to determine whether a file is out of date. `long-iso' List ISO 8601 date and time in minutes, e.g., `2002-03-30 23:45'. These timestamps are shorter than `full-iso' timestamps, and are usually good enough for everyday work. This style is equivalent to `%Y-%m-%d %H:%M'. `iso' List ISO 8601 dates for non-recent timestamps (e.g., `2002-03-30 '), and ISO 8601 month, day, hour, and minute for recent timestamps (e.g., `03-30 23:45'). These timestamps are uglier than `long-iso' timestamps, but they carry nearly the same information in a smaller space and their brevity helps `ls' output fit within traditional 80-column output lines. The following two `ls' invocations are equivalent: newline=' ' ls -l --time-style="+%Y-%m-%d $newline%m-%d %H:%M" ls -l --time-style="iso" `locale' List timestamps in a locale-dependent form. For example, a Finnish locale might list non-recent timestamps like `maalis 30 2002' and recent timestamps like `maalis 30 23:45'. Locale-dependent timestamps typically consume more space than `iso' timestamps and are harder for programs to parse because locale conventions vary so widely, but they are easier for many people to read. The `LC_TIME' locale category specifies the timestamp format. The default POSIX locale uses timestamps like `Mar 30 2002' and `Mar 30 23:45'; in this locale, the following two `ls' invocations are equivalent: newline=' ' ls -l --time-style="+%b %e %Y$newline%b %e %H:%M" ls -l --time-style="locale" Other locales behave differently. For example, in a German locale, `--time-style="locale"' might be equivalent to `--time-style="+%e. %b %Y $newline%e. %b %H:%M"' and might generate timestamps like `30. Ma"r 2002 ' and `30. Ma"r 23:45'. `posix-STYLE' List POSIX-locale timestamps if the `LC_TIME' locale category is POSIX, STYLE timestamps otherwise. For example, the default style, which is `posix-long-iso', lists timestamps like `Mar 30 2002' and `Mar 30 23:45' when in the POSIX locale, and like `2002-03-30 23:45' otherwise. You can specify the default value of the `--time-style' option with the environment variable `TIME_STYLE'; if `TIME_STYLE' is not set the default style is `posix-long-iso'. GNU Emacs 21 and later can parse ISO dates, but older Emacs versions do not, so if you are using an older version of Emacs and specify a non-POSIX locale, you may need to set `TIME_STYLE="locale"'. Formatting the file names ------------------------- These options change how file names themselves are printed. `-b' `--escape' `--quoting-style=escape' Quote nongraphic characters in file names using alphabetic and octal backslash sequences like those used in C. `-N' `--literal' `--quoting-style=literal' Do not quote file names. `-q' `--hide-control-chars' Print question marks instead of nongraphic characters in file names. This is the default if the output is a terminal and the program is `ls'. `-Q' `--quote-name' `--quoting-style=c' Enclose file names in double quotes and quote nongraphic characters as in C. `--quoting-style=WORD' Use style WORD to quote output names. The WORD should be one of the following: `literal' Output names as-is; this is the same as the `-N' or `--literal' option. `shell' Quote names for the shell if they contain shell metacharacters or would cause ambiguous output. `shell-always' Quote names for the shell, even if they would normally not require quoting. `c' Quote names as for a C language string; this is the same as the `-Q' or `--quote-name' option. `escape' Quote as with `c' except omit the surrounding double-quote characters; this is the same as the `-b' or `--escape' option. `clocale' Quote as with `c' except use quotation marks appropriate for the locale. `locale' Like `clocale', but quote `like this' instead of "like this" in the default C locale. This looks nicer on many displays. You can specify the default value of the `--quoting-style' option with the environment variable `QUOTING_STYLE'. If that environment variable is not set, the default value is `literal', but this default may change to `shell' in a future version of this package. `--show-control-chars' Print nongraphic characters as-is in file names. This is the default unless the output is a terminal and the program is `ls'. `dir': Briefly list directory contents ====================================== `dir' (also installed as `d') is equivalent to `ls -C -b'; that is, by default files are listed in columns, sorted vertically, and special characters are represented by backslash escape sequences. *Note `ls': ls invocation. `vdir': Verbosely list directory contents ========================================= `vdir' (also installed as `v') is equivalent to `ls -l -b'; that is, by default files are listed in long format and special characters are represented by backslash escape sequences. `dircolors': Color setup for `ls' ================================= `dircolors' outputs a sequence of shell commands to set up the terminal for color output from `ls' (and `dir', etc.). Typical usage: eval `dircolors [OPTION]... [FILE]` If FILE is specified, `dircolors' reads it to determine which colors to use for which file types and extensions. Otherwise, a precompiled database is used. For details on the format of these files, run `dircolors --print-database'. The output is a shell command to set the `LS_COLORS' environment variable. You can specify the shell syntax to use on the command line, or `dircolors' will guess it from the value of the `SHELL' environment variable. The program accepts the following options. Also see *Note Common options::. `-b' `--sh' `--bourne-shell' Output Bourne shell commands. This is the default if the `SHELL' environment variable is set and does not end with `csh' or `tcsh'. `-c' `--csh' `--c-shell' Output C shell commands. This is the default if `SHELL' ends with `csh' or `tcsh'. `-p' `--print-database' Print the (compiled-in) default color configuration database. This output is itself a valid configuration file, and is fairly descriptive of the possibilities. Basic operations **************** This chapter describes the commands for basic file manipulation: copying, moving (renaming), and deleting (removing). `cp': Copy files and directories ================================ `cp' copies files (or, optionally, directories). The copy is completely independent of the original. You can either copy one file to another, or copy arbitrarily many files to a destination directory. Synopsis: cp [OPTION]... SOURCE DEST cp [OPTION]... SOURCE... DIRECTORY If the last argument names an existing directory, `cp' copies each SOURCE file into that directory (retaining the same name). Otherwise, if only two files are given, it copies the first onto the second. It is an error if the last argument is not a directory and more than two non-option arguments are given. Generally, files are written just as they are read. For exceptions, see the `--sparse' option below. By default, `cp' does not copy directories. However, the `-R', `-a', and `-r' options cause `cp' to copy recursively by descending into source directories and copying files to corresponding destination directories. By default, `cp' follows symbolic links only when not copying recursively. This default can be overridden with the `--archive' (`-a'), `-d', `--dereference' (`-L'), `--no-dereference' (`-P'), and `-H' options. If more than one of these options is specified, the last one silently overrides the others. By default, `cp' copies the contents of special files only when not copying recursively. This default can be overridden with the `--copy-contents' option. `cp' generally refuses to copy a file onto itself, with the following exception: if `--force --backup' is specified with SOURCE and DEST identical, and referring to a regular file, `cp' will make a backup file, either regular or numbered, as specified in the usual ways (*note Backup options::). This is useful when you simply want to make a backup of an existing file before changing it. The program accepts the following options. Also see *Note Common options::. `-a' `--archive' Preserve as much as possible of the structure and attributes of the original files in the copy (but do not attempt to preserve internal directory structure; i.e., `ls -U' may list the entries in a copied directory in a different order). Equivalent to `-dpPR'. `-b' `--backup[=METHOD]' *Note Backup options::. Make a backup of each file that would otherwise be overwritten or removed. As a special case, `cp' makes a backup of SOURCE when the force and backup options are given and SOURCE and DEST are the same name for an existing, regular file. One useful application of this combination of options is this tiny Bourne shell script: #!/bin/sh # Usage: backup FILE... # Create a GNU-style backup of each listed FILE. for i; do cp --backup --force "$i" "$i" done `--copy-contents' If copying recursively, copy the contents of any special files (e.g., FIFOs and device files) as if they were regular files. This means trying to read the data in each source file and writing it to the destination. It is usually a mistake to use this option, as it normally has undesirable effects on special files like FIFOs and the ones typically found in the `/dev' directory. In most cases, `cp -R --copy-contents' will hang indefinitely trying to read from FIFOs and special files like `/dev/console', and it will fill up your destination disk if you use it to copy `/dev/zero'. This option has no effect unless copying recursively, and it does not affect the copying of symbolic links. `-d' Copy symbolic links as symbolic links rather than copying the files that they point to, and preserve hard links between source files in the copies. Equivalent to `--no-dereference --preserve=links'. `-f' `--force' When copying without this option and an existing destination file cannot be opened for writing, the copy fails. However, with `--force'), when a destination file cannot be opened, `cp' then unlinks it and tries to open it again. Contrast this behavior with that enabled by `--link' and `--symbolic-link', whereby the destination file is never opened but rather is unlinked unconditionally. Also see the description of `--remove-destination'. `-H' If a command line argument specifies a symbolic link, then copy the file it points to rather than the symbolic link itself. However, copy (preserving its nature) any symbolic link that is encountered via recursive traversal. `-i' `--interactive' Prompt whether to overwrite existing regular destination files. `-l' `--link' Make hard links instead of copies of non-directories. `-L' `--dereference' Always follow symbolic links. `-P' `--no-dereference' Copy symbolic links as symbolic links rather than copying the files that they point to. `-p' `--preserve[=ATTRIBUTE_LIST]' Preserve the specified attributes of the original files. If specified, the ATTRIBUTE_LIST must be a comma-separated list of one or more of the following strings: `mode' Preserve the permission attributes. `ownership' Preserve the owner and group. On most modern systems, only the super-user may change the owner of a file, and regular users may preserve the group ownership of a file only if they happen to be a member of the desired group. `timestamps' Preserve the times of last access and last modification. `links' Preserve in the destination files any links between corresponding source files. `all' Preserve all file attributes. Equivalent to specifying all of the above. Using `--preserve' with no ATTRIBUTE_LIST is equivalent to `--preserve=mode,ownership,timestamps'. In the absence of this option, each destination file is created with the permissions of the corresponding source file, minus the bits set in the umask and minus the set-user-id and set-group-id bits. *Note File permissions::. `--no-preserve=ATTRIBUTE_LIST' Do not preserve the specified attributes. The ATTRIBUTE_LIST has the same form as for `--preserve'. `--parents' Form the name of each destination file by appending to the target directory a slash and the specified name of the source file. The last argument given to `cp' must be the name of an existing directory. For example, the command: cp --parents a/b/c existing_dir copies the file `a/b/c' to `existing_dir/a/b/c', creating any missing intermediate directories. `--reply[=HOW]' Using `--reply=yes' makes `cp' act as if `yes' were given as a response to every prompt about a destination file. That effectively cancels any preceding `--interactive' or `-i' option. Specify `--reply=no' to make `cp' act as if `no' were given as a response to every prompt about a destination file. Specify `--reply=query' to make `cp' prompt the user about each existing destination file. `-R' `-r' `--recursive' Copy directories recursively. Symbolic links are not followed by default; see the `--archive' (`-a'), `-d', `--dereference' (`-L'), `--no-dereference' (`-P'), and `-H' options. Special files are copied by creating a destination file of the same type as the source; see the `--copy-contents' option. It is not portable to use `-r' to copy symbolic links or special files. On some non-GNU systems, `-r' implies the equivalent of `-L' and `--copy-contents' for historical reasons. Also, it is not portable to use `-R' to copy symbolic links unless you also specify `-P', as POSIX allows implementations that dereference symbolic links by default. `--remove-destination' Remove each existing destination file before attempting to open it (contrast with `-f' above). `--sparse=WHEN' A "sparse file" contains "holes"--a sequence of zero bytes that does not occupy any physical disk blocks; the `read' system call reads these as zeroes. This can both save considerable disk space and increase speed, since many binary files contain lots of consecutive zero bytes. By default, `cp' detects holes in input source files via a crude heuristic and makes the corresponding output file sparse as well. The WHEN value can be one of the following: `auto' The default behavior: the output file is sparse if the input file is sparse. `always' Always make the output file sparse. This is useful when the input file resides on a filesystem that does not support sparse files (the most notable example is `efs' filesystems in SGI IRIX 5.3 and earlier), but the output file is on another type of filesystem. `never' Never make the output file sparse. This is useful in creating a file for use with the `mkswap' command, since such a file must not have any holes. `--strip-trailing-slashes' Remove any trailing slashes from each SOURCE argument. *Note Trailing slashes::. `-s' `--symbolic-link' Make symbolic links instead of copies of non-directories. All source file names must be absolute (starting with `/') unless the destination files are in the current directory. This option merely results in an error message on systems that do not support symbolic links. `-S SUFFIX' `--suffix=SUFFIX' Append SUFFIX to each backup file made with `-b'. *Note Backup options::. `--target-directory=DIRECTORY' Specify the destination DIRECTORY. *Note Target directory::. `-v' `--verbose' Print the name of each file before copying it. `-V METHOD' `--version-control=METHOD' Change the type of backups made with `-b'. The METHOD argument can be `none' (or `off'), `numbered' (or `t'), `existing' (or `nil'), or `never' (or `simple'). *Note Backup options::. `-x' `--one-file-system' Skip subdirectories that are on different filesystems from the one that the copy started on. However, mount point directories _are_ copied. `dd': Convert and copy a file ============================= `dd' copies a file (from standard input to standard output, by default) with a changeable I/O block size, while optionally performing conversions on it. Synopsis: dd [OPTION]... The program accepts the following options. Also see *Note Common options::. The numeric-valued options below (BYTES and BLOCKS) can be followed by a multiplier: `b'=512, `c'=1, `w'=2, `xM'=M, or any of the standard block size suffixes like `k'=1024 (*note Block size::). Use different `dd' invocations to use different block sizes for skipping and I/O. For example, the following shell commands copy data in 512 KiB blocks between a disk and a tape, but do not save or restore a 4 KiB label at the start of the disk: disk=/dev/rdsk/c0t1d0s2 tape=/dev/rmt/0 # Copy all but the label from disk to tape. (dd bs=4k skip=1 count=0 && dd bs=512k) <$disk >$tape # Copy from tape back to disk, but leave the disk label alone. (dd bs=4k seek=1 count=0 && dd bs=512k) <$tape >$disk `if=FILE' Read from FILE instead of standard input. `of=FILE' Write to FILE instead of standard output. Unless `conv=notrunc' is given, `dd' truncates FILE to zero bytes (or the size specified with `seek='). `ibs=BYTES' Read BYTES bytes at a time. `obs=BYTES' Write BYTES bytes at a time. `bs=BYTES' Both read and write BYTES bytes at a time. This overrides `ibs' and `obs'. `cbs=BYTES' Convert BYTES bytes at a time. `skip=BLOCKS' Skip BLOCKS `ibs'-byte blocks in the input file before copying. `seek=BLOCKS' Skip BLOCKS `obs'-byte blocks in the output file before copying. `count=BLOCKS' Copy BLOCKS `ibs'-byte blocks from the input file, instead of everything until the end of the file. `conv=CONVERSION[,CONVERSION]...' Convert the file as specified by the CONVERSION argument(s). (No spaces around any comma(s).) Conversions: `ascii' Convert EBCDIC to ASCII. `ebcdic' Convert ASCII to EBCDIC. `ibm' Convert ASCII to alternate EBCDIC. `block' For each line in the input, output `cbs' bytes, replacing the input newline with a space and padding with spaces as necessary. `unblock' Replace trailing spaces in each `cbs'-sized input block with a newline. `lcase' Change uppercase letters to lowercase. `ucase' Change lowercase letters to uppercase. `swab' Swap every pair of input bytes. GNU `dd', unlike others, works when an odd number of bytes are read--the last byte is simply copied (since there is nothing to swap it with). `noerror' Continue after read errors. `notrunc' Do not truncate the output file. `sync' Pad every input block to size of `ibs' with trailing zero bytes. When used with `block' or `unblock', pad with spaces instead of zero bytes. `install': Copy files and set attributes ======================================== `install' copies files while setting their permission modes and, if possible, their owner and group. Synopses: install [OPTION]... SOURCE DEST install [OPTION]... SOURCE... DIRECTORY install -d [OPTION]... DIRECTORY... In the first of these, the SOURCE file is copied to the DEST target file. In the second, each of the SOURCE files are copied to the destination DIRECTORY. In the last, each DIRECTORY (and any missing parent directories) is created. `install' is similar to `cp', but allows you to control the attributes of destination files. It is typically used in Makefiles to copy programs into their destination directories. It refuses to copy files onto themselves. The program accepts the following options. Also see *Note Common options::. `-b' `--backup[=METHOD]' *Note Backup options::. Make a backup of each file that would otherwise be overwritten or removed. `-c' Ignored; for compatibility with old Unix versions of `install'. `-d' `--directory' Create each given directory and any missing parent directories, setting the owner, group and mode as given on the command line or to the defaults. It also gives any parent directories it creates those attributes. (This is different from the SunOS 4.x `install', which gives directories that it creates the default attributes.) `-g GROUP' `--group=GROUP' Set the group ownership of installed files or directories to GROUP. The default is the process' current group. GROUP may be either a group name or a numeric group id. `-m MODE' `--mode=MODE' Set the permissions for the installed file or directory to MODE, which can be either an octal number, or a symbolic mode as in `chmod', with 0 as the point of departure (*note File permissions::). The default mode is `u=rwx,go=rx'--read, write, and execute for the owner, and read and execute for group and other. `-o OWNER' `--owner=OWNER' If `install' has appropriate privileges (is run as root), set the ownership of installed files or directories to OWNER. The default is `root'. OWNER may be either a user name or a numeric user ID. `-p' `--preserve-timestamps' Set the time of last access and the time of last modification of each installed file to match those of each corresponding original file. When a file is installed without this option, its last access and last modification times are both set to the time of installation. This option is useful if you want to use the last modification times of installed files to keep track of when they were last built as opposed to when they were last installed. `-s' `--strip' Strip the symbol tables from installed binary executables. `-S SUFFIX' `--suffix=SUFFIX' Append SUFFIX to each backup file made with `-b'. *Note Backup options::. `--target-directory=DIRECTORY' Specify the destination DIRECTORY. *Note Target directory::. `-v' `--verbose' Print the name of each file before copying it. `-V METHOD' `--version-control=METHOD' Change the type of backups made with `-b'. The METHOD argument can be `none' (or `off'), `numbered' (or `t'), `existing' (or `nil'), or `never' (or `simple'). *Note Backup options::. `mv': Move (rename) files ========================= `mv' moves or renames files (or directories). Synopsis: mv [OPTION]... SOURCE DEST mv [OPTION]... SOURCE... DIRECTORY If the last argument names an existing directory, `mv' moves each other given file into a file with the same name in that directory. Otherwise, if only two files are given, it renames the first as the second. It is an error if the last argument is not a directory and more than two files are given. `mv' can move any type of file from one filesystem to another. Prior to version `4.0' of the fileutils, `mv' could move only regular files between filesystems. For example, now `mv' can move an entire directory hierarchy including special device files from one partition to another. It first uses some of the same code that's used by `cp -a' to copy the requested directories and files, then (assuming the copy succeeded) it removes the originals. If the copy fails, then the part that was copied to the destination partition is removed. If you were to copy three directories from one partition to another and the copy of the first directory succeeded, but the second didn't, the first would be left on the destination partition and the second and third would be left on the original partition. If a destination file exists but is normally unwritable, standard input is a terminal, and the `-f' or `--force' option is not given, `mv' prompts the user for whether to replace the file. (You might own the file, or have write permission on its directory.) If the response does not begin with `y' or `Y', the file is skipped. _Warning_: If you try to move a symlink that points to a directory, and you specify the symlink with a trailing slash, then `mv' doesn't move the symlink but instead moves the directory referenced by the symlink. *Note Trailing slashes::. The program accepts the following options. Also see *Note Common options::. `-b' `--backup[=METHOD]' *Note Backup options::. Make a backup of each file that would otherwise be overwritten or removed. `-f' `--force' Do not prompt the user before removing a destination file. `-i' `--interactive' Prompt whether to overwrite each existing destination file, regardless of its permissions. If the response does not begin with `y' or `Y', the file is skipped. `--reply[=HOW]' Specifying `--reply=yes' is equivalent to using `--force'. Specify `--reply=no' to make `mv' act as if `no' were given as a response to every prompt about a destination file. Specify `--reply=query' to make `mv' prompt the user about each existing destination file. `-u' `--update' Do not move a non-directory that has an existing destination with the same or newer modification time. `-v' `--verbose' Print the name of each file before moving it. `--strip-trailing-slashes' Remove any trailing slashes from each SOURCE argument. *Note Trailing slashes::. `-S SUFFIX' `--suffix=SUFFIX' Append SUFFIX to each backup file made with `-b'. *Note Backup options::. `--target-directory=DIRECTORY' Specify the destination DIRECTORY. *Note Target directory::. `-V METHOD' `--version-control=METHOD' Change the type of backups made with `-b'. The METHOD argument can be `none' (or `off'), `numbered' (or `t'), `existing' (or `nil'), or `never' (or `simple'). *Note Backup options::. `rm': Remove files or directories ================================= `rm' removes each given FILE. By default, it does not remove directories. Synopsis: rm [OPTION]... [FILE]... If a file is unwritable, standard input is a terminal, and the `-f' or `--force' option is not given, or the `-i' or `--interactive' option _is_ given, `rm' prompts the user for whether to remove the file. If the response does not begin with `y' or `Y', the file is skipped. _Warning_: If you use `rm' to remove a file, it is usually possible to recover the contents of that file. If you want more assurance that the contents are truly unrecoverable, consider using `shred'. The program accepts the following options. Also see *Note Common options::. `-d' `--directory' Attempt to remove directories using the `unlink' function rather than the `rmdir' function, and don't require a directory to be empty before trying to unlink it. This works only if you have appropriate privileges and if your operating system supports `unlink' for directories. Because unlinking a directory causes any files in the deleted directory to become unreferenced, it is wise to `fsck' the filesystem after doing this. `-f' `--force' Ignore nonexistent files and never prompt the user. Ignore any previous `--interactive' (`-i') option. `-i' `--interactive' Prompt whether to remove each file. If the response does not begin with `y' or `Y', the file is skipped. Ignore any previous `--force' (`-f') option. `-r' `-R' `--recursive' Remove the contents of directories recursively. `-v' `--verbose' Print the name of each file before removing it. One common question is how to remove files whose names begin with a `-'. GNU `rm', like every program that uses the `getopt' function to parse its arguments, lets you use the `--' option to indicate that all following arguments are non-options. To remove a file called `-f' in the current directory, you could type either: rm -- -f or: rm ./-f The Unix `rm' program's use of a single `-' for this purpose predates the development of the getopt standard syntax. `shred': Remove files more securely =================================== `shred' overwrites devices or files, to help prevent even very expensive hardware from recovering the data. Ordinarily when you remove a file (*note rm invocation::), the data is not actually destroyed. Only the index listing where the file is stored is destroyed, and the storage is made available for reuse. There are undelete utilities that will attempt to reconstruct the index and can bring the file back if the parts were not reused. On a busy system with a nearly-full drive, space can get reused in a few seconds. But there is no way to know for sure. If you have sensitive data, you may want to be sure that recovery is not possible by actually overwriting the file with non-sensitive data. However, even after doing that, it is possible to take the disk back to a laboratory and use a lot of sensitive (and expensive) equipment to look for the faint "echoes" of the original data underneath the overwritten data. If the data has only been overwritten once, it's not even that hard. The best way to remove something irretrievably is to destroy the media it's on with acid, melt it down, or the like. For cheap removable media like floppy disks, this is the preferred method. However, hard drives are expensive and hard to melt, so the `shred' utility tries to achieve a similar effect non-destructively. This uses many overwrite passes, with the data patterns chosen to maximize the damage they do to the old data. While this will work on floppies, the patterns are designed for best effect on hard drives. For more details, see the source code and Peter Gutmann's paper `Secure Deletion of Data from Magnetic and Solid-State Memory', from the proceedings of the Sixth USENIX Security Symposium (San Jose, California, 22-25 July, 1996). The paper is also available online . *Please note* that `shred' relies on a very important assumption: that the filesystem overwrites data in place. This is the traditional way to do things, but many modern filesystem designs do not satisfy this assumption. Exceptions include: * Log-structured or journaled filesystems, such as those supplied with AIX and Solaris, and JFS, ReiserFS, XFS, Ext3, etc. * Filesystems that write redundant data and carry on even if some writes fail, such as RAID-based filesystems. * Filesystems that make snapshots, such as Network Appliance's NFS server. * Filesystems that cache in temporary locations, such as NFS version 3 clients. * Compressed filesystems. If you are not sure how your filesystem operates, then you should assume that it does not overwrite data in place, which means that shred cannot reliably operate on regular files in your filesystem. Generally speaking, it is more reliable to shred a device than a file, since this bypasses the problem of filesystem design mentioned above. However, even shredding devices is not always completely reliable. For example, most disks map out bad sectors invisibly to the application; if the bad sectors contain sensitive data, `shred' won't be able to destroy it. `shred' makes no attempt to detect or report this problem, just as it makes no attempt to do anything about backups. However, since it is more reliable to shred devices than files, `shred' by default does not truncate or remove the output file. This default is more suitable for devices, which typically cannot be truncated and should not be removed. Finally, consider the risk of backups and mirrors. File system backups and remote mirrors may contain copies of the file that cannot be removed, and that will allow a shredded file to be recovered later. So if you keep any data you may later want to destroy using `shred', be sure that it is not backed up or mirrored. shred [OPTION]... FILE[...] The program accepts the following options. Also see *Note Common options::. `-f' `--force' Override file permissions if necessary to allow overwriting. `-NUMBER' `-n NUMBER' `--iterations=NUMBER' By default, `shred' uses 25 passes of overwrite. This is enough for all of the useful overwrite patterns to be used at least once. You can reduce this to save time, or increase it if you have a lot of time to waste. `-s BYTES' `--size=BYTES' Shred the first BYTES bytes of the file. The default is to shred the whole file. BYTES can be followed by a size specification like `K', `M', or `G' to specify a multiple. *Note Block size::. `-u' `--remove' After shredding a file, truncate it (if possible) and then remove it. If a file has multiple links, only the named links will be removed. `-v' `--verbose' Display status updates as sterilization proceeds. `-x' `--exact' Normally, shred rounds the file size up to the next multiple of the filesystem block size to fully erase the last block of the file. This option suppresses that behavior. Thus, by default if you shred a 10-byte file on a system with 512-byte blocks, the resulting file will be 512 bytes long. With this option, shred does not increase the size of the file. `-z' `--zero' Normally, the last pass that `shred' writes is made up of random data. If this would be conspicuous on your hard drive (for example, because it looks like encrypted data), or you just think it's tidier, the `--zero' option adds an additional overwrite pass with all zero bits. This is in addition to the number of passes specified by the `--iterations' option. `-' Shred standard output. This argument is considered an option. If the common `--' option has been used to indicate the end of options on the command line, then `-' will be interpreted as an ordinary file name. The intended use of this is to shred a removed temporary file. For example i=`tempfile -m 0600` exec 3<>"$i" rm -- "$i" echo "Hello, world" >&3 shred - >&3 exec 3>- Note that the shell command `shred - >file' does not shred the contents of FILE, since it truncates FILE before invoking `shred'. Use the command `shred file' or (if using a Bourne-compatible shell) the command `shred - 1<>file' instead. You might use the following command to erase all trace of the filesystem you'd created on the floppy disk in your first drive. That command takes about 20 minutes to erase a "1.44MB" (actually 1440 KiB) floppy. shred --verbose /dev/fd0 Similarly, to erase all data on a selected partition of your hard disk, you could give a command like this: shred --verbose /dev/sda5 Special file types ****************** This chapter describes commands which create special types of files (and `rmdir', which removes directories, one special file type). Although Unix-like operating systems have markedly fewer special file types than others, not _everything_ can be treated only as the undifferentiated byte stream of "normal files". For example, when a file is created or removed, the system must record this information, which it does in a "directory"--a special type of file. Although you can read directories as normal files, if you're curious, in order for the system to do its job it must impose a structure, a certain order, on the bytes of the file. Thus it is a "special" type of file. Besides directories, other special file types include named pipes (FIFOs), symbolic links, sockets, and so-called "special files". `link': Make a hard link via the link syscall ============================================= `link' creates a single hard link at a time. It is a minimalist interface to the system-provided `link' function. *Note Hard Links: (libc)Hard Links. Synopsis: link FILENAME LINKNAME FILENAME must specify an existing file, and LINKNAME must specify a nonexistent entry in an existing directory. `link' simply calls `link (FILENAME, LINKNAME)' to create the link. `ln': Make links between files ============================== `ln' makes links between files. By default, it makes hard links; with the `-s' option, it makes symbolic (or "soft") links. Synopses: ln [OPTION]... TARGET [LINKNAME] ln [OPTION]... TARGET... DIRECTORY * If the last argument names an existing directory, `ln' creates a link to each TARGET file in that directory, using the TARGETs' names. (But see the description of the `--no-dereference' option below.) * If two filenames are given, `ln' creates a link from the second to the first. * If one TARGET is given, `ln' creates a link to that file in the current directory. * It is an error if the last argument is not a directory and more than two files are given. Without `-f' or `-i' (see below), `ln' will not remove an existing file. Use the `--backup' option to make `ln' rename existing files. A "hard link" is another name for an existing file; the link and the original are indistinguishable. Technically speaking, they share the same inode, and the inode contains all the information about a file--indeed, it is not incorrect to say that the inode _is_ the file. On all existing implementations, you cannot make a hard link to a directory, and hard links cannot cross filesystem boundaries. (These restrictions are not mandated by POSIX, however.) "Symbolic links" ("symlinks" for short), on the other hand, are a special file type (which not all kernels support: System V release 3 (and older) systems lack symlinks) in which the link file actually refers to a different file, by name. When most operations (opening, reading, writing, and so on) are passed the symbolic link file, the kernel automatically "dereferences" the link and operates on the target of the link. But some operations (e.g., removing) work on the link file itself, rather than on its target. *Note Symbolic Links: (libc)Symbolic Links. The program accepts the following options. Also see *Note Common options::. `-b' `--backup[=METHOD]' *Note Backup options::. Make a backup of each file that would otherwise be overwritten or removed. `-d' `-F' `--directory' Allow the super-user to make hard links to directories. `-f' `--force' Remove existing destination files. `-i' `--interactive' Prompt whether to remove existing destination files. `-n' `--no-dereference' When given an explicit destination that is a symlink to a directory, treat that destination as if it were a normal file. When the destination is an actual directory (not a symlink to one), there is no ambiguity. The link is created in that directory. But when the specified destination is a symlink to a directory, there are two ways to treat the user's request. `ln' can treat the destination just as it would a normal directory and create the link in it. On the other hand, the destination can be viewed as a non-directory--as the symlink itself. In that case, `ln' must delete or backup that symlink before creating the new link. The default is to treat a destination that is a symlink to a directory just like a directory. `-s' `--symbolic' Make symbolic links instead of hard links. This option merely produces an error message on systems that do not support symbolic links. `-S SUFFIX' `--suffix=SUFFIX' Append SUFFIX to each backup file made with `-b'. *Note Backup options::. `--target-directory=DIRECTORY' Specify the destination DIRECTORY. *Note Target directory::. `-v' `--verbose' Print the name of each file before linking it. `-V METHOD' `--version-control=METHOD' Change the type of backups made with `-b'. The METHOD argument can be `none' (or `off'), `numbered' (or `t'), `existing' (or `nil'), or `never' (or `simple'). *Note Backup options::. Examples: ln -s /some/name # creates link ./name pointing to /some/name ln -s /some/name myname # creates link ./myname pointing to /some/name ln -s a b .. # creates links ../a and ../b pointing to ./a and ./b `mkdir': Make directories ========================= `mkdir' creates directories with the specified names. Synopsis: mkdir [OPTION]... NAME... If a NAME is an existing file but not a directory, `mkdir' prints a warning message on stderr and will exit with a status of 1 after processing any remaining NAMEs. The same is done when a NAME is an existing directory and the -p option is not given. If a NAME is an existing directory and the -p option is given, `mkdir' will ignore it. That is, `mkdir' will not print a warning, raise an error, or change the mode of the directory (even if the -m option is given), and will move on to processing any remaining NAMEs. The program accepts the following options. Also see *Note Common options::. `-m MODE' `--mode=MODE' Set the mode of created directories to MODE, which is symbolic as in `chmod' and uses `a=rwx' (read, write and execute allowed for everyone) minus the bits set in the umask for the point of the departure. *Note File permissions::. `-p' `--parents' Make any missing parent directories for each argument. The mode for parent directories is set to the umask modified by `u+wx'. Ignore arguments corresponding to existing directories. `-v' `--verbose' Print a message for each created directory. This is most useful with `--parents'. `mkfifo': Make FIFOs (named pipes) ================================== `mkfifo' creates FIFOs (also called "named pipes") with the specified names. Synopsis: mkfifo [OPTION] NAME... A "FIFO" is a special file type that permits independent processes to communicate. One process opens the FIFO file for writing, and another for reading, after which data can flow as with the usual anonymous pipe in shells or elsewhere. The program accepts the following option. Also see *Note Common options::. `-m MODE' `--mode=MODE' Set the mode of created FIFOs to MODE, which is symbolic as in `chmod' and uses `a=rw' (read and write allowed for everyone) minus the bits set in the umask for the point of departure. *Note File permissions::. `mknod': Make block or character special files ============================================== `mknod' creates a FIFO, character special file, or block special file with the specified name. Synopsis: mknod [OPTION]... NAME TYPE [MAJOR MINOR] Unlike the phrase "special file type" above, the term "special file" has a technical meaning on Unix: something that can generate or receive data. Usually this corresponds to a physical piece of hardware, e.g., a printer or a disk. (These files are typically created at system-configuration time.) The `mknod' command is what creates files of this type. Such devices can be read either a character at a time or a "block" (many characters) at a time, hence we say there are "block special" files and "character special" files. The arguments after NAME specify the type of file to make: `p' for a FIFO `b' for a block special file `c' for a character special file When making a block or character special file, the major and minor device numbers must be given after the file type. The program accepts the following option. Also see *Note Common options::. `-m MODE' `--mode=MODE' Set the mode of created files to MODE, which is symbolic as in `chmod' and uses `a=rw' minus the bits set in the umask as the point of departure. *Note File permissions::. `rmdir': Remove empty directories ================================= `rmdir' removes empty directories. Synopsis: rmdir [OPTION]... DIRECTORY... If any DIRECTORY argument does not refer to an existing empty directory, it is an error. The program accepts the following option. Also see *Note Common options::. `--ignore-fail-on-non-empty' Ignore each failure to remove a directory that is solely because the directory is non-empty. `-p' `--parents' Remove DIRECTORY, then try to remove each component of DIRECTORY. So, for example, `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'. As such, it fails if any of those directories turns out not to be empty. Use the `--ignore-fail-on-non-empty' option to make it so such a failure does not evoke a diagnostic and does not cause `rmdir' to exit unsuccessfully. `-v' `--verbose' Give a diagnostic for each successful removal. DIRECTORY is removed. *Note rm invocation::, for how to remove non-empty directories (recursively). `unlink': Remove files via the unlink syscall ============================================= `unlink' deletes a single specified file name. It is a minimalist interface to the system-provided `unlink' function. *Note Deleting Files: (libc)Deleting Files. Synopsis: unlink FILENAME On some systems `unlink' can be used to delete the name of a directory. On others, it can be used that way only by a privileged user. In the GNU system `unlink' can never delete the name of a directory. By default, `unlink' honors the `--help' and `--version' options. That makes it a little harder to remove files named `--help' and `--version', so when the environment variable `POSIXLY_CORRECT' is set, `unlink' treats such a command line arguments not as an option, but as an operand. Changing file attributes ************************ A file is not merely its contents, a name, and a file type (*note Special file types::). A file also has an owner (a userid), a group (a group id), permissions (what the owner can do with the file, what people in the group can do, and what everyone else can do), various timestamps, and other information. Collectively, we call these a file's "attributes". These commands change file attributes. `chown': Change file owner and group ==================================== `chown' changes the user and/or group ownership of each given FILE to NEW-OWNER or to the user and group of an existing reference file. Synopsis: chown [OPTION]... {NEW-OWNER | --reference=REF_FILE} FILE... If used, NEW-OWNER specifies the new owner and/or group as follows (with no embedded white space): [OWNER] [ [:] [GROUP] ] Specifically: OWNER If only an OWNER (a user name or numeric user id) is given, that user is made the owner of each given file, and the files' group is not changed. OWNER`:'GROUP If the OWNER is followed by a colon and a GROUP (a group name or numeric group id), with no spaces between them, the group ownership of the files is changed as well (to GROUP). OWNER`:' If a colon but no group name follows OWNER, that user is made the owner of the files and the group of the files is changed to OWNER's login group. `:'GROUP If the colon and following GROUP are given, but the owner is omitted, only the group of the files is changed; in this case, `chown' performs the same function as `chgrp'. You may use `.' in place of the `:' separator. This is a GNU extension for compatibility with older scripts. New scripts should avoid the use of `.' because GNU `chown' may fail if OWNER contains `.' characters. The program accepts the following options. Also see *Note Common options::. `-c' `--changes' Verbosely describe the action for each FILE whose ownership actually changes. `-f' `--silent' `--quiet' Do not print error messages about files whose ownership cannot be changed. `--from=OLD-OWNER' Change a FILE's ownership only if it has current attributes specified by OLD-OWNER. OLD-OWNER has the same form as NEW-OWNER described above. This option is useful primarily from a security standpoint in that it narrows considerably the window of potential abuse. For example, to reflect a UID numbering change for one user's files without an option like this, `root' might run find / -owner OLDUSER -print0 | xargs -0 chown NEWUSER But that is dangerous because the interval between when the `find' tests the existing file's owner and when the `chown' is actually run may be quite large. One way to narrow the gap would be to invoke chown for each file as it is found: find / -owner OLDUSER -exec chown NEWUSER {} \; But that is very slow if there are many affected files. With this option, it is safer (the gap is narrower still) though still not perfect: chown -R --from=OLDUSER NEWUSER / `--dereference' Do not act on symbolic links themselves but rather on what they point to. `-h' `--no-dereference' Act on symbolic links themselves instead of what they point to. This is the default. This mode relies on the `lchown' system call. On systems that do not provide the `lchown' system call, `chown' fails when a file specified on the command line is a symbolic link. By default, no diagnostic is issued for symbolic links encountered during a recursive traversal, but see `--verbose'. `--reference=REF_FILE' Change the user and group of each FILE to be the same as those of REF_FILE. If REF_FILE is a symbolic link, do not use the user and group of the symbolic link, but rather those of the file it refers to. `-v' `--verbose' Output a diagnostic for every file processed. If a symbolic link is encountered during a recursive traversal on a system without the `lchown' system call, and `--no-dereference' is in effect, then issue a diagnostic saying neither the symbolic link nor its referent is being changed. `-R' `--recursive' Recursively change ownership of directories and their contents. `chgrp': Change group ownership =============================== `chgrp' changes the group ownership of each given FILE to GROUP (which can be either a group name or a numeric group id) or to the group of an existing reference file. Synopsis: chgrp [OPTION]... {GROUP | --reference=REF_FILE} FILE... The program accepts the following options. Also see *Note Common options::. `-c' `--changes' Verbosely describe the action for each FILE whose group actually changes. `-f' `--silent' `--quiet' Do not print error messages about files whose group cannot be changed. `--dereference' Do not act on symbolic links themselves but rather on what they point to. `-h' `--no-dereference' Act on symbolic links themselves instead of what they point to. This is the default. This mode relies on the `lchown' system call. On systems that do not provide the `lchown' system call, `chgrp' fails when a file specified on the command line is a symbolic link. By default, no diagnostic is issued for symbolic links encountered during a recursive traversal, but see `--verbose'. `--reference=REF_FILE' Change the group of each FILE to be the same as that of REF_FILE. If REF_FILE is a symbolic link, do not use the group of the symbolic link, but rather that of the file it refers to. `-v' `--verbose' Output a diagnostic for every file processed. If a symbolic link is encountered during a recursive traversal on a system without the `lchown' system call, and `--no-dereference' is in effect, then issue a diagnostic saying neither the symbolic link nor its referent is being changed. `-R' `--recursive' Recursively change the group ownership of directories and their contents. `chmod': Change access permissions ================================== `chmod' changes the access permissions of the named files. Synopsis: chmod [OPTION]... {MODE | --reference=REF_FILE} FILE... `chmod' never changes the permissions of symbolic links, since the `chmod' system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, `chmod' changes the permissions of the pointed-to file. In contrast, `chmod' ignores symbolic links encountered during recursive directory traversals. If used, MODE specifies the new permissions. For details, see the section on *Note File permissions::. The program accepts the following options. Also see *Note Common options::. `-c' `--changes' Verbosely describe the action for each FILE whose permissions actually changes. `-f' `--silent' `--quiet' Do not print error messages about files whose permissions cannot be changed. `-v' `--verbose' Verbosely describe the action or non-action taken for every FILE. `--reference=REF_FILE' Change the mode of each FILE to be the same as that of REF_FILE. *Note File permissions::. If REF_FILE is a symbolic link, do not use the mode of the symbolic link, but rather that of the file it refers to. `-R' `--recursive' Recursively change permissions of directories and their contents. `touch': Change file timestamps =============================== `touch' changes the access and/or modification times of the specified files. Synopsis: touch [OPTION]... FILE... On older systems, `touch' supports an obsolete syntax, as follows. If the first FILE would be a valid argument to the `-t' option and no timestamp is given with any of the `-d', `-r', or `-t' options and the `--' argument is not given, that argument is interpreted as the time for the other files instead of as a file name. POSIX 1003.1-2001 (*note Standards conformance::) does not allow this; use `-t' instead. Any FILE that does not exist is created empty. If changing both the access and modification times to the current time, `touch' can change the timestamps for files that the user running it does not own but has write permission for. Otherwise, the user must own the files. Although `touch' provides options for changing two of the times - the times of last access and modification - of a file, there is actually a third one as well: the inode change time. This is often referred to as a file's `ctime'. The inode change time represents the time when the file's meta-information last changed. One common example of this is when the permissions of a file change. Changing the permissions doesn't access the file, so the atime doesn't change, nor does it modify the file, so the mtime doesn't change. Yet, something about the file itself has changed, and this must be noted somewhere. This is the job of the ctime field. This is necessary, so that, for example, a backup program can make a fresh copy of the file, including the new permissions value. Another operation that modifies a file's ctime without affecting the others is renaming. In any case, it is not possible, in normal operations, for a user to change the ctime field to a user-specified value. The program accepts the following options. Also see *Note Common options::. `-a' `--time=atime' `--time=access' `--time=use' Change the access time only. `-c' `--no-create' Do not create files that do not exist. `-d' `--date=time' Use TIME instead of the current time. It can contain month names, time zones, `am' and `pm', etc. *Note Date input formats::. `-f' Ignored; for compatibility with BSD versions of `touch'. `-m' `--time=mtime' `--time=modify' Change the modification time only. `-r FILE' `--reference=FILE' Use the times of the reference FILE instead of the current time. `-t [[CC]YY]MMDDhhmm[.ss]' Use the argument (optional four-digit or two-digit years, months, days, hours, minutes, optional seconds) instead of the current time. If the year is specified with only two digits, then CC is 20 for years in the range 0 ... 68, and 19 for years in 69 ... 99. If no digits of the year are specified, the argument is interpreted as a date in the current year. Disk usage ********** No disk can hold an infinite amount of data. These commands report on how much disk storage is in use or available. (This has nothing much to do with how much _main memory_, i.e., RAM, a program is using when it runs; for that, you want `ps' or `pstat' or `swap' or some such command.) `df': Report filesystem disk space usage ======================================== `df' reports the amount of disk space used and available on filesystems. Synopsis: df [OPTION]... [FILE]... With no arguments, `df' reports the space used and available on all currently mounted filesystems (of all types). Otherwise, `df' reports on the filesystem containing each argument FILE. Normally the disk space is printed in units of 1024 bytes, but this can be overridden (*note Block size::). Non-integer quantities are rounded up to the next higher unit. If an argument FILE is a disk device file containing a mounted filesystem, `df' shows the space available on that filesystem rather than on the filesystem containing the device node (i.e., the root filesystem). GNU `df' does not attempt to determine the disk usage on unmounted filesystems, because on most kinds of systems doing so requires extremely nonportable intimate knowledge of filesystem structures. The program accepts the following options. Also see *Note Common options::. `-a' `--all' Include in the listing filesystems that have a size of 0 blocks, which are omitted by default. Such filesystems are typically special-purpose pseudo-filesystems, such as automounter entries. Also, filesystems of type "ignore" or "auto", supported by some operating systems, are only included if this option is specified. `-B SIZE' `--block-size=SIZE' Scale sizes by SIZE before printing them (*note Block size::). For example, `-BG' prints sizes in units of 1,073,741,824 bytes. `-h' `--human-readable' Append a size letter to each size, such as `M' for mebibytes. Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes. Use the `-H' or `--si' option if you prefer powers of 1000. `-H' `--si' Append an SI-style abbreviation to each size, such as `MB' for megabytes. Powers of 1000 are used, not 1024; `MB' stands for 1,000,000 bytes. Use the `-h' or `--human-readable' option if you prefer powers of 1024. `-i' `--inodes' List inode usage information instead of block usage. An inode (short for index node) contains information about a file such as its owner, permissions, timestamps, and location on the disk. `-k' Print sizes in 1024-byte blocks, overriding the default block size (*note Block size::). This option is equivalent to `--block-size=1K'. `-l' `--local' Limit the listing to local filesystems. By default, remote filesystems are also listed. `--no-sync' Do not invoke the `sync' system call before getting any usage data. This may make `df' run significantly faster on systems with many disks, but on some systems (notably SunOS) the results may be slightly out of date. This is the default. `-P' `--portability' Use the POSIX output format. This is like the default format except for the following: 1. The information about each filesystem is always printed on exactly one line; a mount device is never put on a line by itself. This means that if the mount device name is more than 20 characters long (e.g., for some network mounts), the columns are misaligned. 2. The labels in the header output line are changed to conform to POSIX. `--sync' Invoke the `sync' system call before getting any usage data. On some systems (notably SunOS), doing this yields more up to date results, but in general this option makes `df' much slower, especially when there are many or very busy filesystems. `-t FSTYPE' `--type=FSTYPE' Limit the listing to filesystems of type FSTYPE. Multiple filesystem types can be specified by giving multiple `-t' options. By default, nothing is omitted. `-T' `--print-type' Print each filesystem's type. The types printed here are the same ones you can include or exclude with `-t' and `-x'. The particular types printed are whatever is supported by the system. Here are some of the common names (this list is certainly not exhaustive): `nfs' An NFS filesystem, i.e., one mounted over a network from another machine. This is the one type name which seems to be used uniformly by all systems. `4.2, ufs, efs...' A filesystem on a locally-mounted hard disk. (The system might even support more than one type here; Linux does.) `hsfs, cdfs' A filesystem on a CD-ROM drive. HP-UX uses `cdfs', most other systems use `hsfs' (`hs' for "High Sierra"). `pcfs' An MS-DOS filesystem, usually on a diskette. `-x FSTYPE' `--exclude-type=FSTYPE' Limit the listing to filesystems not of type FSTYPE. Multiple filesystem types can be eliminated by giving multiple `-x' options. By default, no filesystem types are omitted. `-v' Ignored; for compatibility with System V versions of `df'. `du': Estimate file space usage =============================== `du' reports the amount of disk space used by the specified files and for each subdirectory (of directory arguments). Synopsis: du [OPTION]... [FILE]... With no arguments, `du' reports the disk space for the current directory. Normally the disk space is printed in units of 1024 bytes, but this can be overridden (*note Block size::). Non-integer quantities are rounded up to the next higher unit. The program accepts the following options. Also see *Note Common options::. `-a' `--all' Show counts for all files, not just directories. `-b' `--bytes' Print sizes in bytes, overriding the default block size (*note Block size::). `-B SIZE' `--block-size=SIZE' Scale sizes by SIZE before printing them (*note Block size::). For example, `-BG' prints sizes in units of 1,073,741,824 bytes. `-c' `--total' Print a grand total of all arguments after all arguments have been processed. This can be used to find out the total disk usage of a given set of files or directories. `-D' `--dereference-args' Dereference symbolic links that are command line arguments. Does not affect other symbolic links. This is helpful for finding out the disk usage of directories, such as `/usr/tmp', which are often symbolic links. `-h' `--human-readable' Append a size letter to each size, such as `M' for mebibytes. Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes. Use the `-H' or `--si' option if you prefer powers of 1000. `-H' `--si' Append an SI-style abbreviation to each size, such as `MB' for megabytes. Powers of 1000 are used, not 1024; `MB' stands for 1,000,000 bytes. Use the `-h' or `--human-readable' option if you prefer powers of 1024. `-k' Print sizes in 1024-byte blocks, overriding the default block size (*note Block size::). This option is equivalent to `--block-size=1K'. `-l' `--count-links' Count the size of all files, even if they have appeared already (as a hard link). `-L' `--dereference' Dereference symbolic links (show the disk space used by the file or directory that the link points to instead of the space used by the link). `--max-depth=DEPTH' Show the total for each directory (and file if -all) that is at most MAX_DEPTH levels down from the root of the hierarchy. The root is at level 0, so `du --max-depth=0' is equivalent to `du -s'. `-s' `--summarize' Display only a total for each argument. `-S' `--separate-dirs' Report the size of each directory separately, not including the sizes of subdirectories. `-x' `--one-file-system' Skip directories that are on different filesystems from the one that the argument being processed is on. `--exclude=PATTERN' When recursing, skip subdirectories or files matching PATTERN. For example, `du --exclude='*.o'' excludes files whose names end in `.o'. `-X FILE' `--exclude-from=FILE' Like `--exclude', except take the patterns to exclude from FILE, one per line. If FILE is `-', take the patterns from standard input. On BSD systems, `du' reports sizes that are half the correct values for files that are NFS-mounted from HP-UX systems. On HP-UX systems, it reports sizes that are twice the correct values for files that are NFS-mounted from BSD systems. This is due to a flaw in HP-UX; it also affects the HP-UX `du' program. `stat': Report file or filesystem status ======================================== `stat' displays information about the specified file(s). Synopsis: stat [OPTION]... [FILE]... With no option, `stat' reports all information about the given files. But it also can be used to report the information of the filesystems the given files are located on. If the files are links, `stat' can also give information about the files the links point to. `-f' `--filesystem' Report information about the filesystems where the given files are located instead of information about the files themselves. `-L' `--dereference' Change how `stat' treats symbolic links. With this option, `stat' acts on the file referenced by each symbolic link argument. Without it, `stat' acts on any symbolic link argument directly. `-t' `--terse' Print the information in terse form, suitable for parsing by other programs. `-c' `--format' Allow user to specify the output format. Interpreted sequences for file stat are: * %n - File name * %N - Quoted File name with dereference if symbolic link * %d - Device number in decimal * %D - Device number in hex * %i - Inode number * %a - Access rights in octal * %A - Access rights in human readable form * %f - raw mode in hex * %F - File type * %h - Number of hard links * %u - User Id of owner * %U - User name of owner * %g - Group Id of owner * %G - Group name of owner * %t - Major device type in hex * %T - Minor device type in hex * %s - Total size, in bytes * %b - Number of blocks allocated * %o - IO block size * %x - Time of last access * %X - Time of last access as seconds since Epoch * %y - Time of last modification * %Y - Time of last modification as seconds since Epoch * %z - Time of last change * %Z - Time of last change as seconds since Epoch Interpreted sequences for filesystem stat are: * %n - File name * %i - File System id in hex * %l - Maximum length of filenames * %t - Type in hex * %T - Type in human readable form * %b - Total data blocks in file system * %f - Free blocks in file system * %a - Free blocks available to non-superuser * %s - Optimal transfer block size * %c - Total file nodes in file system `sync': Synchronize data on disk with memory ============================================ `sync' writes any data buffered in memory out to disk. This can include (but is not limited to) modified superblocks, modified inodes, and delayed reads and writes. This must be implemented by the kernel; The `sync' program does nothing but exercise the `sync' system call. The kernel keeps data in memory to avoid doing (relatively slow) disk reads and writes. This improves performance, but if the computer crashes, data may be lost or the filesystem corrupted as a result. `sync' ensures everything in memory is written to disk. Any arguments are ignored, except for a lone `--help' or `--version' (*note Common options::). Printing text ************* This section describes commands that display text strings. `echo': Print a line of text ============================ `echo' writes each given STRING to standard output, with a space between each and a newline after the last one. Synopsis: echo [OPTION]... [STRING]... The program accepts the following options. Also see *Note Common options::. `-n' Do not output the trailing newline. `-e' Enable interpretation of the following backslash-escaped characters in each STRING: `\a' alert (bell) `\b' backspace `\c' suppress trailing newline `\f' form feed `\n' new line `\r' carriage return `\t' horizontal tab `\v' vertical tab `\\' backslash `\NNN' the character whose ASCII code is NNN (octal); if NNN is not a valid octal number, it is printed literally. `printf': Format and print data =============================== `printf' does formatted printing of text. Synopsis: printf FORMAT [ARGUMENT]... `printf' prints the FORMAT string, interpreting `%' directives and `\' escapes in the same way as the C `printf' function. The FORMAT argument is re-used as necessary to convert all of the given ARGUMENTs. `printf' has one additional directive, `%b', which prints its argument string with `\' escapes interpreted in the same way as in the FORMAT string. `printf' interprets `\0ooo' in FORMAT as an octal number (if OOO is 0 to 3 octal digits) specifying a character to print, and `\xhh' as a hexadecimal number (if HH is 1 to 2 hex digits) specifying a character to print. `printf' interprets two character syntaxes introduced in ISO C 99: `\u' for 16-bit Unicode characters, specified as 4 hex digits HHHH, and `\U' for 32-bit Unicode characters, specified as 8 hex digits HHHHHHHH. `printf' outputs the Unicode characters according to the LC_CTYPE part of the current locale, i.e. depending on the values of the environment variables `LC_ALL', `LC_CTYPE', `LANG'. The processing of `\u' and `\U' requires a full-featured `iconv' facility. It is activated on systems with glibc 2.2 (or newer), or when `libiconv' is installed prior to this package. Otherwise the use of `\u' and `\U' will give an error message. An additional escape, `\c', causes `printf' to produce no further output. The only options are a lone `--help' or `--version'. *Note Common options::. The Unicode character syntaxes are useful for writing strings in a locale independent way. For example, a string containing the Euro currency symbol $ /usr/local/bin/printf '\u20AC 14.95' will be output correctly in all locales supporting the Euro symbol (ISO-8859-15, UTF-8, and others). Similarly, a Chinese string $ /usr/local/bin/printf '\u4e2d\u6587' will be output correctly in all Chinese locales (GB2312, BIG5, UTF-8, etc). Note that in these examples, the full pathname of `printf' has been given, to distinguish it from the GNU `bash' builtin function `printf'. For larger strings, you don't need to look up the hexadecimal code values of each character one by one. ASCII characters mixed with \u escape sequences is also known as the JAVA source file encoding. You can use GNU recode 3.5c (or newer) to convert strings to this encoding. Here is how to convert a piece of text into a shell script which will output this text in a locale-independent way: $ LC_CTYPE=zh_CN.big5 /usr/local/bin/printf \ '\u4e2d\u6587\n' > sample.txt $ recode BIG5..JAVA < sample.txt \ | sed -e "s|^|/usr/local/bin/printf '|" -e "s|$|\\\\n'|" \ > sample.sh `yes': Print a string until interrupted ======================================= `yes' prints the command line arguments, separated by spaces and followed by a newline, forever until it is killed. If no arguments are given, it prints `y' followed by a newline forever until killed. The only options are a lone `--help' or `--version'. *Note Common options::. Conditions ********** This section describes commands that are primarily useful for their exit status, rather than their output. Thus, they are often used as the condition of shell `if' statements, or as the last command in a pipeline. `false': Do nothing, unsuccessfully =================================== `false' does nothing except return an exit status of 1, meaning "failure". It can be used as a place holder in shell scripts where an unsuccessful command is needed. By default, `false' honors the `--help' and `--version' options. However, that is contrary to POSIX, so when the environment variable `POSIXLY_CORRECT' is set, `false' ignores _all_ command line arguments, including `--help' and `--version'. This version of `false' is implemented as a C program, and is thus more secure and faster than a shell script implementation, and may safely be used as a dummy shell for the purpose of disabling accounts. `true': Do nothing, successfully ================================ `true' does nothing except return an exit status of 0, meaning "success". It can be used as a place holder in shell scripts where a successful command is needed, although the shell built-in command `:' (colon) may do the same thing faster. In most modern shells, `true' is a built-in command, so when you use `true' in a script, you're probably using the built-in command, not the one documented here. By default, `true' honors the `--help' and `--version' options. However, that is contrary to POSIX, so when the environment variable `POSIXLY_CORRECT' is set, `true' ignores _all_ command line arguments, including `--help' and `--version'. This version of `true' is implemented as a C program, and is thus more secure and faster than a shell script implementation, and may safely be used as a dummy shell for the purpose of disabling accounts. `test': Check file types and compare values =========================================== `test' returns a status of 0 (true) or 1 (false) depending on the evaluation of the conditional expression EXPR. Each part of the expression must be a separate argument. `test' has file status checks, string operators, and numeric comparison operators. Because most shells have a built-in command by the same name, using the unadorned command name in a script or interactively may get you different functionality than that described here. Besides the options below, `test' accepts a lone `--help' or `--version'. *Note Common options::. A single non-option argument is also allowed: `test' returns true if the argument is not null. File type tests --------------- These options test for particular types of files. (Everything's a file, but not all files are the same!) `-b FILE' True if FILE exists and is a block special device. `-c FILE' True if FILE exists and is a character special device. `-d FILE' True if FILE exists and is a directory. `-f FILE' True if FILE exists and is a regular file. `-h FILE' `-L FILE' True if FILE exists and is a symbolic link. `-p FILE' True if FILE exists and is a named pipe. `-S FILE' True if FILE exists and is a socket. `-t [FD]' True if FD is opened on a terminal. If FD is omitted, it defaults to 1 (standard output). Access permission tests ----------------------- These options test for particular access permissions. `-g FILE' True if FILE exists and has its set-group-id bit set. `-k FILE' True if FILE has its "sticky" bit set. `-r FILE' True if FILE exists and is readable. `-u FILE' True if FILE exists and has its set-user-id bit set. `-w FILE' True if FILE exists and is writable. `-x FILE' True if FILE exists and is executable. `-O FILE' True if FILE exists and is owned by the current effective user id. `-G FILE' True if FILE exists and is owned by the current effective group id. File characteristic tests ------------------------- These options test other file characteristics. `-e FILE' True if FILE exists. `-s FILE' True if FILE exists and has a size greater than zero. `FILE1 -nt FILE2' True if FILE1 is newer (according to modification date) than FILE2, or if FILE1 exists and FILE2 does not. `FILE1 -ot FILE2' True if FILE1 is older (according to modification date) than FILE2, or if FILE2 exists and FILE1 does not. `FILE1 -ef FILE2' True if FILE1 and FILE2 have the same device and inode numbers, i.e., if they are hard links to each other. String tests ------------ These options test string characteristics. Strings are not quoted for `test', though you may need to quote them to protect characters with special meaning to the shell, e.g., spaces. `-z STRING' True if the length of STRING is zero. `-n STRING' `STRING' True if the length of STRING is nonzero. `STRING1 = STRING2' True if the strings are equal. `STRING1 != STRING2' True if the strings are not equal. Numeric tests ------------- Numeric relationals. The arguments must be entirely numeric (possibly negative), or the special expression `-l STRING', which evaluates to the length of STRING. `ARG1 -eq ARG2' `ARG1 -ne ARG2' `ARG1 -lt ARG2' `ARG1 -le ARG2' `ARG1 -gt ARG2' `ARG1 -ge ARG2' These arithmetic binary operators return true if ARG1 is equal, not-equal, less-than, less-than-or-equal, greater-than, or greater-than-or-equal than ARG2, respectively. For example: test -1 -gt -2 && echo yes => yes test -l abc -gt 1 && echo yes => yes test 0x100 -eq 1 error--> test: integer expression expected before -eq Connectives for `test' ---------------------- The usual logical connectives. `! EXPR' True if EXPR is false. `EXPR1 -a EXPR2' True if both EXPR1 and EXPR2 are true. `EXPR1 -o EXPR2' True if either EXPR1 or EXPR2 is true. `expr': Evaluate expressions ============================ `expr' evaluates an expression and writes the result on standard output. Each token of the expression must be a separate argument. Operands are either numbers or strings. `expr' converts anything appearing in an operand position to an integer or a string depending on the operation being applied to it. Strings are not quoted for `expr' itself, though you may need to quote them to protect characters with special meaning to the shell, e.g., spaces. Operators may be given as infix symbols or prefix keywords. Parentheses may be used for grouping in the usual manner (you must quote parentheses to avoid the shell evaluating them, however). Exit status: 0 if the expression is neither null nor 0, 1 if the expression is null or 0, 2 for invalid expressions. String expressions ------------------ `expr' supports pattern matching and other string operators. These have lower precedence than both the numeric and relational operators (in the next sections). `STRING : REGEX' Perform pattern matching. The arguments are converted to strings and the second is considered to be a (basic, a la GNU `grep') regular expression, with a `^' implicitly prepended. The first argument is then matched against this regular expression. If the match succeeds and REGEX uses `\(' and `\)', the `:' expression returns the part of STRING that matched the subexpression; otherwise, it returns the number of characters matched. If the match fails, the `:' operator returns the null string if `\(' and `\)' are used in REGEX, otherwise 0. Only the first `\( ... \)' pair is relevant to the return value; additional pairs are meaningful only for grouping the regular expression operators. In the regular expression, `\+', `\?', and `\|' are operators which respectively match one or more, zero or one, or separate alternatives. SunOS and other `expr''s treat these as regular characters. (POSIX allows either behavior.) *Note Regular Expression Library: (regex)Top, for details of regular expression syntax. Some examples are in *Note Examples of expr::. `match STRING REGEX' An alternative way to do pattern matching. This is the same as `STRING : REGEX'. `substr STRING POSITION LENGTH' Returns the substring of STRING beginning at POSITION with length at most LENGTH. If either POSITION or LENGTH is negative, zero, or non-numeric, returns the null string. `index STRING CHARSET' Returns the first position in STRING where the first character in CHARSET was found. If no character in CHARSET is found in STRING, return 0. `length STRING' Returns the length of STRING. `+ TOKEN' Interpret TOKEN as a string, even if it is a keyword like MATCH or an operator like `/'. This makes it possible to test `expr length + "$x"' or `expr + "$x" : '.*/\(.\)'' and have it do the right thing even if the value of $X happens to be (for example) `/' or `index'. This operator is a GNU extension. Portable shell scripts should use `" $token" : ' \(.*\)'' instead of `+ "$token"'. To make `expr' interpret keywords as strings, you must use the `quote' operator. Numeric expressions ------------------- `expr' supports the usual numeric operators, in order of increasing precedence. The string operators (previous section) have lower precedence, the connectives (next section) have higher. `+ -' Addition and subtraction. Both arguments are converted to numbers; an error occurs if this cannot be done. `* / %' Multiplication, division, remainder. Both arguments are converted to numbers; an error occurs if this cannot be done. Relations for `expr' -------------------- `expr' supports the usual logical connectives and relations. These are higher precedence than either the string or numeric operators (previous sections). Here is the list, lowest-precedence operator first. `|' Returns its first argument if that is neither null nor 0, otherwise its second argument. `&' Return its first argument if neither argument is null or 0, otherwise 0. `< <= = == != >= >' Compare the arguments and return 1 if the relation is true, 0 otherwise. `==' is a synonym for `='. `expr' first tries to convert both arguments to numbers and do a numeric comparison; if either conversion fails, it does a lexicographic comparison using the character collating sequence specified by the `LC_COLLATE' locale. Examples of using `expr' ------------------------ Here are a few examples, including quoting for shell metacharacters. To add 1 to the shell variable `foo', in Bourne-compatible shells: foo=`expr $foo + 1` To print the non-directory part of the file name stored in `$fname', which need not contain a `/'. expr $fname : '.*/\(.*\)' '|' $fname An example showing that `\+' is an operator: expr aaa : 'a\+' => 3 expr abc : 'a\(.\)c' => b expr index abcdef cz => 3 expr index index a error--> expr: syntax error expr index quote index a => 0 Redirection *********** Unix shells commonly provide several forms of "redirection"--ways to change the input source or output destination of a command. But one useful redirection is performed by a separate command, not by the shell; it's described here. `tee': Redirect output to multiple files ======================================== The `tee' command copies standard input to standard output and also to any files given as arguments. This is useful when you want not only to send some data down a pipe, but also to save a copy. Synopsis: tee [OPTION]... [FILE]... If a file being written to does not already exist, it is created. If a file being written to already exists, the data it previously contained is overwritten unless the `-a' option is used. The program accepts the following options. Also see *Note Common options::. `-a' `--append' Append standard input to the given files rather than overwriting them. `-i' `--ignore-interrupts' Ignore interrupt signals. File name manipulation ********************** This section describes commands that manipulate file names. `basename': Strip directory and suffix from a file name ======================================================= `basename' removes any leading directory components from NAME. Synopsis: basename NAME [SUFFIX] If SUFFIX is specified and is identical to the end of NAME, it is removed from NAME as well. `basename' prints the result on standard output. The only options are `--help' and `--version'. *Note Common options::. `dirname': Strip non-directory suffix from a file name ====================================================== `dirname' prints all but the final slash-delimited component of a string (presumably a filename). Synopsis: dirname NAME If NAME is a single component, `dirname' prints `.' (meaning the current directory). The only options are `--help' and `--version'. *Note Common options::. `pathchk': Check file name portability ====================================== `pathchk' checks portability of filenames. Synopsis: pathchk [OPTION]... NAME... For each NAME, `pathchk' prints a message if any of these conditions is true: 1. one of the existing directories in NAME does not have search (execute) permission, 2. the length of NAME is larger than its filesystem's maximum file name length, 3. the length of one component of NAME, corresponding to an existing directory name, is larger than its filesystem's maximum length for a file name component. The program accepts the following option. Also see *Note Common options::. `-p' `--portability' Instead of performing length checks on the underlying filesystem, test the length of each file name and its components against the POSIX minimum limits for portability. Also check that the file name contains no characters not in the portable file name character set. Exit status: 0 if all specified file names passed all of the tests, 1 otherwise. Working context *************** This section describes commands that display or alter the context in which you are working: the current directory, the terminal settings, and so forth. See also the user-related commands in the next section. `pwd': Print working directory ============================== `pwd' prints the fully resolved name of the current directory. That is, all components of the printed name will be actual directory names--none will be symbolic links. Because most shells have a built-in command by the same name, using the unadorned command name in a script or interactively may get you different functionality than that described here. The only options are a lone `--help' or `--version'. *Note Common options::. `stty': Print or change terminal characteristics ================================================ `stty' prints or changes terminal characteristics, such as baud rate. Synopses: stty [OPTION] [SETTING]... stty [OPTION] If given no line settings, `stty' prints the baud rate, line discipline number (on systems that support it), and line settings that have been changed from the values set by `stty sane'. By default, mode reading and setting are performed on the tty line connected to standard input, although this can be modified by the `--file' option. `stty' accepts many non-option arguments that change aspects of the terminal line operation, as described below. The program accepts the following options. Also see *Note Common options::. `-a' `--all' Print all current settings in human-readable form. This option may not be used in combination with any line settings. `-F DEVICE' `--file=DEVICE' Set the line opened by the filename specified in DEVICE instead of the tty line connected to standard input. This option is necessary because opening a POSIX tty requires use of the `O_NONDELAY' flag to prevent a POSIX tty from blocking until the carrier detect line is high if the `clocal' flag is not set. Hence, it is not always possible to allow the shell to open the device in the traditional manner. `-g' `--save' Print all current settings in a form that can be used as an argument to another `stty' command to restore the current settings. This option may not be used in combination with any line settings. Many settings can be turned off by preceding them with a `-'. Such arguments are marked below with "May be negated" in their description. The descriptions themselves refer to the positive case, that is, when _not_ negated (unless stated otherwise, of course). Some settings are not available on all POSIX systems, since they use extensions. Such arguments are marked below with "Non-POSIX" in their description. On non-POSIX systems, those or other settings also may not be available, but it's not feasible to document all the variations: just try it and see. Control settings ---------------- Control settings: `parenb' Generate parity bit in output and expect parity bit in input. May be negated. `parodd' Set odd parity (even if negated). May be negated. `cs5' `cs6' `cs7' `cs8' Set character size to 5, 6, 7, or 8 bits. `hup' `hupcl' Send a hangup signal when the last process closes the tty. May be negated. `cstopb' Use two stop bits per character (one if negated). May be negated. `cread' Allow input to be received. May be negated. `clocal' Disable modem control signals. May be negated. `crtscts' Enable RTS/CTS flow control. Non-POSIX. May be negated. Input settings -------------- `ignbrk' Ignore break characters. May be negated. `brkint' Make breaks cause an interrupt signal. May be negated. `ignpar' Ignore characters with parity errors. May be negated. `parmrk' Mark parity errors (with a 255-0-character sequence). May be negated. `inpck' Enable input parity checking. May be negated. `istrip' Clear high (8th) bit of input characters. May be negated. `inlcr' Translate newline to carriage return. May be negated. `igncr' Ignore carriage return. May be negated. `icrnl' Translate carriage return to newline. May be negated. `ixon' Enable XON/XOFF flow control (that is, `CTRL-S'/`CTRL-Q'). May be negated. `ixoff' `tandem' Enable sending of `stop' character when the system input buffer is almost full, and `start' character when it becomes almost empty again. May be negated. `iuclc' Translate uppercase characters to lowercase. Non-POSIX. May be negated. `ixany' Allow any character to restart output (only the start character if negated). Non-POSIX. May be negated. `imaxbel' Enable beeping and not flushing input buffer if a character arrives when the input buffer is full. Non-POSIX. May be negated. Output settings --------------- These arguments specify output-related operations. `opost' Postprocess output. May be negated. `olcuc' Translate lowercase characters to uppercase. Non-POSIX. May be negated. `ocrnl' Translate carriage return to newline. Non-POSIX. May be negated. `onlcr' Translate newline to carriage return-newline. Non-POSIX. May be negated. `onocr' Do not print carriage returns in the first column. Non-POSIX. May be negated. `onlret' Newline performs a carriage return. Non-POSIX. May be negated. `ofill' Use fill (padding) characters instead of timing for delays. Non-POSIX. May be negated. `ofdel' Use delete characters for fill instead of null characters. Non-POSIX. May be negated. `nl1' `nl0' Newline delay style. Non-POSIX. `cr3' `cr2' `cr1' `cr0' Carriage return delay style. Non-POSIX. `tab3' `tab2' `tab1' `tab0' Horizontal tab delay style. Non-POSIX. `bs1' `bs0' Backspace delay style. Non-POSIX. `vt1' `vt0' Vertical tab delay style. Non-POSIX. `ff1' `ff0' Form feed delay style. Non-POSIX. Local settings -------------- `isig' Enable `interrupt', `quit', and `suspend' special characters. May be negated. `icanon' Enable `erase', `kill', `werase', and `rprnt' special characters. May be negated. `iexten' Enable non-POSIX special characters. May be negated. `echo' Echo input characters. May be negated. `echoe' `crterase' Echo `erase' characters as backspace-space-backspace. May be negated. `echok' Echo a newline after a `kill' character. May be negated. `echonl' Echo newline even if not echoing other characters. May be negated. `noflsh' Disable flushing after `interrupt' and `quit' special characters. May be negated. `xcase' Enable input and output of uppercase characters by preceding their lowercase equivalents with `\', when `icanon' is set. Non-POSIX. May be negated. `tostop' Stop background jobs that try to write to the terminal. Non-POSIX. May be negated. `echoprt' `prterase' Echo erased characters backward, between `\' and `/'. Non-POSIX. May be negated. `echoctl' `ctlecho' Echo control characters in hat notation (`^C') instead of literally. Non-POSIX. May be negated. `echoke' `crtkill' Echo the `kill' special character by erasing each character on the line as indicated by the `echoprt' and `echoe' settings, instead of by the `echoctl' and `echok' settings. Non-POSIX. May be negated. Combination settings -------------------- Combination settings: `evenp' `parity' Same as `parenb -parodd cs7'. May be negated. If negated, same as `-parenb cs8'. `oddp' Same as `parenb parodd cs7'. May be negated. If negated, same as `-parenb cs8'. `nl' Same as `-icrnl -onlcr'. May be negated. If negated, same as `icrnl -inlcr -igncr onlcr -ocrnl -onlret'. `ek' Reset the `erase' and `kill' special characters to their default values. `sane' Same as: cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke and also sets all special characters to their default values. `cooked' Same as `brkint ignpar istrip icrnl ixon opost isig icanon', plus sets the `eof' and `eol' characters to their default values if they are the same as the `min' and `time' characters. May be negated. If negated, same as `raw'. `raw' Same as: -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon -xcase min 1 time 0 May be negated. If negated, same as `cooked'. `cbreak' Same as `-icanon'. May be negated. If negated, same as `icanon'. `pass8' Same as `-parenb -istrip cs8'. May be negated. If negated, same as `parenb istrip cs7'. `litout' Same as `-parenb -istrip -opost cs8'. May be negated. If negated, same as `parenb istrip opost cs7'. `decctlq' Same as `-ixany'. Non-POSIX. May be negated. `tabs' Same as `tab0'. Non-POSIX. May be negated. If negated, same as `tab3'. `lcase' `LCASE' Same as `xcase iuclc olcuc'. Non-POSIX. May be negated. `crt' Same as `echoe echoctl echoke'. `dec' Same as `echoe echoctl echoke -ixany intr ^C erase ^? kill C-u'. Special characters ------------------ The special characters' default values vary from system to system. They are set with the syntax `name value', where the names are listed below and the value can be given either literally, in hat notation (`^C'), or as an integer which may start with `0x' to indicate hexadecimal, `0' to indicate octal, or any other digit to indicate decimal. For GNU stty, giving a value of `^-' or `undef' disables that special character. (This is incompatible with Ultrix `stty', which uses a value of `u' to disable a special character. GNU `stty' treats a value `u' like any other, namely to set that special character to .) `intr' Send an interrupt signal. `quit' Send a quit signal. `erase' Erase the last character typed. `kill' Erase the current line. `eof' Send an end of file (terminate the input). `eol' End the line. `eol2' Alternate character to end the line. Non-POSIX. `swtch' Switch to a different shell layer. Non-POSIX. `start' Restart the output after stopping it. `stop' Stop the output. `susp' Send a terminal stop signal. `dsusp' Send a terminal stop signal after flushing the input. Non-POSIX. `rprnt' Redraw the current line. Non-POSIX. `werase' Erase the last word typed. Non-POSIX. `lnext' Enter the next character typed literally, even if it is a special character. Non-POSIX. Special settings ---------------- `min N' Set the minimum number of characters that will satisfy a read until the time value has expired, when `-icanon' is set. `time N' Set the number of tenths of a second before reads time out if the minimum number of characters have not been read, when `-icanon' is set. `ispeed N' Set the input speed to N. `ospeed N' Set the output speed to N. `rows N' Tell the tty kernel driver that the terminal has N rows. Non-POSIX. `cols N' `columns N' Tell the kernel that the terminal has N columns. Non-POSIX. `size' Print the number of rows and columns that the kernel thinks the terminal has. (Systems that don't support rows and columns in the kernel typically use the environment variables `LINES' and `COLUMNS' instead; however, GNU `stty' does not know anything about them.) Non-POSIX. `line N' Use line discipline N. Non-POSIX. `speed' Print the terminal speed. `N' Set the input and output speeds to N. N can be one of: 0 50 75 110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200 38400 `exta' `extb'. `exta' is the same as 19200; `extb' is the same as 38400. 0 hangs up the line if `-clocal' is set. `printenv': Print all or some environment variables =================================================== `printenv' prints environment variable values. Synopsis: printenv [OPTION] [VARIABLE]... If no VARIABLEs are specified, `printenv' prints the value of every environment variable. Otherwise, it prints the value of each VARIABLE that is set, and nothing for those that are not set. The only options are a lone `--help' or `--version'. *Note Common options::. Exit status: 0 if all variables specified were found 1 if at least one specified variable was not found 2 if a write error occurred `tty': Print file name of terminal on standard input ==================================================== `tty' prints the file name of the terminal connected to its standard input. It prints `not a tty' if standard input is not a terminal. Synopsis: tty [OPTION]... The program accepts the following option. Also see *Note Common options::. `-s' `--silent' `--quiet' Print nothing; only return an exit status. Exit status: 0 if standard input is a terminal 1 if standard input is not a terminal 2 if given incorrect arguments 3 if a write error occurs User information **************** This section describes commands that print user-related information: logins, groups, and so forth. `id': Print real and effective uid and gid ========================================== `id' prints information about the given user, or the process running it if no user is specified. Synopsis: id [OPTION]... [USERNAME] By default, it prints the real user id, real group id, effective user id if different from the real user id, effective group id if different from the real group id, and supplemental group ids. Each of these numeric values is preceded by an identifying string and followed by the corresponding user or group name in parentheses. The options cause `id' to print only part of the above information. Also see *Note Common options::. `-g' `--group' Print only the group id. `-G' `--groups' Print only the supplementary groups. `-n' `--name' Print the user or group name instead of the ID number. Requires `-u', `-g', or `-G'. `-r' `--real' Print the real, instead of effective, user or group id. Requires `-u', `-g', or `-G'. `-u' `--user' Print only the user id. `logname': Print current login name =================================== `logname' prints the calling user's name, as found in the file `/etc/utmp', and exits with a status of 0. If there is no `/etc/utmp' entry for the calling process, `logname' prints an error message and exits with a status of 1. The only options are `--help' and `--version'. *Note Common options::. `whoami': Print effective user id ================================= `whoami' prints the user name associated with the current effective user id. It is equivalent to the command `id -un'. The only options are `--help' and `--version'. *Note Common options::. `groups': Print group names a user is in ======================================== `groups' prints the names of the primary and any supplementary groups for each given USERNAME, or the current process if no names are given. If names are given, the name of each user is printed before the list of that user's groups. Synopsis: groups [USERNAME]... The group lists are equivalent to the output of the command `id -Gn'. The only options are `--help' and `--version'. *Note Common options::. `users': Print login names of users currently logged in ======================================================= `users' prints on a single line a blank-separated list of user names of users currently logged in to the current host. Each user name corresponds to a login session, so if a user has more than one login session, that user's name will appear the same number of times in the output. Synopsis: users [FILE] With no FILE argument, `users' extracts its information from the file `/etc/utmp'. If a file argument is given, `users' uses that file instead. A common choice is `/etc/wtmp'. The only options are `--help' and `--version'. *Note Common options::. `who': Print who is currently logged in ======================================= `who' prints information about users who are currently logged on. Synopsis: `who' [OPTION] [FILE] [am i] If given no non-option arguments, `who' prints the following information for each user currently logged on: login name, terminal line, login time, and remote hostname or X display. If given one non-option argument, `who' uses that instead of `/etc/utmp' as the name of the file containing the record of users logged on. `/etc/wtmp' is commonly given as an argument to `who' to look at who has previously logged on. If given two non-option arguments, `who' prints only the entry for the user running it (determined from its standard input), preceded by the hostname. Traditionally, the two arguments given are `am i', as in `who am i'. The program accepts the following options. Also see *Note Common options::. `-m' Same as `who am i'. `-q' `--count' Print only the login names and the number of users logged on. Overrides all other options. `-s' Ignored; for compatibility with other versions of `who'. `-i' `-u' `--idle' After the login time, print the number of hours and minutes that the user has been idle. `.' means the user was active in last minute. `old' means the user was idle for more than 24 hours. `-l' `--lookup' Attempt to canonicalize hostnames found in utmp through a DNS lookup. This is not the default because it can cause significant delays on systems with automatic dial-up internet access. `-H' `--heading' Print a line of column headings. `-w' `-T' `--mesg' `--message' `--writable' After each login name print a character indicating the user's message status: `+' allowing `write' messages `-' disallowing `write' messages `?' cannot find terminal device System context ************** This section describes commands that print or change system-wide information. `date': Print or set system date and time ========================================= Synopses: date [OPTION]... [+FORMAT] date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ] Invoking `date' with no FORMAT argument is equivalent to invoking `date '+%a %b %e %H:%M:%S %Z %Y''. If given an argument that starts with a `+', `date' prints the current time and date (or the time and date specified by the `--date' option, see below) in the format defined by that argument, which is the same as in the `strftime' function. Except for directives, which start with `%', characters in the format string are printed unchanged. The directives are described below. Time directives --------------- `date' directives related to times. `%H' hour (00...23) `%I' hour (01...12) `%k' hour ( 0...23) `%l' hour ( 1...12) `%M' minute (00...59) `%N' nanoseconds (000000000...999999999) `%p' locale's upper case `AM' or `PM' (blank in many locales) `%P' locale's lower case `am' or `pm' (blank in many locales) `%r' time, 12-hour (hh:mm:ss [AP]M) `%R' time, 24-hour (hh:mm). Same as `%H:%M'. `%s' seconds since the epoch, i.e., 1 January 1970 00:00:00 UTC (a GNU extension). Note that this value is the number of seconds between the epoch and the current date as defined by the localtime system call. It isn't changed by the `--date' option. `%S' second (00...60). The range is [00...60], and not [00...59], in order to accommodate the occasional positive leap second. `%T' time, 24-hour (hh:mm:ss) `%X' locale's time representation (%H:%M:%S) `%z' RFC-822 style numeric time zone (e.g., -0600 or +0100), or nothing if no time zone is determinable. This value reflects the _current_ time zone. It isn't changed by the `--date' option. `%Z' time zone (e.g., EDT), or nothing if no time zone is determinable. Note that this value reflects the _current_ time zone. It isn't changed by the `--date' option. Date directives --------------- `date' directives related to dates. `%a' locale's abbreviated weekday name (Sun...Sat) `%A' locale's full weekday name, variable length (Sunday...Saturday) `%b' locale's abbreviated month name (Jan...Dec) `%B' locale's full month name, variable length (January...December) `%c' locale's date and time (Sat Nov 04 12:02:33 EST 1989) `%C' century (year divided by 100 and truncated to an integer) (00...99) `%d' day of month (01...31) `%D' date (mm/dd/yy) `%e' blank-padded day of month (1...31) `%F' the ISO 8601 standard date format: `%Y-%m-%d'. This is the preferred form for all uses. `%g' The year corresponding to the ISO week number, but without the century (range `00' through `99'). This has the same format and value as `%y', except that if the ISO week number (see `%V') belongs to the previous or next year, that year is used instead. `%G' The year corresponding to the ISO week number. This has the same format and value as `%Y', except that if the ISO week number (see `%V') belongs to the previous or next year, that year is used instead. `%h' same as %b `%j' day of year (001...366) `%m' month (01...12) `%u' day of week (1...7) with 1 corresponding to Monday `%U' week number of year with Sunday as first day of week (00...53). Days in a new year preceding the first Sunday are in week zero. `%V' week number of year with Monday as first day of the week as a decimal (01...53). If the week containing January 1 has four or more days in the new year, then it is considered week 1; otherwise, it is week 53 of the previous year, and the next week is week 1. (See the ISO 8601 standard.) `%w' day of week (0...6) with 0 corresponding to Sunday `%W' week number of year with Monday as first day of week (00...53). Days in a new year preceding the first Monday are in week zero. `%x' locale's date representation (mm/dd/yy) `%y' last two digits of year (00...99) `%Y' year (1970....) Literal directives ------------------ `date' directives that produce literal strings. `%%' a literal % `%n' a newline `%t' a horizontal tab Padding ------- By default, `date' pads numeric fields with zeroes, so that, for example, numeric months are always output as two digits. GNU `date' recognizes the following numeric modifiers between the `%' and the directive. `-' (hyphen) do not pad the field; useful if the output is intended for human consumption. `_' (underscore) pad the field with spaces; useful if you need a fixed number of characters in the output, but zeroes are too distracting. These are GNU extensions. Here is an example illustrating the differences: date +%d/%m -d "Feb 1" => 01/02 date +%-d/%-m -d "Feb 1" => 1/2 date +%_d/%_m -d "Feb 1" => 1/ 2 Setting the time ---------------- If given an argument that does not start with `+', `date' sets the system clock to the time and date specified by that argument (as described below). You must have appropriate privileges to set the system clock. The `--date' and `--set' options may not be used with such an argument. The `--universal' option may be used with such an argument to indicate that the specified time and date are relative to Coordinated Universal Time rather than to the local time zone. The argument must consist entirely of digits, which have the following meaning: `MM' month `DD' day within month `hh' hour `mm' minute `CC' first two digits of year (optional) `YY' last two digits of year (optional) `ss' second (optional) The `--set' option also sets the system clock; see the next section. Options for `date' ------------------ The program accepts the following options. Also see *Note Common options::. `-d DATESTR' `--date=DATESTR' Display the time and date specified in DATESTR instead of the current time and date. DATESTR can be in almost any common format. It can contain month names, time zones, `am' and `pm', `yesterday', `ago', `next', etc. *Note Date input formats::. `-f DATEFILE' `--file=DATEFILE' Parse each line in DATEFILE as with `-d' and display the resulting time and date. If DATEFILE is `-', use standard input. This is useful when you have many dates to process, because the system overhead of starting up the `date' executable many times can be considerable. `-I TIMESPEC' `--iso-8601[=TIMESPEC]' Display the date using the ISO 8601 format, `%Y-%m-%d'. The argument TIMESPEC specifies the number of additional terms of the time to include. It can be one of the following: `auto' The default behavior: print just the date. `hours' Append the hour of the day to the date. `minutes' Append the hours and minutes. `seconds' Append the hours, minutes, and seconds. If showing any time terms, then include the time zone using the format `%z'. If TIMESPEC is omitted with `--iso-8601', the default is `auto'. On older systems, GNU `date' instead supports an obsolete option `-I[TIMESPEC]', where TIMESPEC defaults to `auto'. POSIX 1003.1-2001 (*note Standards conformance::) does not allow `-I' without an argument; use `--iso-8601' instead. `-R' `--rfc-822' Display the time and date using the RFC-822-conforming format, `%a, %_d %b %Y %H:%M:%S %z'. `-r FILE' `--reference=FILE' Display the time and date reference according to the last modification time of FILE, instead of the current time and date. `-s DATESTR' `--set=DATESTR' Set the time and date to DATESTR. See `-d' above. `-u' `--utc' `--universal' Use Coordinated Universal Time (UTC) by operating as if the `TZ' environment variable were set to the string `UTC0'. Normally, `date' operates in the time zone indicated by `TZ', or the system default if `TZ' is not set. Coordinated Universal Time is often called "Greenwich Mean Time" (GMT) for historical reasons. Examples of `date' ------------------ Here are a few examples. Also see the documentation for the `-d' option in the previous section. * To print the date of the day before yesterday: date --date='2 days ago' * To print the date of the day three months and one day hence: date --date='3 months 1 day' * To print the day of year of Christmas in the current year: date --date='25 Dec' +%j * To print the current full month name and the day of the month: date '+%B %d' But this may not be what you want because for the first nine days of the month, the `%d' expands to a zero-padded two-digit field, for example `date -d 1may '+%B %d'' will print `May 01'. * To print a date without the leading zero for one-digit days of the month, you can use the (GNU extension) `-' modifier to suppress the padding altogether. date -d 1may '+%B %-d * To print the current date and time in the format required by many non-GNU versions of `date' when setting the system clock: date +%m%d%H%M%Y.%S * To set the system clock forward by two minutes: date --set='+2 minutes' * To print the date in the format specified by RFC-822, use `date --rfc'. I just did and saw this: Mon, 25 Mar 1996 23:34:17 -0600 * To convert a date string to the number of seconds since the epoch (which is 1970-01-01 00:00:00 UTC), use the `--date' option with the `%s' format. That can be useful in sorting and/or graphing and/or comparing data by date. The following command outputs the number of the seconds since the epoch for the time two minutes after the epoch: date --date='1970-01-01 00:02:00 +0000' +%s 120 If you do not specify time zone information in the date string, `date' uses your computer's idea of the time zone when interpreting the string. For example, if your computer's time zone is that of Cambridge, Massachusetts, which was then 5 hours (i.e., 18,000 seconds) behind UTC: # local time zone used date --date='1970-01-01 00:02:00' +%s 18120 * If you're sorting or graphing dated data, your raw date values may be represented as seconds since the epoch. But few people can look at the date `946684800' and casually note "Oh, that's the first second of the year 2000 in Greenwich, England." date --date='2000-01-01 UTC' +%s 946684800 To convert such an unwieldy number of seconds back to a more readable form, use a command like this: # local time zone used date -d '1970-01-01 UTC 946684800 seconds' +"%Y-%m-%d %T %z" 1999-12-31 19:00:00 -0500 `uname': Print system information ================================= `uname' prints information about the machine and operating system it is run on. If no options are given, `uname' acts as if the `-s' option were given. Synopsis: uname [OPTION]... If multiple options or `-a' are given, the selected information is printed in this order: KERNEL-NAME NODENAME KERNEL-RELEASE KERNEL-VERSION MACHINE PROCESSOR HARDWARE-PLATFORM OPERATING-SYSTEM The information may contain internal spaces, so such output cannot be parsed reliably. In the following example, RELEASE is `2.2.18ss.e820-bda652a #4 SMP Tue Jun 5 11:24:08 PDT 2001': uname -a => Linux dum 2.2.18ss.e820-bda652a #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686 unknown unknown GNU/Linux The program accepts the following options. Also see *Note Common options::. `-a' `--all' Print all of the below information. `-i' `--hardware-platform' Print the hardware platform name (sometimes called the hardware implementation). `-m' `--machine' Print the machine hardware name (sometimes called the hardware class). `-n' `--nodename' Print the network node hostname. `-p' `--processor' Print the processor type (sometimes called the instruction set architecture or ISA). `-o' `--operating-system' Print the name of the operating system. `-r' `--kernel-release' Print the kernel release. `-s' `--kernel-name' Print the kernel name. `-v' `--kernel-version' Print the kernel version. `hostname': Print or set system name ==================================== With no arguments, `hostname' prints the name of the current host system. With one argument, it sets the current host name to the specified string. You must have appropriate privileges to set the host name. Synopsis: hostname [NAME] The only options are `--help' and `--version'. *Note Common options::. `hostid': Print numeric host identifier. ======================================== `hostid' prints the numeric identifier of the current host in hexadecimal. This command accepts no arguments. The only options are `--help' and `--version'. *Note Common options::. For example, here's what it prints on one system I use: $ hostid 1bac013d On that system, the 32-bit quantity happens to be closely related to the system's Internet address, but that isn't always the case. Modified command invocation *************************** This section describes commands that run other commands in some context different than the current one: a modified environment, as a different user, etc. `chroot': Run a command with a different root directory ======================================================= `chroot' runs a command with a specified root directory. On many systems, only the super-user can do this. Synopses: chroot NEWROOT [COMMAND [ARGS]...] chroot OPTION Ordinarily, filenames are looked up starting at the root of the directory structure, i.e., `/'. `chroot' changes the root to the directory NEWROOT (which must exist) and then runs COMMAND with optional ARGS. If COMMAND is not specified, the default is the value of the `SHELL' environment variable or `/bin/sh' if not set, invoked with the `-i' option. The only options are `--help' and `--version'. *Note Common options::. Here are a few tips to help avoid common problems in using chroot. To start with a simple example, make COMMAND refer to a statically linked binary. If you were to use a dynamically linked executable, then you'd have to arrange to have the shared libraries in the right place under your new root directory. For example, if you create a statically linked `ls' executable, and put it in /tmp/empty, you can run this command as root: $ chroot /tmp/empty /ls -Rl / Then you'll see output like this: /: total 1023 -rwxr-xr-x 1 0 0 1041745 Aug 16 11:17 ls If you want to use a dynamically linked executable, say `bash', then first run `ldd bash' to see what shared objects it needs. Then, in addition to copying the actual binary, also copy the listed files to the required positions under your intended new root directory. Finally, if the executable requires any other files (e.g., data, state, device files), copy them into place, too. `env': Run a command in a modified environment ============================================== `env' runs a command with a modified environment. Synopses: env [OPTION]... [NAME=VALUE]... [COMMAND [ARGS]...] env Arguments of the form `VARIABLE=VALUE' set the environment variable VARIABLE to value VALUE. VALUE may be empty (`VARIABLE='). Setting a variable to an empty value is different from unsetting it. The first remaining argument specifies the program name to invoke; it is searched for according to the `PATH' environment variable. Any remaining arguments are passed as arguments to that program. If no command name is specified following the environment specifications, the resulting environment is printed. This is like specifying a command name of `printenv'. The program accepts the following options. Also see *Note Common options::. `-u NAME' `--unset=NAME' Remove variable NAME from the environment, if it was in the environment. `-' `-i' `--ignore-environment' Start with an empty environment, ignoring the inherited environment. `nice': Run a command with modified scheduling priority ======================================================= `nice' prints or modifies the scheduling priority of a job. Synopsis: nice [OPTION]... [COMMAND [ARG]...] If no arguments are given, `nice' prints the current scheduling priority, which it inherited. Otherwise, `nice' runs the given COMMAND with its scheduling priority adjusted. If no ADJUSTMENT is given, the priority of the command is incremented by 10. You must have appropriate privileges to specify a negative adjustment. The priority can be adjusted by `nice' over the range of -20 (the highest priority) to 19 (the lowest). Because most shells have a built-in command by the same name, using the unadorned command name in a script or interactively may get you different functionality than that described here. The program accepts the following option. Also see *Note Common options::. `-n ADJUSTMENT' `--adjustment=ADJUSTMENT' Add ADJUSTMENT instead of 10 to the command's priority. On older systems, `nice' supports an obsolete option `-ADJUSTMENT'. POSIX 1003.1-2001 (*note Standards conformance::) does not allow this; use `-n ADJUSTMENT' instead. `nohup': Run a command immune to hangups ======================================== `nohup' runs the given COMMAND with hangup signals ignored, so that the command can continue running in the background after you log out. Synopsis: nohup COMMAND [ARG]... If standard output is a terminal, it is redirected so that it is appended to the file `nohup.out'; if that cannot be written to, it is appended to the file `$HOME/nohup.out'. If that cannot be written to, the command is not run. If `nohup' creates either `nohup.out' or `$HOME/nohup.out', it creates it with no "group" or "other" access permissions. It does not change the permissions if the output file already existed. If standard error is a terminal, it is redirected to the same file descriptor as the standard output. `nohup' does not automatically put the command it runs in the background; you must do that explicitly, by ending the command line with an `&'. Also, `nohup' does not change the scheduling priority of COMMAND; use `nice' for that, e.g., `nohup nice COMMAND'. The only options are `--help' and `--version'. *Note Common options::. Exit status: 126 if COMMAND was found but could not be invoked 127 if `nohup' itself failed or if COMMAND could not be found the exit status of COMMAND otherwise `su': Run a command with substitute user and group id ===================================================== `su' allows one user to temporarily become another user. It runs a command (often an interactive shell) with the real and effective user id, group id, and supplemental groups of a given USER. Synopsis: su [OPTION]... [USER [ARG]...] If no USER is given, the default is `root', the super-user. The shell to use is taken from USER's `passwd' entry, or `/bin/sh' if none is specified there. If USER has a password, `su' prompts for the password unless run by a user with effective user id of zero (the super-user). By default, `su' does not change the current directory. It sets the environment variables `HOME' and `SHELL' from the password entry for USER, and if USER is not the super-user, sets `USER' and `LOGNAME' to USER. By default, the shell is not a login shell. Any additional ARGs are passed as additional arguments to the shell. GNU `su' does not treat `/bin/sh' or any other shells specially (e.g., by setting `argv[0]' to `-su', passing `-c' only to certain shells, etc.). `su' can optionally be compiled to use `syslog' to report failed, and optionally successful, `su' attempts. (If the system supports `syslog'.) However, GNU `su' does not check if the user is a member of the `wheel' group; see below. The program accepts the following options. Also see *Note Common options::. `-c COMMAND' `--command=COMMAND' Pass COMMAND, a single command line to run, to the shell with a `-c' option instead of starting an interactive shell. `-f' `--fast' Pass the `-f' option to the shell. This probably only makes sense if the shell run is `csh' or `tcsh', for which the `-f' option prevents reading the startup file (`.cshrc'). With Bourne-like shells, the `-f' option disables file name pattern expansion (globbing), which is not likely to be useful. `-' `-l' `--login' Make the shell a login shell. This means the following. Unset all environment variables except `TERM', `HOME', and `SHELL' (which are set as described above), and `USER' and `LOGNAME' (which are set, even for the super-user, as described above), and set `PATH' to a compiled-in default value. Change to USER's home directory. Prepend `-' to the shell's name, intended to make it read its login startup file(s). `-m' `-p' `--preserve-environment' Do not change the environment variables `HOME', `USER', `LOGNAME', or `SHELL'. Run the shell given in the environment variable `SHELL' instead of the shell from USER's passwd entry, unless the user running `su' is not the superuser and USER's shell is restricted. A "restricted shell" is one that is not listed in the file `/etc/shells', or in a compiled-in list if that file does not exist. Parts of what this option does can be overridden by `--login' and `--shell'. `-s SHELL' `--shell=SHELL' Run SHELL instead of the shell from USER's passwd entry, unless the user running `su' is not the superuser and USER's shell is restricted (see `-m' just above). Why GNU `su' does not support the `wheel' group =============================================== (This section is by Richard Stallman.) Sometimes a few of the users try to hold total power over all the rest. For example, in 1984, a few users at the MIT AI lab decided to seize power by changing the operator password on the Twenex system and keeping it secret from everyone else. (I was able to thwart this coup and give power back to the users by patching the kernel, but I wouldn't know how to do that in Unix.) However, occasionally the rulers do tell someone. Under the usual `su' mechanism, once someone learns the root password who sympathizes with the ordinary users, he or she can tell the rest. The "wheel group" feature would make this impossible, and thus cement the power of the rulers. I'm on the side of the masses, not that of the rulers. If you are used to supporting the bosses and sysadmins in whatever they do, you might find this idea strange at first. Process control *************** `kill': Send a signal to processes ================================== The `kill' command sends a signal to processes, causing them to terminate or otherwise act upon receiving the signal in some way. Alternatively, it lists information about signals. Synopses: kill [-s SIGNAL | --signal SIGNAL | -SIGNAL] PID... kill [-l | --list | -t | --table] [SIGNAL]... The first form of the `kill' command sends a signal to all PID arguments. The default signal to send if none is specified is `TERM'. The special signal number `0' does not denote a valid signal, but can be used to test whether the PID arguments specify processes to which a signal could be sent. If PID is positive, the signal is sent to the process with the process id PID. If PID is zero, the signal is sent to all processes in the process group of the current process. If PID is -1, the signal is sent to all processes for which the user has permission to send a signal. If PID is less than -1, the signal is sent to all processes in the process group that equals the absolute value of PID. If PID is not positive, a system-dependent set of system processes is excluded from the list of processes to which the signal is sent. If a negative PID argument is desired as the first one, either a signal must be specified as well, or the option parsing must be interrupted with `-' before the first PID argument. The following three commands are equivalent: kill -15 -1 kill -TERM -1 kill -- -1 The first form of the `kill' command succeeds if every PID argument specifies at least one process that the signal was sent to. The second form of the `kill' command lists signal information. Either the `-l' or `--list' option, or the `-t' or `--table' option must be specified. Without any SIGNAL argument, all supported signals are listed. The output of `-l' or `--list' is a list of the signal names, one per line; if SIGNAL is already a name, the signal number is printed instead. The output of `-t' or `--table' is a table of signal numbers, names, and descriptions. This form of the `kill' command succeeds if all SIGNAL arguments are valid and if there is no output error. The `kill' command also supports the `--help' and `--version' options. *Note Common options::. A SIGNAL may be a signal name like `HUP', or a signal number like `1', or an exit status of a process terminated by the signal. A signal name can be given in canonical form or prefixed by `SIG'. The case of the letters is ignored, except for the `-SIGNAL' option which must use upper case to avoid ambiguity with lower case option letters. The following signal names and numbers are supported on all POSIX compliant systems: `HUP' 1. Hangup. `INT' 2. Terminal interrupt. `QUIT' 3. Terminal quit. `ABRT' 6. Process abort. `KILL' 9. Kill (cannot be caught or ignored). `ALRM' 14. Alarm Clock. `TERM' 15. Termination. Other supported signal names have system-dependent corresponding numbers. All systems conforming to POSIX 1003.1-2001 also support the following signals: `BUS' Access to an undefined portion of a memory object. `CHLD' Child process terminated, stopped, or continued. `CONT' Continue executing, if stopped. `FPE' Erroneous arithmetic operation. `ILL' Illegal Instruction. `PIPE' Write on a pipe with no one to read it. `SEGV' Invalid memory reference. `STOP' Stop executing (cannot be caught or ignored). `TSTP' Terminal stop. `TTIN' Background process attempting read. `TTOU' Background process attempting write. `URG' High bandwidth data is available at a socket. `USR1' User-defined signal 1. `USR2' User-defined signal 2. POSIX 1003.1-2001 systems that support the XSI extension also support the following signals: `POLL' Pollable event. `PROF' Profiling timer expired. `SYS' Bad system call. `TRAP' Trace/breakpoint trap. `VTALRM' Virtual timer expired. `XCPU' CPU time limit exceeded. `XFSZ' File size limit exceeded. POSIX 1003.1-2001 systems that support the XRT extension also support at least eight real-time signals called `RTMIN', `RTMIN+1', ..., `RTMAX-1', `RTMAX'. Delaying ******** `sleep': Delay for a specified time =================================== `sleep' pauses for an amount of time specified by the sum of the values of the command line arguments. Synopsis: sleep NUMBER[smhd]... Each argument is a number followed by an optional unit; the default is seconds. The units are: `s' seconds `m' minutes `h' hours `d' days Historical implementations of `sleep' have required that NUMBER be an integer. However, GNU `sleep' accepts arbitrary floating point numbers. The only options are `--help' and `--version'. *Note Common options::. Numeric operations ****************** These programs do numerically-related operations. `factor': Print prime factors ============================= `factor' prints prime factors. Synopses: factor [NUMBER]... factor OPTION If no NUMBER is specified on the command line, `factor' reads numbers from standard input, delimited by newlines, tabs, or spaces. The only options are `--help' and `--version'. *Note Common options::. The algorithm it uses is not very sophisticated, so for some inputs `factor' runs for a long time. The hardest numbers to factor are the products of large primes. Factoring the product of the two largest 32-bit prime numbers takes over 10 minutes of CPU time on a 400MHz Pentium II. $ p=`echo '4294967279 * 4294967291'|bc` $ factor $p 18446743979220271189: 4294967279 4294967291 In contrast, `factor' factors the largest 64-bit number in just over a tenth of a second: $ factor `echo '2^64-1'|bc` 18446744073709551615: 3 5 17 257 641 65537 6700417 `seq': Print numeric sequences ============================== `seq' prints a sequence of numbers to standard output. Synopses: seq [OPTION]... [FIRST [INCREMENT]] LAST... `seq' prints the numbers from FIRST to LAST by INCREMENT. By default, FIRST and INCREMENT are both 1, and each number is printed on its own line. All numbers can be reals, not just integers. The program accepts the following options. Also see *Note Common options::. `-f FORMAT' `--format=FORMAT' Print all numbers using FORMAT; default `%g'. FORMAT must contain exactly one of the floating point output formats `%e', `%f', or `%g'. `-s STRING' `--separator=STRING' Separate numbers with STRING; default is a newline. The output always terminates with a newline. `-w' `--equal-width' Print all numbers with the same width, by padding with leading zeroes. (To have other kinds of padding, use `--format'). If you want to use `seq' to print sequences of large integer values, don't use the default `%g' format since it can result in loss of precision: $ seq 1000000 1000001 1e+06 1e+06 Instead, you can use the format, `%1.f', to print large decimal numbers with no exponent and no decimal point. $ seq --format=%1.f 1000000 1000001 1000000 1000001 If you want hexadecimal output, you can use `printf' to perform the conversion: $ printf %x'\n' `seq -f %1.f 1048575 1024 1050623` fffff 1003ff 1007ff For very long lists of numbers, use xargs to avoid system limitations on the length of an argument list: $ seq -f %1.f 1000000 | xargs printf %x'\n' | tail -n 3 f423e f423f f4240 To generate octal output, use the printf `%o' format instead of `%x'. Note however that using printf works only for numbers smaller than `2^32': $ printf "%x\n" `seq -f %1.f 4294967295 4294967296` ffffffff bash: printf: 4294967296: Numerical result out of range On most systems, seq can produce whole-number output for values up to `2^53', so here's a more general approach to base conversion that also happens to be more robust for such large numbers. It works by using `bc' and setting its output radix variable, OBASE, to `16' in this case to produce hexadecimal output. $ (echo obase=16; seq -f %1.f 4294967295 4294967296)|bc FFFFFFFF 100000000 Be careful when using `seq' with a fractional INCREMENT, otherwise you may see surprising results. Most people would expect to see `0.3' printed as the last number in this example: $ seq -s' ' 0 .1 .3 0 0.1 0.2 But that doesn't happen on most systems because `seq' is implemented using binary floating point arithmetic (via the C `double' type) - which means some decimal numbers like `.1' cannot be represented exactly. That in turn means some nonintuitive conditions like `.1 * 3 > .3' will end up being true. To work around that in the above example, use a slightly larger number as the LAST value: $ seq -s' ' 0 .1 .31 0 0.1 0.2 0.3 In general, when using an INCREMENT with a fractional part, where (LAST - FIRST) / INCREMENT is (mathematically) a whole number, specify a slightly larger (or smaller, if INCREMENT is negative) value for LAST to ensure that LAST is the final value printed by seq. File permissions **************** Each file has a set of "permissions" that control the kinds of access that users have to that file. The permissions for a file are also called its "access mode". They can be represented either in symbolic form or as an octal number. Structure of File Permissions ============================= There are three kinds of permissions that a user can have for a file: 1. permission to read the file. For directories, this means permission to list the contents of the directory. 2. permission to write to (change) the file. For directories, this means permission to create and remove files in the directory. 3. permission to execute the file (run it as a program). For directories, this means permission to access files in the directory. There are three categories of users who may have different permissions to perform any of the above operations on a file: 1. the file's owner; 2. other users who are in the file's group; 3. everyone else. Files are given an owner and group when they are created. Usually the owner is the current user and the group is the group of the directory the file is in, but this varies with the operating system, the filesystem the file is created on, and the way the file is created. You can change the owner and group of a file by using the `chown' and `chgrp' commands. In addition to the three sets of three permissions listed above, a file's permissions have three special components, which affect only executable files (programs) and, on some systems, directories: 1. set the process's effective user ID to that of the file upon execution (called the "setuid bit"). No effect on directories. 2. set the process's effective group ID to that of the file upon execution (called the "setgid bit"). For directories on some systems, put files created in the directory into the same group as the directory, no matter what group the user who creates them is in. 3. save the program's text image on the swap device so it will load more quickly when run (called the "sticky bit"). For directories on some systems, prevent users from removing or renaming a file in a directory unless they own the file or the directory; this is called the "restricted deletion flag" for the directory. Symbolic Modes ============== "Symbolic modes" represent changes to files' permissions as operations on single-character symbols. They allow you to modify either all or selected parts of files' permissions, optionally based on their previous values, and perhaps on the current `umask' as well (*note Umask and Protection::). The format of symbolic modes is: [ugoa...][[+-=][rwxXstugo...]...][,...] The following sections describe the operators and other details of symbolic modes. Setting Permissions ------------------- The basic symbolic operations on a file's permissions are adding, removing, and setting the permission that certain users have to read, write, and execute the file. These operations have the following format: USERS OPERATION PERMISSIONS The spaces between the three parts above are shown for readability only; symbolic modes cannot contain spaces. The USERS part tells which users' access to the file is changed. It consists of one or more of the following letters (or it can be empty; *note Umask and Protection::, for a description of what happens then). When more than one of these letters is given, the order that they are in does not matter. `u' the user who owns the file; `g' other users who are in the file's group; `o' all other users; `a' all users; the same as `ugo'. The OPERATION part tells how to change the affected users' access to the file, and is one of the following symbols: `+' to add the PERMISSIONS to whatever permissions the USERS already have for the file; `-' to remove the PERMISSIONS from whatever permissions the USERS already have for the file; `=' to make the PERMISSIONS the only permissions that the USERS have for the file. The PERMISSIONS part tells what kind of access to the file should be changed; it is zero or more of the following letters. As with the USERS part, the order does not matter when more than one letter is given. Omitting the PERMISSIONS part is useful only with the `=' operation, where it gives the specified USERS no access at all to the file. `r' the permission the USERS have to read the file; `w' the permission the USERS have to write to the file; `x' the permission the USERS have to execute the file. For example, to give everyone permission to read and write a file, but not to execute it, use: a=rw To remove write permission for from all users other than the file's owner, use: go-w The above command does not affect the access that the owner of the file has to it, nor does it affect whether other users can read or execute the file. To give everyone except a file's owner no permission to do anything with that file, use the mode below. Other users could still remove the file, if they have write permission on the directory it is in. go= Another way to specify the same thing is: og-rxw Copying Existing Permissions ---------------------------- You can base a file's permissions on its existing permissions. To do this, instead of using `r', `w', or `x' after the operator, you use the letter `u', `g', or `o'. For example, the mode o+g adds the permissions for users who are in a file's group to the permissions that other users have for the file. Thus, if the file started out as mode 664 (`rw-rw-r--'), the above mode would change it to mode 666 (`rw-rw-rw-'). If the file had started out as mode 741 (`rwxr----x'), the above mode would change it to mode 745 (`rwxr--r-x'). The `-' and `=' operations work analogously. Changing Special Permissions ---------------------------- In addition to changing a file's read, write, and execute permissions, you can change its special permissions. *Note Mode Structure::, for a summary of these permissions. To change a file's permission to set the user ID on execution, use `u' in the USERS part of the symbolic mode and `s' in the PERMISSIONS part. To change a file's permission to set the group ID on execution, use `g' in the USERS part of the symbolic mode and `s' in the PERMISSIONS part. To change a file's permission to stay permanently on the swap device, use `o' in the USERS part of the symbolic mode and `t' in the PERMISSIONS part. For example, to add set user ID permission to a program, you can use the mode: u+s To remove both set user ID and set group ID permission from it, you can use the mode: ug-s To cause a program to be saved on the swap device, you can use the mode: o+t Remember that the special permissions only affect files that are executable, plus, on some systems, directories (on which they have different meanings; *note Mode Structure::). Also, the combinations `u+t', `g+t', and `o+s' have no effect. The `=' operator is not very useful with special permissions; for example, the mode: o=t does cause the file to be saved on the swap device, but it also removes all read, write, and execute permissions that users not in the file's group might have had for it. Conditional Executability ------------------------- There is one more special type of symbolic permission: if you use `X' instead of `x', execute permission is affected only if the file already had execute permission or is a directory. It affects directories' execute permission even if they did not initially have any execute permissions set. For example, this mode: a+X gives all users permission to execute files (or search directories) if anyone could before. Making Multiple Changes ----------------------- The format of symbolic modes is actually more complex than described above (*note Setting Permissions::). It provides two ways to make multiple changes to files' permissions. The first way is to specify multiple OPERATION and PERMISSIONS parts after a USERS part in the symbolic mode. For example, the mode: og+rX-w gives users other than the owner of the file read permission and, if it is a directory or if someone already had execute permission to it, gives them execute permission; and it also denies them write permission to the file. It does not affect the permission that the owner of the file has for it. The above mode is equivalent to the two modes: og+rX og-w The second way to make multiple changes is to specify more than one simple symbolic mode, separated by commas. For example, the mode: a+r,go-w gives everyone permission to read the file and removes write permission on it for all users except its owner. Another example: u=rwx,g=rx,o= sets all of the non-special permissions for the file explicitly. (It gives users who are not in the file's group no permission at all for it.) The two methods can be combined. The mode: a+r,g+x-w gives all users permission to read the file, and gives users who are in the file's group permission to execute it, as well, but not permission to write to it. The above mode could be written in several different ways; another is: u+r,g+rx,o+r,g-w The Umask and Protection ------------------------ If the USERS part of a symbolic mode is omitted, it defaults to `a' (affect all users), except that any permissions that are _set_ in the system variable `umask' are _not affected_. The value of `umask' can be set using the `umask' command. Its default value varies from system to system. Omitting the USERS part of a symbolic mode is generally not useful with operations other than `+'. It is useful with `+' because it allows you to use `umask' as an easily customizable protection against giving away more permission to files than you intended to. As an example, if `umask' has the value 2, which removes write permission for users who are not in the file's group, then the mode: +w adds permission to write to the file to its owner and to other users who are in the file's group, but _not_ to other users. In contrast, the mode: a+w ignores `umask', and _does_ give write permission for the file to all users. Numeric Modes ============= File permissions are stored internally as integers. As an alternative to giving a symbolic mode, you can give an octal (base 8) number that corresponds to the internal representation of the new mode. This number is always interpreted in octal; you do not have to add a leading 0, as you do in C. Mode 0055 is the same as mode 55. A numeric mode is usually shorter than the corresponding symbolic mode, but it is limited in that it cannot take into account a file's previous permissions; it can only set them absolutely. On most systems, the permissions granted to the user, to other users in the file's group, and to other users not in the file's group are each stored as three bits, which are represented as one octal digit. The three special permissions are also each stored as one bit, and they are as a group represented as another octal digit. Here is how the bits are arranged, starting with the lowest valued bit: Value in Corresponding Mode Permission Other users not in the file's group: 1 Execute 2 Write 4 Read Other users in the file's group: 10 Execute 20 Write 40 Read The file's owner: 100 Execute 200 Write 400 Read Special permissions: 1000 Save text image on swap device 2000 Set group ID on execution 4000 Set user ID on execution For example, numeric mode 4755 corresponds to symbolic mode `u=rwxs,go=rx', and numeric mode 664 corresponds to symbolic mode `ug=rw,o=r'. Numeric mode 0 corresponds to symbolic mode `ugo='. Date input formats ****************** First, a quote: Our units of temporal measurement, from seconds on up to months, are so complicated, asymmetrical and disjunctive so as to make coherent mental reckoning in time all but impossible. Indeed, had some tyrannical god contrived to enslave our minds to time, to make it all but impossible for us to escape subjection to sodden routines and unpleasant surprises, he could hardly have done better than handing down our present system. It is like a set of trapezoidal building blocks, with no vertical or horizontal surfaces, like a language in which the simplest thought demands ornate constructions, useless particles and lengthy circumlocutions. Unlike the more successful patterns of language and science, which enable us to face experience boldly or at least level-headedly, our system of temporal calculation silently and persistently encourages our terror of time. ... It is as though architects had to measure length in feet, width in meters and height in ells; as though basic instruction manuals demanded a knowledge of five different languages. It is no wonder then that we often look into our own immediate past or future, last Tuesday or a week from Sunday, with feelings of helpless confusion. ... -- Robert Grudin, `Time and the Art of Living'. This section describes the textual date representations that GNU programs accept. These are the strings you, as a user, can supply as arguments to the various programs. The C interface (via the `getdate' function) is not described here. Although the date syntax here can represent any possible time since the year zero, computer integers often cannot represent such a wide range of time. On POSIX systems, the clock starts at 1970-01-01 00:00:00 UTC: POSIX does not require support for times before the POSIX Epoch and times far in the future. Traditional Unix systems have 32-bit signed `time_t' and can represent times from 1901-12-13 20:45:52 through 2038-01-19 03:14:07 UTC. Systems with 64-bit signed `time_t' can represent all the times in the known lifetime of the universe. General date syntax =================== A "date" is a string, possibly empty, containing many items separated by whitespace. The whitespace may be omitted when no ambiguity arises. The empty string means the beginning of today (i.e., midnight). Order of the items is immaterial. A date string may contain many flavors of items: * calendar date items * time of the day items * time zone items * day of the week items * relative items * pure numbers. We describe each of these item types in turn, below. A few numbers may be written out in words in most contexts. This is most useful for specifying day of the week items or relative items (see below). Here is the list: `first' for 1, `next' for 2, `third' for 3, `fourth' for 4, `fifth' for 5, `sixth' for 6, `seventh' for 7, `eighth' for 8, `ninth' for 9, `tenth' for 10, `eleventh' for 11 and `twelfth' for 12. Also, `last' means exactly -1. When a month is written this way, it is still considered to be written numerically, instead of being "spelled in full"; this changes the allowed strings. In the current implementation, only English is supported for words and abbreviations like `AM', `DST', `EST', `first', `January', `Sunday', `tomorrow', and `year'. The output of `date' is not always acceptable as a date string, not only because of the language problem, but also because there is no standard meaning for time zone items like `IST'. When using `date' to generate a date string intended to be parsed later, specify a date format that is independent of language and that does not use time zone items other than `UTC' and `Z'. Here are some ways to do this: $ LC_ALL=C TZ=UTC0 date Fri Dec 15 19:48:05 UTC 2000 $ TZ=UTC0 date +"%Y-%m-%d %H:%M:%SZ" 2000-12-15 19:48:05Z $ date --iso-8601=seconds # a GNU extension 2000-12-15T11:48:05-0800 $ date --rfc-822 # a GNU extension Fri, 15 Dec 2000 11:48:05 -0800 $ date +"%Y-%m-%d %H:%M:%S %z" # %z is a GNU extension. 2000-12-15 11:48:05 -0800 Alphabetic case is completely ignored in dates. Comments may be introduced between round parentheses, as long as included parentheses are properly nested. Hyphens not followed by a digit are currently ignored. Leading zeros on numbers are ignored. Calendar date items =================== A "calendar date item" specifies a day of the year. It is specified differently, depending on whether the month is specified numerically or literally. All these strings specify the same calendar date: 1972-09-24 # ISO 8601. 72-9-24 # Assume 19xx for 69 through 99, # 20xx for 00 through 68. 72-09-24 # Leading zeros are ignored. 9/24/72 # Common U.S. writing. 24 September 1972 24 Sept 72 # September has a special abbreviation. 24 Sep 72 # Three-letter abbreviations always allowed. Sep 24, 1972 24-sep-72 24sep72 The year can also be omitted. In this case, the last specified year is used, or the current year if none. For example: 9/24 sep 24 Here are the rules. For numeric months, the ISO 8601 format `YEAR-MONTH-DAY' is allowed, where YEAR is any positive number, MONTH is a number between 01 and 12, and DAY is a number between 01 and 31. A leading zero must be present if a number is less than ten. If YEAR is 68 or smaller, then 2000 is added to it; otherwise, if YEAR is less than 100, then 1900 is added to it. The construct `MONTH/DAY/YEAR', popular in the United States, is accepted. Also `MONTH/DAY', omitting the year. Literal months may be spelled out in full: `January', `February', `March', `April', `May', `June', `July', `August', `September', `October', `November' or `December'. Literal months may be abbreviated to their first three letters, possibly followed by an abbreviating dot. It is also permitted to write `Sept' instead of `September'. When months are written literally, the calendar date may be given as any of the following: DAY MONTH YEAR DAY MONTH MONTH DAY YEAR DAY-MONTH-YEAR Or, omitting the year: MONTH DAY Time of day items ================= A "time of day item" in date strings specifies the time on a given day. Here are some examples, all of which represent the same time: 20:02:0 20:02 8:02pm 20:02-0500 # In EST (U.S. Eastern Standard Time). More generally, the time of the day may be given as `HOUR:MINUTE:SECOND', where HOUR is a number between 0 and 23, MINUTE is a number between 0 and 59, and SECOND is a number between 0 and 59. Alternatively, `:SECOND' can be omitted, in which case it is taken to be zero. If the time is followed by `am' or `pm' (or `a.m.' or `p.m.'), HOUR is restricted to run from 1 to 12, and `:MINUTE' may be omitted (taken to be zero). `am' indicates the first half of the day, `pm' indicates the second half of the day. In this notation, 12 is the predecessor of 1: midnight is `12am' while noon is `12pm'. (This is the zero-oriented interpretation of `12am' and `12pm', as opposed to the old tradition derived from Latin which uses `12m' for noon and `12pm' for midnight.) The time may alternatively be followed by a time zone correction, expressed as `SHHMM', where S is `+' or `-', HH is a number of zone hours and MM is a number of zone minutes. When a time zone correction is given this way, it forces interpretation of the time relative to Coordinated Universal Time (UTC), overriding any previous specification for the time zone or the local time zone. The MINUTE part of the time of the day may not be elided when a time zone correction is used. This is the best way to specify a time zone correction by fractional parts of an hour. Either `am'/`pm' or a time zone correction may be specified, but not both. Time zone items =============== A "time zone item" specifies an international time zone, indicated by a small set of letters, e.g., `UTC' or `Z' for Coordinated Universal Time. Any included periods are ignored. By following a non-daylight-saving time zone by the string `DST' in a separate word (that is, separated by some white space), the corresponding daylight saving time zone may be specified. Time zone items other than `UTC' and `Z' are obsolescent and are not recommended, because they are ambiguous; for example, `EST' has a different meaning in Australia than in the United States. Instead, it's better to use unambiguous numeric time zone corrections like `-0500', as described in the previous section. Day of week items ================= The explicit mention of a day of the week will forward the date (only if necessary) to reach that day of the week in the future. Days of the week may be spelled out in full: `Sunday', `Monday', `Tuesday', `Wednesday', `Thursday', `Friday' or `Saturday'. Days may be abbreviated to their first three letters, optionally followed by a period. The special abbreviations `Tues' for `Tuesday', `Wednes' for `Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed. A number may precede a day of the week item to move forward supplementary weeks. It is best used in expression like `third monday'. In this context, `last DAY' or `next DAY' is also acceptable; they move one week before or after the day that DAY by itself would represent. A comma following a day of the week item is ignored. Relative items in date strings ============================== "Relative items" adjust a date (or the current date if none) forward or backward. The effects of relative items accumulate. Here are some examples: 1 year 1 year ago 3 years 2 days The unit of time displacement may be selected by the string `year' or `month' for moving by whole years or months. These are fuzzy units, as years and months are not all of equal duration. More precise units are `fortnight' which is worth 14 days, `week' worth 7 days, `day' worth 24 hours, `hour' worth 60 minutes, `minute' or `min' worth 60 seconds, and `second' or `sec' worth one second. An `s' suffix on these units is accepted and ignored. The unit of time may be preceded by a multiplier, given as an optionally signed number. Unsigned numbers are taken as positively signed. No number at all implies 1 for a multiplier. Following a relative item by the string `ago' is equivalent to preceding the unit by a multiplier with value -1. The string `tomorrow' is worth one day in the future (equivalent to `day'), the string `yesterday' is worth one day in the past (equivalent to `day ago'). The strings `now' or `today' are relative items corresponding to zero-valued time displacement, these strings come from the fact a zero-valued time displacement represents the current time when not otherwise changed by previous items. They may be used to stress other items, like in `12:00 today'. The string `this' also has the meaning of a zero-valued time displacement, but is preferred in date strings like `this thursday'. When a relative item causes the resulting date to cross a boundary where the clocks were adjusted, typically for daylight-saving time, the resulting date and time are adjusted accordingly. Pure numbers in date strings ============================ The precise interpretation of a pure decimal number depends on the context in the date string. If the decimal number is of the form YYYYMMDD and no other calendar date item (*note Calendar date items::) appears before it in the date string, then YYYY is read as the year, MM as the month number and DD as the day of the month, for the specified calendar date. If the decimal number is of the form HHMM and no other time of day item appears before it in the date string, then HH is read as the hour of the day and MM as the minute of the hour, for the specified time of the day. MM can also be omitted. If both a calendar date and a time of day appear to the left of a number in the date string, but no relative item, then the number overrides the year. Authors of `getdate' ==================== `getdate' was originally implemented by Steven M. Bellovin () while at the University of North Carolina at Chapel Hill. The code was later tweaked by a couple of people on Usenet, then completely overhauled by Rich $alz () and Jim Berets () in August, 1990. Various revisions for the GNU system were made by David MacKenzie, Jim Meyering, Paul Eggert and others. This chapter was originally produced by Franc,ois Pinard () from the `getdate.y' source code, and then edited by K. Berry (). Opening the Software Toolbox **************************** This chapter originally appeared in `Linux Journal', volume 1, number 2, in the `What's GNU?' column. It was written by Arnold Robbins. Toolbox Introduction ==================== This month's column is only peripherally related to the GNU Project, in that it describes a number of the GNU tools on your GNU/Linux system and how they might be used. What it's really about is the "Software Tools" philosophy of program development and usage. The software tools philosophy was an important and integral concept in the initial design and development of Unix (of which Linux and GNU are essentially clones). Unfortunately, in the modern day press of Internetworking and flashy GUIs, it seems to have fallen by the wayside. This is a shame, since it provides a powerful mental model for solving many kinds of problems. Many people carry a Swiss Army knife around in their pants pockets (or purse). A Swiss Army knife is a handy tool to have: it has several knife blades, a screwdriver, tweezers, toothpick, nail file, corkscrew, and perhaps a number of other things on it. For the everyday, small miscellaneous jobs where you need a simple, general purpose tool, it's just the thing. On the other hand, an experienced carpenter doesn't build a house using a Swiss Army knife. Instead, he has a toolbox chock full of specialized tools--a saw, a hammer, a screwdriver, a plane, and so on. And he knows exactly when and where to use each tool; you won't catch him hammering nails with the handle of his screwdriver. The Unix developers at Bell Labs were all professional programmers and trained computer scientists. They had found that while a one-size-fits-all program might appeal to a user because there's only one program to use, in practice such programs are a. difficult to write, b. difficult to maintain and debug, and c. difficult to extend to meet new situations. Instead, they felt that programs should be specialized tools. In short, each program "should do one thing well." No more and no less. Such programs are simpler to design, write, and get right--they only do one thing. Furthermore, they found that with the right machinery for hooking programs together, that the whole was greater than the sum of the parts. By combining several special purpose programs, you could accomplish a specific task that none of the programs was designed for, and accomplish it much more quickly and easily than if you had to write a special purpose program. We will see some (classic) examples of this further on in the column. (An important additional point was that, if necessary, take a detour and build any software tools you may need first, if you don't already have something appropriate in the toolbox.) I/O Redirection =============== Hopefully, you are familiar with the basics of I/O redirection in the shell, in particular the concepts of "standard input," "standard output," and "standard error". Briefly, "standard input" is a data source, where data comes from. A program should not need to either know or care if the data source is a disk file, a keyboard, a magnetic tape, or even a punched card reader. Similarly, "standard output" is a data sink, where data goes to. The program should neither know nor care where this might be. Programs that only read their standard input, do something to the data, and then send it on, are called "filters", by analogy to filters in a water pipeline. With the Unix shell, it's very easy to set up data pipelines: program_to_create_data | filter1 | .... | filterN > final.pretty.data We start out by creating the raw data; each filter applies some successive transformation to the data, until by the time it comes out of the pipeline, it is in the desired form. This is fine and good for standard input and standard output. Where does the standard error come in to play? Well, think about `filter1' in the pipeline above. What happens if it encounters an error in the data it sees? If it writes an error message to standard output, it will just disappear down the pipeline into `filter2''s input, and the user will probably never see it. So programs need a place where they can send error messages so that the user will notice them. This is standard error, and it is usually connected to your console or window, even if you have redirected standard output of your program away from your screen. For filter programs to work together, the format of the data has to be agreed upon. The most straightforward and easiest format to use is simply lines of text. Unix data files are generally just streams of bytes, with lines delimited by the ASCII LF (Line Feed) character, conventionally called a "newline" in the Unix literature. (This is `'\n'' if you're a C programmer.) This is the format used by all the traditional filtering programs. (Many earlier operating systems had elaborate facilities and special purpose programs for managing binary data. Unix has always shied away from such things, under the philosophy that it's easiest to simply be able to view and edit your data with a text editor.) OK, enough introduction. Let's take a look at some of the tools, and then we'll see how to hook them together in interesting ways. In the following discussion, we will only present those command line options that interest us. As you should always do, double check your system documentation for the full story. The `who' Command ================= The first program is the `who' command. By itself, it generates a list of the users who are currently logged in. Although I'm writing this on a single-user system, we'll pretend that several people are logged in: $ who -| arnold console Jan 22 19:57 -| miriam ttyp0 Jan 23 14:19(:0.0) -| bill ttyp1 Jan 21 09:32(:0.0) -| arnold ttyp2 Jan 23 20:48(:0.0) Here, the `$' is the usual shell prompt, at which I typed `who'. There are three people logged in, and I am logged in twice. On traditional Unix systems, user names are never more than eight characters long. This little bit of trivia will be useful later. The output of `who' is nice, but the data is not all that exciting. The `cut' Command ================= The next program we'll look at is the `cut' command. This program cuts out columns or fields of input data. For example, we can tell it to print just the login name and full name from the `/etc/passwd' file. The `/etc/passwd' file has seven fields, separated by colons: arnold:xyzzy:2076:10:Arnold D. Robbins:/home/arnold:/bin/bash To get the first and fifth fields, we would use `cut' like this: $ cut -d: -f1,5 /etc/passwd -| root:Operator ... -| arnold:Arnold D. Robbins -| miriam:Miriam A. Robbins ... With the `-c' option, `cut' will cut out specific characters (i.e., columns) in the input lines. This command looks like it might be useful for data filtering. The `sort' Command ================== Next we'll look at the `sort' command. This is one of the most powerful commands on a Unix-style system; one that you will often find yourself using when setting up fancy data plumbing. The `sort' command reads and sorts each file named on the command line. It then merges the sorted data and writes it to standard output. It will read standard input if no files are given on the command line (thus making it into a filter). The sort is based on the character collating sequence or based on user-supplied ordering criteria. The `uniq' Command ================== Finally (at least for now), we'll look at the `uniq' program. When sorting data, you will often end up with duplicate lines, lines that are identical. Usually, all you need is one instance of each line. This is where `uniq' comes in. The `uniq' program reads its standard input, which it expects to be sorted. It only prints out one copy of each duplicated line. It does have several options. Later on, we'll use the `-c' option, which prints each unique line, preceded by a count of the number of times that line occurred in the input. Putting the Tools Together ========================== Now, let's suppose this is a large ISP server system with dozens of users logged in. The management wants the system administrator to write a program that will generate a sorted list of logged in users. Furthermore, even if a user is logged in multiple times, his or her name should only show up in the output once. The administrator could sit down with the system documentation and write a C program that did this. It would take perhaps a couple of hundred lines of code and about two hours to write it, test it, and debug it. However, knowing the software toolbox, the administrator can instead start out by generating just a list of logged on users: $ who | cut -c1-8 -| arnold -| miriam -| bill -| arnold Next, sort the list: $ who | cut -c1-8 | sort -| arnold -| arnold -| bill -| miriam Finally, run the sorted list through `uniq', to weed out duplicates: $ who | cut -c1-8 | sort | uniq -| arnold -| bill -| miriam The `sort' command actually has a `-u' option that does what `uniq' does. However, `uniq' has other uses for which one cannot substitute `sort -u'. The administrator puts this pipeline into a shell script, and makes it available for all the users on the system (`#' is the system administrator, or `root', prompt): # cat > /usr/local/bin/listusers who | cut -c1-8 | sort | uniq ^D # chmod +x /usr/local/bin/listusers There are four major points to note here. First, with just four programs, on one command line, the administrator was able to save about two hours worth of work. Furthermore, the shell pipeline is just about as efficient as the C program would be, and it is much more efficient in terms of programmer time. People time is much more expensive than computer time, and in our modern "there's never enough time to do everything" society, saving two hours of programmer time is no mean feat. Second, it is also important to emphasize that with the _combination_ of the tools, it is possible to do a special purpose job never imagined by the authors of the individual programs. Third, it is also valuable to build up your pipeline in stages, as we did here. This allows you to view the data at each stage in the pipeline, which helps you acquire the confidence that you are indeed using these tools correctly. Finally, by bundling the pipeline in a shell script, other users can use your command, without having to remember the fancy plumbing you set up for them. In terms of how you run them, shell scripts and compiled programs are indistinguishable. After the previous warm-up exercise, we'll look at two additional, more complicated pipelines. For them, we need to introduce two more tools. The first is the `tr' command, which stands for "transliterate." The `tr' command works on a character-by-character basis, changing characters. Normally it is used for things like mapping upper case to lower case: $ echo ThIs ExAmPlE HaS MIXED case! | tr '[A-Z]' '[a-z]' -| this example has mixed case! There are several options of interest: `-c' work on the complement of the listed characters, i.e., operations apply to characters not in the given set `-d' delete characters in the first set from the output `-s' squeeze repeated characters in the output into just one character. We will be using all three options in a moment. The other command we'll look at is `comm'. The `comm' command takes two sorted input files as input data, and prints out the files' lines in three columns. The output columns are the data lines unique to the first file, the data lines unique to the second file, and the data lines that are common to both. The `-1', `-2', and `-3' command line options _omit_ the respective columns. (This is non-intuitive and takes a little getting used to.) For example: $ cat f1 -| 11111 -| 22222 -| 33333 -| 44444 $ cat f2 -| 00000 -| 22222 -| 33333 -| 55555 $ comm f1 f2 -| 00000 -| 11111 -| 22222 -| 33333 -| 44444 -| 55555 The single dash as a filename tells `comm' to read standard input instead of a regular file. Now we're ready to build a fancy pipeline. The first application is a word frequency counter. This helps an author determine if he or she is over-using certain words. The first step is to change the case of all the letters in our input file to one case. "The" and "the" are the same word when doing counting. $ tr '[A-Z]' '[a-z]' < whats.gnu | ... The next step is to get rid of punctuation. Quoted words and unquoted words should be treated identically; it's easiest to just get the punctuation out of the way. $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' | ... The second `tr' command operates on the complement of the listed characters, which are all the letters, the digits, the underscore, and the blank. The `\012' represents the newline character; it has to be left alone. (The ASCII tab character should also be included for good measure in a production script.) At this point, we have data consisting of words separated by blank space. The words only contain alphanumeric characters (and the underscore). The next step is break the data apart so that we have one word per line. This makes the counting operation much easier, as we will see shortly. $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' | > tr -s '[ ]' '\012' | ... This command turns blanks into newlines. The `-s' option squeezes multiple newline characters in the output into just one. This helps us avoid blank lines. (The `>' is the shell's "secondary prompt." This is what the shell prints when it notices you haven't finished typing in all of a command.) We now have data consisting of one word per line, no punctuation, all one case. We're ready to count each word: $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' | > tr -s '[ ]' '\012' | sort | uniq -c | ... At this point, the data might look something like this: 60 a 2 able 6 about 1 above 2 accomplish 1 acquire 1 actually 2 additional The output is sorted by word, not by count! What we want is the most frequently used words first. Fortunately, this is easy to accomplish, with the help of two more `sort' options: `-n' do a numeric sort, not a textual one `-r' reverse the order of the sort The final pipeline looks like this: $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' | > tr -s '[ ]' '\012' | sort | uniq -c | sort -nr -| 156 the -| 60 a -| 58 to -| 51 of -| 51 and ... Whew! That's a lot to digest. Yet, the same principles apply. With six commands, on two lines (really one long one split for convenience), we've created a program that does something interesting and useful, in much less time than we could have written a C program to do the same thing. A minor modification to the above pipeline can give us a simple spelling checker! To determine if you've spelled a word correctly, all you have to do is look it up in a dictionary. If it is not there, then chances are that your spelling is incorrect. So, we need a dictionary. The conventional location for a dictionary is `/usr/dict/words'. On my GNU/Linux system,(1) this is a is a sorted, 45,402 word dictionary. Now, how to compare our file with the dictionary? As before, we generate a sorted list of words, one per line: $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' | > tr -s '[ ]' '\012' | sort -u | ... Now, all we need is a list of words that are _not_ in the dictionary. Here is where the `comm' command comes in. $ tr '[A-Z]' '[a-z]' < whats.gnu | tr -cd '[A-Za-z0-9_ \012]' | > tr -s '[ ]' '\012' | sort -u | > comm -23 - /usr/dict/words The `-2' and `-3' options eliminate lines that are only in the dictionary (the second file), and lines that are in both files. Lines only in the first file (standard input, our stream of words), are words that are not in the dictionary. These are likely candidates for spelling errors. This pipeline was the first cut at a production spelling checker on Unix. There are some other tools that deserve brief mention. `grep' search files for text that matches a regular expression `wc' count lines, words, characters `tee' a T-fitting for data pipes, copies data to files and to standard output `sed' the stream editor, an advanced tool `awk' a data manipulation language, another advanced tool The software tools philosophy also espoused the following bit of advice: "Let someone else do the hard part." This means, take something that gives you most of what you need, and then massage it the rest of the way until it's in the form that you want. To summarize: 1. Each program should do one thing well. No more, no less. 2. Combining programs with appropriate plumbing leads to results where the whole is greater than the sum of the parts. It also leads to novel uses of programs that the authors might never have imagined. 3. Programs should never print extraneous header or trailer data, since these could get sent on down a pipeline. (A point we didn't mention earlier.) 4. Let someone else do the hard part. 5. Know your toolbox! Use each program appropriately. If you don't have an appropriate tool, build one. As of this writing, all the programs we've discussed are available via anonymous `ftp' from: `ftp://gnudist.gnu.org/textutils/textutils-1.22.tar.gz'. (There may be more recent versions available now.) None of what I have presented in this column is new. The Software Tools philosophy was first introduced in the book `Software Tools', by Brian Kernighan and P.J. Plauger (Addison-Wesley, ISBN 0-201-03669-X). This book showed how to write and use software tools. It was written in 1976, using a preprocessor for FORTRAN named `ratfor' (RATional FORtran). At the time, C was not as ubiquitous as it is now; FORTRAN was. The last chapter presented a `ratfor' to FORTRAN processor, written in `ratfor'. `ratfor' looks an awful lot like C; if you know C, you won't have any problem following the code. In 1981, the book was updated and made available as `Software Tools in Pascal' (Addison-Wesley, ISBN 0-201-10342-7). The first book is still in print; the second, alas, is not. Both books are well worth reading if you're a programmer. They certainly made a major change in how I view programming. Initially, the programs in both books were available (on 9-track tape) from Addison-Wesley. Unfortunately, this is no longer the case, although the `ratfor' versions are available from Brian Kernighan's home page (http://cm.bell-labs.come/who/bwk), and you might be able to find copies of the Pascal versions floating around the Internet. For a number of years, there was an active Software Tools Users Group, whose members had ported the original `ratfor' programs to essentially every computer system with a FORTRAN compiler. The popularity of the group waned in the middle 1980s as Unix began to spread beyond universities. With the current proliferation of GNU code and other clones of Unix programs, these programs now receive little attention; modern C versions are much more efficient and do more than these programs do. Nevertheless, as exposition of good programming style, and evangelism for a still-valuable philosophy, these books are unparalleled, and I recommend them highly. Acknowledgment: I would like to express my gratitude to Brian Kernighan of Bell Labs, the original Software Toolsmith, for reviewing this column. ---------- Footnotes ---------- (1) Redhat Linux 6.1, for the November 2000 revision of this article. GNU Free Documentation License ****************************** Version 1.1, March 2000 Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties-for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. Index ***** !: See ``Connectives for `test'''. !=: See ``String tests''. %: See ``Numeric expressions''. &: See ``Relations for `expr'''. *: See ``Numeric expressions''. + <1>: See ``Numeric expressions''. +: See ``String expressions''. +PAGE_RANGE: See ```pr': Paginate or columnate files for printing''. - <1>: See ```su': Run a command with substitute user and group id''. - <2>: See ```env': Run a command in a modified environment''. - <3>: See ``Numeric expressions''. -: See ```shred': Remove files more securely''. - and Unix rm: See ```rm': Remove files or directories''. -, removing files beginning with: See ```rm': Remove files or directories''. --: See ``Common options''. --across: See ```pr': Paginate or columnate files for printing''. --address-radix: See ```od': Write files in octal or other formats''. --adjustment: See ```nice': Run a command with modified scheduling priority''. --all <1>: See ```uname': Print system information''. --all <2>: See ```stty': Print or change terminal characteristics''. --all <3>: See ```du': Estimate file space usage''. --all <4>: See ```df': Report filesystem disk space usage''. --all <5>: See ``Which files are listed''. --all: See ```unexpand': Convert spaces to tabs''. --all-repeated: See ```uniq': Uniquify files''. --almost-all: See ``Which files are listed''. --append: See ```tee': Redirect output to multiple files''. --archive: See ```cp': Copy files and directories''. --author: See ``What information is listed''. --backup <1>: See ```ln': Make links between files''. --backup <2>: See ```mv': Move (rename) files''. --backup <3>: See ```install': Copy files and set attributes''. --backup <4>: See ```cp': Copy files and directories''. --backup: See ``Backup options''. --before: See ```tac': Concatenate and write files in reverse''. --binary <1>: See ```md5sum': Print or check message-digests''. --binary: See ```cat': Concatenate and write files''. --block-size <1>: See ```du': Estimate file space usage''. --block-size <2>: See ```df': Report filesystem disk space usage''. --block-size: See ``Block size''. --block-size=SIZE: See ``Block size''. --body-numbering: See ```nl': Number lines and write files''. --bourne-shell: See ```dircolors': Color setup for `ls'''. --buffer-size: See ```sort': Sort text files''. --bytes <1>: See ```du': Estimate file space usage''. --bytes <2>: See ```cut': Print selected parts of lines''. --bytes <3>: See ```wc': Print byte, word, and line counts''. --bytes <4>: See ```split': Split a file into fixed-size pieces''. --bytes <5>: See ```tail': Output the last part of files''. --bytes <6>: See ```head': Output the first part of files''. --bytes: See ```fold': Wrap input lines to fit in specified width''. --c-shell: See ```dircolors': Color setup for `ls'''. --changes <1>: See ```chmod': Change access permissions''. --changes <2>: See ```chgrp': Change group ownership''. --changes: See ```chown': Change file owner and group''. --characters: See ```cut': Print selected parts of lines''. --chars: See ```wc': Print byte, word, and line counts''. --check: See ```sort': Sort text files''. --check-chars: See ```uniq': Uniquify files''. --classify: See ``General output formatting''. --color: See ``General output formatting''. --columns: See ```pr': Paginate or columnate files for printing''. --command: See ```su': Run a command with substitute user and group id''. --count <1>: See ```who': Print who is currently logged in''. --count: See ```uniq': Uniquify files''. --count-links: See ```du': Estimate file space usage''. --crown-margin: See ```fmt': Reformat paragraph text''. --csh: See ```dircolors': Color setup for `ls'''. --date <1>: See ``Options for `date'''. --date: See ```touch': Change file timestamps''. --delimiter: See ```cut': Print selected parts of lines''. --delimiters: See ```paste': Merge lines of files''. --dereference <1>: See ```stat': Report file or filesystem status''. --dereference <2>: See ```du': Estimate file space usage''. --dereference <3>: See ```chgrp': Change group ownership''. --dereference <4>: See ```chown': Change file owner and group''. --dereference <5>: See ```cp': Copy files and directories''. --dereference: See ``Which files are listed''. --dereference-args: See ```du': Estimate file space usage''. --dereference-command-line: See ``Which files are listed''. --dictionary-order: See ```sort': Sort text files''. --digits: See ```csplit': Split a file into context-determined pieces''. --directory <1>: See ```ln': Make links between files''. --directory <2>: See ```rm': Remove files or directories''. --directory <3>: See ```install': Copy files and set attributes''. --directory: See ``Which files are listed''. --dired: See ``What information is listed''. --double-space: See ```pr': Paginate or columnate files for printing''. --elide-empty-files: See ```csplit': Split a file into context-determined pieces''. --escape: See ``Formatting the file names''. --exact: See ```shred': Remove files more securely''. --exclude-from=FILE: See ```du': Estimate file space usage''. --exclude-type: See ```df': Report filesystem disk space usage''. --exclude=PATTERN: See ```du': Estimate file space usage''. --expand-tabs: See ```pr': Paginate or columnate files for printing''. --fast: See ```su': Run a command with substitute user and group id''. --field-separator: See ```sort': Sort text files''. --fields: See ```cut': Print selected parts of lines''. --file <1>: See ``Options for `date'''. --file: See ```stty': Print or change terminal characteristics''. --file-type: See ``General output formatting''. --filesystem: See ```stat': Report file or filesystem status''. --first-line-number: See ```pr': Paginate or columnate files for printing''. --follow: See ```tail': Output the last part of files''. --footer-numbering: See ```nl': Number lines and write files''. --force <1>: See ```ln': Make links between files''. --force <2>: See ```shred': Remove files more securely''. --force <3>: See ```rm': Remove files or directories''. --force <4>: See ```mv': Move (rename) files''. --force: See ```cp': Copy files and directories''. --form-feed: See ```pr': Paginate or columnate files for printing''. --format <1>: See ```stat': Report file or filesystem status''. --format <2>: See ``General output formatting''. --format <3>: See ``What information is listed''. --format: See ```od': Write files in octal or other formats''. --format=FORMAT: See ```seq': Print numeric sequences''. --from: See ```chown': Change file owner and group''. --full-time: See ``What information is listed''. --general-numeric-sort: See ```sort': Sort text files''. --group <1>: See ```id': Print real and effective uid and gid''. --group: See ```install': Copy files and set attributes''. --groups: See ```id': Print real and effective uid and gid''. --hardware-platform: See ```uname': Print system information''. --header: See ```pr': Paginate or columnate files for printing''. --header-numbering: See ```nl': Number lines and write files''. --heading: See ```who': Print who is currently logged in''. --help: See ``Common options''. --hide-control-chars: See ``Formatting the file names''. --human-readable <1>: See ```du': Estimate file space usage''. --human-readable <2>: See ```df': Report filesystem disk space usage''. --human-readable <3>: See ``What information is listed''. --human-readable: See ``Block size''. --idle: See ```who': Print who is currently logged in''. --ignore-backups: See ``Which files are listed''. --ignore-case <1>: See ```join': Join lines on a common field''. --ignore-case <2>: See ```uniq': Uniquify files''. --ignore-case: See ```sort': Sort text files''. --ignore-environment: See ```env': Run a command in a modified environment''. --ignore-fail-on-non-empty: See ```rmdir': Remove empty directories''. --ignore-interrupts: See ```tee': Redirect output to multiple files''. --ignore-leading-blanks: See ```sort': Sort text files''. --ignore-nonprinting: See ```sort': Sort text files''. --ignore=PATTERN: See ``Which files are listed''. --indent: See ```pr': Paginate or columnate files for printing''. --indicator-style: See ``General output formatting''. --initial: See ```expand': Convert tabs to spaces''. --inode: See ``What information is listed''. --inodes: See ```df': Report filesystem disk space usage''. --interactive <1>: See ```ln': Make links between files''. --interactive <2>: See ```rm': Remove files or directories''. --interactive <3>: See ```mv': Move (rename) files''. --interactive: See ```cp': Copy files and directories''. --iso-8601[=TIMESPEC]: See ``Options for `date'''. --iterations=NUMBER: See ```shred': Remove files more securely''. --join-blank-lines: See ```nl': Number lines and write files''. --join-lines: See ```pr': Paginate or columnate files for printing''. --keep-files: See ```csplit': Split a file into context-determined pieces''. --kernel-name: See ```uname': Print system information''. --kernel-release: See ```uname': Print system information''. --kernel-version: See ```uname': Print system information''. --key: See ```sort': Sort text files''. --length: See ```pr': Paginate or columnate files for printing''. --line-bytes: See ```split': Split a file into fixed-size pieces''. --lines <1>: See ```wc': Print byte, word, and line counts''. --lines <2>: See ```split': Split a file into fixed-size pieces''. --lines <3>: See ```tail': Output the last part of files''. --lines: See ```head': Output the first part of files''. --link: See ```cp': Copy files and directories''. --literal: See ``Formatting the file names''. --local: See ```df': Report filesystem disk space usage''. --login: See ```su': Run a command with substitute user and group id''. --lookup: See ```who': Print who is currently logged in''. --machine: See ```uname': Print system information''. --max-depth=DEPTH: See ```du': Estimate file space usage''. --max-line-length: See ```wc': Print byte, word, and line counts''. --max-unchanged-stats: See ```tail': Output the last part of files''. --merge <1>: See ```sort': Sort text files''. --merge: See ```pr': Paginate or columnate files for printing''. --mesg: See ```who': Print who is currently logged in''. --message: See ```who': Print who is currently logged in''. --mode <1>: See ```mknod': Make block or character special files''. --mode <2>: See ```mkfifo': Make FIFOs (named pipes)''. --mode <3>: See ```mkdir': Make directories''. --mode: See ```install': Copy files and set attributes''. --month-sort: See ```sort': Sort text files''. --name: See ```id': Print real and effective uid and gid''. --no-create: See ```touch': Change file timestamps''. --no-dereference <1>: See ```chgrp': Change group ownership''. --no-dereference <2>: See ```chown': Change file owner and group''. --no-dereference <3>: See ```ln': Make links between files''. --no-dereference: See ```cp': Copy files and directories''. --no-file-warnings: See ```pr': Paginate or columnate files for printing''. --no-group: See ``What information is listed''. --no-renumber: See ```nl': Number lines and write files''. --no-sync: See ```df': Report filesystem disk space usage''. --nodename: See ```uname': Print system information''. --number: See ```cat': Concatenate and write files''. --number-format: See ```nl': Number lines and write files''. --number-lines: See ```pr': Paginate or columnate files for printing''. --number-nonblank: See ```cat': Concatenate and write files''. --number-separator: See ```nl': Number lines and write files''. --number-width: See ```nl': Number lines and write files''. --numeric-sort: See ```sort': Sort text files''. --numeric-uid-gid: See ``What information is listed''. --omit-header: See ```pr': Paginate or columnate files for printing''. --omit-pagination: See ```pr': Paginate or columnate files for printing''. --one-file-system <1>: See ```du': Estimate file space usage''. --one-file-system: See ```cp': Copy files and directories''. --only-delimited: See ```cut': Print selected parts of lines''. --operating-system: See ```uname': Print system information''. --output: See ```sort': Sort text files''. --output-delimiter: See ```cut': Print selected parts of lines''. --output-duplicates: See ```od': Write files in octal or other formats''. --output-tabs: See ```pr': Paginate or columnate files for printing''. --owner: See ```install': Copy files and set attributes''. --page-increment: See ```nl': Number lines and write files''. --page_width: See ```pr': Paginate or columnate files for printing''. --pages=PAGE_RANGE: See ```pr': Paginate or columnate files for printing''. --parents <1>: See ```rmdir': Remove empty directories''. --parents <2>: See ```mkdir': Make directories''. --parents: See ```cp': Copy files and directories''. --pid: See ```tail': Output the last part of files''. --portability <1>: See ```pathchk': Check file name portability''. --portability: See ```df': Report filesystem disk space usage''. --prefix: See ```csplit': Split a file into context-determined pieces''. --preserve: See ```cp': Copy files and directories''. --preserve-environment: See ```su': Run a command with substitute user and group id''. --preserve-timestamps: See ```install': Copy files and set attributes''. --print-database: See ```dircolors': Color setup for `ls'''. --print-type: See ```df': Report filesystem disk space usage''. --processor: See ```uname': Print system information''. --quiet <1>: See ```tty': Print file name of terminal on standard input''. --quiet <2>: See ```chmod': Change access permissions''. --quiet <3>: See ```chgrp': Change group ownership''. --quiet <4>: See ```chown': Change file owner and group''. --quiet <5>: See ```csplit': Split a file into context-determined pieces''. --quiet <6>: See ```tail': Output the last part of files''. --quiet: See ```head': Output the first part of files''. --quote-name: See ``Formatting the file names''. --quoting-style: See ``Formatting the file names''. --read-bytes: See ```od': Write files in octal or other formats''. --real: See ```id': Print real and effective uid and gid''. --recursive <1>: See ```chmod': Change access permissions''. --recursive <2>: See ```chgrp': Change group ownership''. --recursive <3>: See ```chown': Change file owner and group''. --recursive <4>: See ```rm': Remove files or directories''. --recursive <5>: See ```cp': Copy files and directories''. --recursive: See ``Which files are listed''. --reference <1>: See ``Options for `date'''. --reference <2>: See ```touch': Change file timestamps''. --reference <3>: See ```chmod': Change access permissions''. --reference <4>: See ```chgrp': Change group ownership''. --reference: See ```chown': Change file owner and group''. --regex: See ```tac': Concatenate and write files in reverse''. --remove: See ```shred': Remove files more securely''. --remove-destination: See ```cp': Copy files and directories''. --repeated: See ```uniq': Uniquify files''. --reply <1>: See ```mv': Move (rename) files''. --reply: See ```cp': Copy files and directories''. --retry: See ```tail': Output the last part of files''. --reverse <1>: See ``Sorting the output''. --reverse: See ```sort': Sort text files''. --rfc-822: See ``Options for `date'''. --save: See ```stty': Print or change terminal characteristics''. --section-delimiter: See ```nl': Number lines and write files''. --sep-string: See ```pr': Paginate or columnate files for printing''. --separate-dirs: See ```du': Estimate file space usage''. --separator <1>: See ```pr': Paginate or columnate files for printing''. --separator: See ```tac': Concatenate and write files in reverse''. --serial: See ```paste': Merge lines of files''. --set: See ``Options for `date'''. --sh: See ```dircolors': Color setup for `ls'''. --shell: See ```su': Run a command with substitute user and group id''. --show-all: See ```cat': Concatenate and write files''. --show-control-chars <1>: See ``Formatting the file names''. --show-control-chars: See ```pr': Paginate or columnate files for printing''. --show-ends: See ```cat': Concatenate and write files''. --show-nonprinting <1>: See ```pr': Paginate or columnate files for printing''. --show-nonprinting: See ```cat': Concatenate and write files''. --show-tabs: See ```cat': Concatenate and write files''. --si <1>: See ```du': Estimate file space usage''. --si <2>: See ```df': Report filesystem disk space usage''. --si <3>: See ``What information is listed''. --si: See ``Block size''. --silent <1>: See ```tty': Print file name of terminal on standard input''. --silent <2>: See ```chmod': Change access permissions''. --silent <3>: See ```chgrp': Change group ownership''. --silent <4>: See ```chown': Change file owner and group''. --silent <5>: See ```csplit': Split a file into context-determined pieces''. --silent <6>: See ```tail': Output the last part of files''. --silent: See ```head': Output the first part of files''. --size: See ``What information is listed''. --size=BYTES: See ```shred': Remove files more securely''. --skip-bytes: See ```od': Write files in octal or other formats''. --skip-chars: See ```uniq': Uniquify files''. --skip-fields: See ```uniq': Uniquify files''. --sleep-interval: See ```tail': Output the last part of files''. --sort: See ``Sorting the output''. --spaces: See ```fold': Wrap input lines to fit in specified width''. --sparse=WHEN: See ```cp': Copy files and directories''. --split-only: See ```fmt': Reformat paragraph text''. --squeeze-blank: See ```cat': Concatenate and write files''. --starting-line-number: See ```nl': Number lines and write files''. --status: See ```md5sum': Print or check message-digests''. --strings: See ```od': Write files in octal or other formats''. --strip: See ```install': Copy files and set attributes''. --strip-trailing-slashes <1>: See ```mv': Move (rename) files''. --strip-trailing-slashes: See ```cp': Copy files and directories''. --suffix <1>: See ```ln': Make links between files''. --suffix <2>: See ```mv': Move (rename) files''. --suffix <3>: See ```install': Copy files and set attributes''. --suffix <4>: See ```cp': Copy files and directories''. --suffix <5>: See ```csplit': Split a file into context-determined pieces''. --suffix: See ``Backup options''. --suffix-length: See ```split': Split a file into fixed-size pieces''. --summarize: See ```du': Estimate file space usage''. --symbolic: See ```ln': Make links between files''. --symbolic-link: See ```cp': Copy files and directories''. --sync: See ```df': Report filesystem disk space usage''. --sysv: See ```sum': Print checksum and block counts''. --tabs <1>: See ```unexpand': Convert spaces to tabs''. --tabs: See ```expand': Convert tabs to spaces''. --tabsize: See ``General output formatting''. --tagged-paragraph: See ```fmt': Reformat paragraph text''. --target-directory <1>: See ```ln': Make links between files''. --target-directory <2>: See ```mv': Move (rename) files''. --target-directory <3>: See ```install': Copy files and set attributes''. --target-directory <4>: See ```cp': Copy files and directories''. --target-directory: See ``Target directory''. --temporary-directory: See ```sort': Sort text files''. --terse: See ```stat': Report file or filesystem status''. --text: See ```md5sum': Print or check message-digests''. --time <1>: See ```touch': Change file timestamps''. --time: See ``Sorting the output''. --time-style: See ``Formatting file timestamps''. --total: See ```du': Estimate file space usage''. --traditional: See ```od': Write files in octal or other formats''. --type: See ```df': Report filesystem disk space usage''. --uniform-spacing: See ```fmt': Reformat paragraph text''. --unique <1>: See ```uniq': Uniquify files''. --unique: See ```sort': Sort text files''. --universal: See ``Options for `date'''. --update: See ```mv': Move (rename) files''. --user: See ```id': Print real and effective uid and gid''. --utc: See ``Options for `date'''. --verbose <1>: See ```chmod': Change access permissions''. --verbose <2>: See ```chgrp': Change group ownership''. --verbose <3>: See ```chown': Change file owner and group''. --verbose <4>: See ```rmdir': Remove empty directories''. --verbose <5>: See ```mkdir': Make directories''. --verbose <6>: See ```ln': Make links between files''. --verbose <7>: See ```shred': Remove files more securely''. --verbose <8>: See ```rm': Remove files or directories''. --verbose <9>: See ```mv': Move (rename) files''. --verbose <10>: See ```install': Copy files and set attributes''. --verbose <11>: See ```cp': Copy files and directories''. --verbose <12>: See ```split': Split a file into fixed-size pieces''. --verbose <13>: See ```tail': Output the last part of files''. --verbose: See ```head': Output the first part of files''. --version: See ``Common options''. --version-control <1>: See ```ln': Make links between files''. --version-control <2>: See ```mv': Move (rename) files''. --version-control <3>: See ```install': Copy files and set attributes''. --version-control <4>: See ```cp': Copy files and directories''. --version-control: See ``Backup options''. --warn: See ```md5sum': Print or check message-digests''. --width <1>: See ``General output formatting''. --width <2>: See ```fold': Wrap input lines to fit in specified width''. --width <3>: See ```pr': Paginate or columnate files for printing''. --width <4>: See ```fmt': Reformat paragraph text''. --width: See ```od': Write files in octal or other formats''. --words: See ```wc': Print byte, word, and line counts''. --writable: See ```who': Print who is currently logged in''. --zero: See ```shred': Remove files more securely''. --zero-terminated: See ```sort': Sort text files''. -1 <1>: See ``General output formatting''. -1 <2>: See ```join': Join lines on a common field''. -1: See ```comm': Compare two sorted files line by line''. -2 <1>: See ```join': Join lines on a common field''. -2: See ```comm': Compare two sorted files line by line''. -3: See ```comm': Compare two sorted files line by line''. -a <1>: See ```uname': Print system information''. -a <2>: See ```stty': Print or change terminal characteristics''. -a <3>: See ```tee': Redirect output to multiple files''. -a <4>: See ``Connectives for `test'''. -a <5>: See ```du': Estimate file space usage''. -a <6>: See ```df': Report filesystem disk space usage''. -a <7>: See ```touch': Change file timestamps''. -a: See ```cp': Copy files and directories''. -A: See ``Which files are listed''. -a <1>: See ``Which files are listed''. -a <2>: See ```unexpand': Convert spaces to tabs''. -a <3>: See ```join': Join lines on a common field''. -a <4>: See ```split': Split a file into fixed-size pieces''. -a <5>: See ```pr': Paginate or columnate files for printing''. -a: See ```od': Write files in octal or other formats''. -A <1>: See ```od': Write files in octal or other formats''. -A: See ```cat': Concatenate and write files''. -b: See ``File type tests''. -B: See ```du': Estimate file space usage''. -b: See ```du': Estimate file space usage''. -B: See ```df': Report filesystem disk space usage''. -b <1>: See ```ln': Make links between files''. -b <2>: See ```mv': Move (rename) files''. -b <3>: See ```install': Copy files and set attributes''. -b <4>: See ```cp': Copy files and directories''. -b <5>: See ```dircolors': Color setup for `ls'''. -b: See ``Formatting the file names''. -B: See ``Which files are listed''. -b <1>: See ```cut': Print selected parts of lines''. -b <2>: See ```sort': Sort text files''. -b <3>: See ```md5sum': Print or check message-digests''. -b <4>: See ```csplit': Split a file into context-determined pieces''. -b <5>: See ```split': Split a file into fixed-size pieces''. -b <6>: See ```fold': Wrap input lines to fit in specified width''. -b <7>: See ```od': Write files in octal or other formats''. -b <8>: See ```nl': Number lines and write files''. -b <9>: See ```tac': Concatenate and write files in reverse''. -b: See ```cat': Concatenate and write files''. -B: See ```cat': Concatenate and write files''. -b: See ``Backup options''. -c <1>: See ```su': Run a command with substitute user and group id''. -c <2>: See ``File type tests''. -c <3>: See ```stat': Report file or filesystem status''. -c <4>: See ```du': Estimate file space usage''. -c <5>: See ```touch': Change file timestamps''. -c <6>: See ```chmod': Change access permissions''. -c <7>: See ```chgrp': Change group ownership''. -c <8>: See ```chown': Change file owner and group''. -c <9>: See ```install': Copy files and set attributes''. -c: See ```dircolors': Color setup for `ls'''. -C: See ``General output formatting''. -c <1>: See ``Sorting the output''. -c <2>: See ```cut': Print selected parts of lines''. -c <3>: See ```uniq': Uniquify files''. -c <4>: See ```sort': Sort text files''. -c: See ```wc': Print byte, word, and line counts''. -C: See ```split': Split a file into fixed-size pieces''. -c <1>: See ```tail': Output the last part of files''. -c <2>: See ```head': Output the first part of files''. -c <3>: See ```pr': Paginate or columnate files for printing''. -c <4>: See ```fmt': Reformat paragraph text''. -c: See ```od': Write files in octal or other formats''. -COLUMN: See ```pr': Paginate or columnate files for printing''. -d <1>: See ``Options for `date'''. -d: See ``File type tests''. -D: See ```du': Estimate file space usage''. -d <1>: See ```touch': Change file timestamps''. -d <2>: See ```ln': Make links between files''. -d <3>: See ```rm': Remove files or directories''. -d <4>: See ```install': Copy files and set attributes''. -d: See ```cp': Copy files and directories''. -D: See ``What information is listed''. -d <1>: See ``Which files are listed''. -d <2>: See ```paste': Merge lines of files''. -d: See ```cut': Print selected parts of lines''. -D: See ```uniq': Uniquify files''. -d <1>: See ```uniq': Uniquify files''. -d <2>: See ```sort': Sort text files''. -d <3>: See ```pr': Paginate or columnate files for printing''. -d <4>: See ```od': Write files in octal or other formats''. -d: See ```nl': Number lines and write files''. -e <1>: See ``File characteristic tests''. -e <2>: See ```echo': Print a line of text''. -e <3>: See ```join': Join lines on a common field''. -e: See ```pr': Paginate or columnate files for printing''. -E: See ```cat': Concatenate and write files''. -e: See ```cat': Concatenate and write files''. -ef: See ``File characteristic tests''. -eq: See ``Numeric tests''. -f <1>: See ```su': Run a command with substitute user and group id''. -f: See ``Options for `date'''. -F: See ```stty': Print or change terminal characteristics''. -f <1>: See ``File type tests''. -f <2>: See ```stat': Report file or filesystem status''. -f <3>: See ```touch': Change file timestamps''. -f <4>: See ```chmod': Change access permissions''. -f <5>: See ```chgrp': Change group ownership''. -f <6>: See ```chown': Change file owner and group''. -f: See ```ln': Make links between files''. -F: See ```ln': Make links between files''. -f <1>: See ```shred': Remove files more securely''. -f <2>: See ```rm': Remove files or directories''. -f <3>: See ```mv': Move (rename) files''. -f: See ```cp': Copy files and directories''. -F: See ``General output formatting''. -f <1>: See ``Sorting the output''. -f <2>: See ```cut': Print selected parts of lines''. -f <3>: See ```uniq': Uniquify files''. -f <4>: See ```sort': Sort text files''. -f: See ```csplit': Split a file into context-determined pieces''. -F: See ```tail': Output the last part of files''. -f <1>: See ```tail': Output the last part of files''. -f: See ```pr': Paginate or columnate files for printing''. -F: See ```pr': Paginate or columnate files for printing''. -f <1>: See ```od': Write files in octal or other formats''. -f: See ```nl': Number lines and write files''. -f FORMAT: See ```seq': Print numeric sequences''. -G: See ```id': Print real and effective uid and gid''. -g <1>: See ```id': Print real and effective uid and gid''. -g: See ```stty': Print or change terminal characteristics''. -G: See ``Access permission tests''. -g <1>: See ``Access permission tests''. -g: See ```install': Copy files and set attributes''. -G: See ``What information is listed''. -g <1>: See ``What information is listed''. -g: See ```sort': Sort text files''. -ge: See ``Numeric tests''. -gt: See ``Numeric tests''. -H: See ```who': Print who is currently logged in''. -h: See ``File type tests''. -H: See ```du': Estimate file space usage''. -h: See ```du': Estimate file space usage''. -H: See ```df': Report filesystem disk space usage''. -h <1>: See ```df': Report filesystem disk space usage''. -h <2>: See ```chgrp': Change group ownership''. -h: See ```chown': Change file owner and group''. -H: See ```cp': Copy files and directories''. -h: See ``What information is listed''. -H: See ``Which files are listed''. -h <1>: See ```pr': Paginate or columnate files for printing''. -h <2>: See ```od': Write files in octal or other formats''. -h <3>: See ```nl': Number lines and write files''. -h: See ``Block size''. -i <1>: See ```env': Run a command in a modified environment''. -i <2>: See ```uname': Print system information''. -i <3>: See ```who': Print who is currently logged in''. -i <4>: See ```tee': Redirect output to multiple files''. -i <5>: See ```df': Report filesystem disk space usage''. -i <6>: See ```ln': Make links between files''. -i <7>: See ```rm': Remove files or directories''. -i <8>: See ```mv': Move (rename) files''. -i <9>: See ```cp': Copy files and directories''. -i: See ``What information is listed''. -I: See ``Which files are listed''. -i <1>: See ```expand': Convert tabs to spaces''. -i <2>: See ```join': Join lines on a common field''. -i <3>: See ```uniq': Uniquify files''. -i <4>: See ```sort': Sort text files''. -i <5>: See ```pr': Paginate or columnate files for printing''. -i <6>: See ```od': Write files in octal or other formats''. -i: See ```nl': Number lines and write files''. -I TIMESPEC: See ``Options for `date'''. -J: See ```pr': Paginate or columnate files for printing''. -j: See ```od': Write files in octal or other formats''. -j1: See ```join': Join lines on a common field''. -j2: See ```join': Join lines on a common field''. -k <1>: See ``Access permission tests''. -k <2>: See ```du': Estimate file space usage''. -k <3>: See ```df': Report filesystem disk space usage''. -k <4>: See ``General output formatting''. -k <5>: See ```sort': Sort text files''. -k <6>: See ```csplit': Split a file into context-determined pieces''. -k: See ``Block size''. -l <1>: See ```su': Run a command with substitute user and group id''. -l: See ```who': Print who is currently logged in''. -L <1>: See ``File type tests''. -L <2>: See ```stat': Report file or filesystem status''. -L: See ```du': Estimate file space usage''. -l <1>: See ```du': Estimate file space usage''. -l: See ```df': Report filesystem disk space usage''. -L: See ```cp': Copy files and directories''. -l <1>: See ```cp': Copy files and directories''. -l: See ``What information is listed''. -L <1>: See ``Which files are listed''. -L: See ```wc': Print byte, word, and line counts''. -l <1>: See ```wc': Print byte, word, and line counts''. -l <2>: See ```split': Split a file into fixed-size pieces''. -l <3>: See ```pr': Paginate or columnate files for printing''. -l <4>: See ```od': Write files in octal or other formats''. -l: See ```nl': Number lines and write files''. -le: See ``Numeric tests''. -lt: See ``Numeric tests''. -m <1>: See ```su': Run a command with substitute user and group id''. -m <2>: See ```uname': Print system information''. -m <3>: See ```who': Print who is currently logged in''. -m <4>: See ```touch': Change file timestamps''. -m <5>: See ```mknod': Make block or character special files''. -m <6>: See ```mkfifo': Make FIFOs (named pipes)''. -m <7>: See ```mkdir': Make directories''. -m <8>: See ```install': Copy files and set attributes''. -m: See ``General output formatting''. -M: See ```sort': Sort text files''. -m <1>: See ```sort': Sort text files''. -m <2>: See ```wc': Print byte, word, and line counts''. -m: See ```pr': Paginate or columnate files for printing''. -n <1>: See ```nice': Run a command with modified scheduling priority''. -n <2>: See ```uname': Print system information''. -n <3>: See ```id': Print real and effective uid and gid''. -n <4>: See ``String tests''. -n <5>: See ```echo': Print a line of text''. -n: See ```ln': Make links between files''. -N: See ``Formatting the file names''. -n <1>: See ``What information is listed''. -n <2>: See ```cut': Print selected parts of lines''. -n <3>: See ```sort': Sort text files''. -n <4>: See ```csplit': Split a file into context-determined pieces''. -n <5>: See ```tail': Output the last part of files''. -n: See ```head': Output the first part of files''. -N: See ```pr': Paginate or columnate files for printing''. -n: See ```pr': Paginate or columnate files for printing''. -N: See ```od': Write files in octal or other formats''. -n <1>: See ```nl': Number lines and write files''. -n: See ```cat': Concatenate and write files''. -n NUMBER: See ```shred': Remove files more securely''. -ne: See ``Numeric tests''. -nt: See ``File characteristic tests''. -o <1>: See ```uname': Print system information''. -o: See ``Connectives for `test'''. -O: See ``Access permission tests''. -o <1>: See ```install': Copy files and set attributes''. -o <2>: See ``What information is listed''. -o <3>: See ```sort': Sort text files''. -o <4>: See ```pr': Paginate or columnate files for printing''. -o: See ```od': Write files in octal or other formats''. -ot: See ``File characteristic tests''. -p <1>: See ```su': Run a command with substitute user and group id''. -p <2>: See ```uname': Print system information''. -p <3>: See ```pathchk': Check file name portability''. -p: See ``File type tests''. -P: See ```df': Report filesystem disk space usage''. -p <1>: See ```rmdir': Remove empty directories''. -p <2>: See ```mkdir': Make directories''. -p <3>: See ```install': Copy files and set attributes''. -p: See ```cp': Copy files and directories''. -P: See ```cp': Copy files and directories''. -p <1>: See ```dircolors': Color setup for `ls'''. -p: See ```nl': Number lines and write files''. -q: See ```who': Print who is currently logged in''. -Q: See ``Formatting the file names''. -q <1>: See ``Formatting the file names''. -q <2>: See ```csplit': Split a file into context-determined pieces''. -q <3>: See ```tail': Output the last part of files''. -q: See ```head': Output the first part of files''. -r <1>: See ```uname': Print system information''. -r: See ``Options for `date'''. -R: See ``Options for `date'''. -r <1>: See ```id': Print real and effective uid and gid''. -r <2>: See ``Access permission tests''. -r: See ```touch': Change file timestamps''. -R <1>: See ```chmod': Change access permissions''. -R <2>: See ```chgrp': Change group ownership''. -R <3>: See ```chown': Change file owner and group''. -R: See ```rm': Remove files or directories''. -r <1>: See ```rm': Remove files or directories''. -r: See ```cp': Copy files and directories''. -R: See ```cp': Copy files and directories''. -r: See ``Sorting the output''. -R: See ``Which files are listed''. -r <1>: See ```sort': Sort text files''. -r <2>: See ```sum': Print checksum and block counts''. -r <3>: See ```pr': Paginate or columnate files for printing''. -r: See ```tac': Concatenate and write files in reverse''. -s <1>: See ```su': Run a command with substitute user and group id''. -s <2>: See ```uname': Print system information''. -s <3>: See ``Options for `date'''. -s <4>: See ```who': Print who is currently logged in''. -s <5>: See ```tty': Print file name of terminal on standard input''. -s: See ``File characteristic tests''. -S <1>: See ``File type tests''. -S: See ```du': Estimate file space usage''. -s: See ```du': Estimate file space usage''. -S: See ```ln': Make links between files''. -s: See ```ln': Make links between files''. -S <1>: See ```mv': Move (rename) files''. -S: See ```install': Copy files and set attributes''. -s: See ```install': Copy files and set attributes''. -S: See ```cp': Copy files and directories''. -s: See ```cp': Copy files and directories''. -S: See ``Sorting the output''. -s <1>: See ``What information is listed''. -s <2>: See ```paste': Merge lines of files''. -s <3>: See ```cut': Print selected parts of lines''. -s: See ```uniq': Uniquify files''. -S: See ```sort': Sort text files''. -s <1>: See ```sum': Print checksum and block counts''. -s <2>: See ```csplit': Split a file into context-determined pieces''. -s: See ```fold': Wrap input lines to fit in specified width''. -S: See ```pr': Paginate or columnate files for printing''. -s <1>: See ```pr': Paginate or columnate files for printing''. -s <2>: See ```fmt': Reformat paragraph text''. -s <3>: See ```od': Write files in octal or other formats''. -s <4>: See ```nl': Number lines and write files''. -s <5>: See ```tac': Concatenate and write files in reverse''. -s: See ```cat': Concatenate and write files''. -S: See ``Backup options''. -s BYTES: See ```shred': Remove files more securely''. -su: See ```su': Run a command with substitute user and group id''. -T: See ```who': Print who is currently logged in''. -t <1>: See ``File type tests''. -t: See ```stat': Report file or filesystem status''. -T: See ```df': Report filesystem disk space usage''. -t: See ```df': Report filesystem disk space usage''. -T: See ``General output formatting''. -t <1>: See ``Sorting the output''. -t <2>: See ```unexpand': Convert spaces to tabs''. -t: See ```expand': Convert tabs to spaces''. -T: See ```sort': Sort text files''. -t <1>: See ```sort': Sort text files''. -t: See ```md5sum': Print or check message-digests''. -T: See ```pr': Paginate or columnate files for printing''. -t <1>: See ```pr': Paginate or columnate files for printing''. -t <2>: See ```fmt': Reformat paragraph text''. -t: See ```od': Write files in octal or other formats''. -T: See ```cat': Concatenate and write files''. -t: See ```cat': Concatenate and write files''. -u <1>: See ```env': Run a command in a modified environment''. -u <2>: See ``Options for `date'''. -u <3>: See ```who': Print who is currently logged in''. -u <4>: See ```id': Print real and effective uid and gid''. -u <5>: See ``Access permission tests''. -u <6>: See ```shred': Remove files more securely''. -u: See ```mv': Move (rename) files''. -U: See ``Sorting the output''. -u <1>: See ``Sorting the output''. -u <2>: See ```uniq': Uniquify files''. -u <3>: See ```sort': Sort text files''. -u <4>: See ```fmt': Reformat paragraph text''. -u: See ```cat': Concatenate and write files''. -unset: See ```env': Run a command in a modified environment''. -v <1>: See ```uname': Print system information''. -v <2>: See ```chmod': Change access permissions''. -v <3>: See ```chgrp': Change group ownership''. -v <4>: See ```chown': Change file owner and group''. -v <5>: See ```rmdir': Remove empty directories''. -v: See ```mkdir': Make directories''. -V: See ```ln': Make links between files''. -v <1>: See ```ln': Make links between files''. -v <2>: See ```shred': Remove files more securely''. -v: See ```rm': Remove files or directories''. -V: See ```mv': Move (rename) files''. -v: See ```mv': Move (rename) files''. -V: See ```install': Copy files and set attributes''. -v: See ```install': Copy files and set attributes''. -V: See ```cp': Copy files and directories''. -v <1>: See ```cp': Copy files and directories''. -v <2>: See ``Sorting the output''. -v <3>: See ```tail': Output the last part of files''. -v <4>: See ```head': Output the first part of files''. -v <5>: See ```pr': Paginate or columnate files for printing''. -v <6>: See ```od': Write files in octal or other formats''. -v <7>: See ```nl': Number lines and write files''. -v: See ```cat': Concatenate and write files''. -w <1>: See ```who': Print who is currently logged in''. -w <2>: See ``Access permission tests''. -w <3>: See ``General output formatting''. -w <4>: See ```uniq': Uniquify files''. -w <5>: See ```md5sum': Print or check message-digests''. -w <6>: See ```wc': Print byte, word, and line counts''. -w: See ```fold': Wrap input lines to fit in specified width''. -W: See ```pr': Paginate or columnate files for printing''. -w <1>: See ```pr': Paginate or columnate files for printing''. -w <2>: See ```fmt': Reformat paragraph text''. -w <3>: See ```od': Write files in octal or other formats''. -w: See ```nl': Number lines and write files''. -WIDTH: See ```fmt': Reformat paragraph text''. -x <1>: See ``Access permission tests''. -x <2>: See ```du': Estimate file space usage''. -x <3>: See ```df': Report filesystem disk space usage''. -x <4>: See ```shred': Remove files more securely''. -x <5>: See ```cp': Copy files and directories''. -x: See ``General output formatting''. -X: See ``Sorting the output''. -x: See ```od': Write files in octal or other formats''. -X FILE: See ```du': Estimate file space usage''. -z <1>: See ``String tests''. -z <2>: See ```shred': Remove files more securely''. -z <3>: See ```sort': Sort text files''. -z: See ```csplit': Split a file into context-determined pieces''. .cshrc: See ```su': Run a command with substitute user and group id''. /: See ``Numeric expressions''. /bin/sh: See ```su': Run a command with substitute user and group id''. /etc/passwd: See ```su': Run a command with substitute user and group id''. /etc/shells: See ```su': Run a command with substitute user and group id''. /etc/utmp <1>: See ```who': Print who is currently logged in''. /etc/utmp <2>: See ```users': Print login names of users currently logged in''. /etc/utmp: See ```logname': Print current login name''. /etc/wtmp <1>: See ```who': Print who is currently logged in''. /etc/wtmp: See ```users': Print login names of users currently logged in''. 128-bit checksum: See ```md5sum': Print or check message-digests''. 16-bit checksum: See ```sum': Print checksum and block counts''. 4.2 filesystem type: See ```df': Report filesystem disk space usage''. <: See ``Relations for `expr'''. <=: See ``Relations for `expr'''. = <1>: See ``Relations for `expr'''. =: See ``String tests''. ==: See ``Relations for `expr'''. >: See ``Relations for `expr'''. >=: See ``Relations for `expr'''. \( regexp operator: See ``String expressions''. \+ regexp operator: See ``String expressions''. \0ooo: See ```printf': Format and print data''. \? regexp operator: See ``String expressions''. \c: See ```printf': Format and print data''. \uhhhh: See ```printf': Format and print data''. \Uhhhhhhhh: See ```printf': Format and print data''. \xhh: See ```printf': Format and print data''. \| regexp operator: See ``String expressions''. _POSIX2_VERSION: See ``Standards conformance''. abbreviations for months: See ``Calendar date items''. access permission tests: See ``Access permission tests''. access permissions, changing: See ```chmod': Change access permissions''. access time, changing: See ```touch': Change file timestamps''. access time, printing or sorting files by: See ``Sorting the output''. across columns: See ```pr': Paginate or columnate files for printing''. across, listing files: See ``General output formatting''. adding permissions: See ``Setting Permissions''. addition: See ``Numeric expressions''. ago in date strings: See ``Relative items in date strings''. all duplicate lines, outputting: See ```uniq': Uniquify files''. alnum: See ``Specifying sets of characters''. alpha: See ``Specifying sets of characters''. alternate ebcdic, converting to: See ```dd': Convert and copy a file''. always color option: See ``General output formatting''. am i: See ```who': Print who is currently logged in''. am in date strings: See ``Time of day items''. and operator <1>: See ``Relations for `expr'''. and operator: See ``Connectives for `test'''. appropriate privileges <1>: See ```nice': Run a command with modified scheduling priority''. appropriate privileges <2>: See ```hostname': Print or set system name''. appropriate privileges <3>: See ``Setting the time''. appropriate privileges: See ```install': Copy files and set attributes''. arbitrary date strings, parsing: See ``Options for `date'''. arbitrary text, displaying: See ```echo': Print a line of text''. arithmetic tests: See ``Numeric tests''. ASCII dump of files: See ```od': Write files in octal or other formats''. ascii, converting to: See ```dd': Convert and copy a file''. atime, changing: See ```touch': Change file timestamps''. atime, printing or sorting files by: See ``Sorting the output''. attributes, file: See ``Changing file attributes''. authors of getdate: See ``Authors of `getdate'''. auto color option: See ``General output formatting''. automounter filesystems: See ```df': Report filesystem disk space usage''. b for block special file: See ```mknod': Make block or character special files''. background jobs, stopping at terminal write: See ``Local settings''. backslash escapes <1>: See ```echo': Print a line of text''. backslash escapes: See ``Specifying sets of characters''. backslash sequences for file names: See ``Formatting the file names''. backup files, ignoring: See ``Which files are listed''. backup options: See ``Backup options''. backup suffix: See ``Backup options''. backups, making <1>: See ```ln': Make links between files''. backups, making <2>: See ```mv': Move (rename) files''. backups, making <3>: See ```install': Copy files and set attributes''. backups, making <4>: See ```cp': Copy files and directories''. backups, making: See ``Backup options''. backups, making only: See ```cp': Copy files and directories''. basename: See ```basename': Strip directory and suffix from a file name''. baud rate, setting: See ``Special settings''. beeping at input buffer full: See ``Input settings''. beginning of time: See ``Time directives''. beginning of time, for POSIX: See ``Date input formats''. Bellovin, Steven M.: See ``Authors of `getdate'''. Berets, Jim: See ``Authors of `getdate'''. Berry, K. <1>: See ``Authors of `getdate'''. Berry, K.: See ``Introduction''. binary and text I/O in cat: See ```cat': Concatenate and write files''. binary input files: See ```md5sum': Print or check message-digests''. blank: See ``Specifying sets of characters''. blank lines, numbering: See ```nl': Number lines and write files''. blanks, ignoring leading: See ```sort': Sort text files''. block (space-padding): See ```dd': Convert and copy a file''. block size <1>: See ```dd': Convert and copy a file''. block size: See ``Block size''. block size of conversion: See ```dd': Convert and copy a file''. block size of input: See ```dd': Convert and copy a file''. block size of output: See ```dd': Convert and copy a file''. block special check: See ``File type tests''. block special files: See ```mknod': Make block or character special files''. block special files, creating: See ```mknod': Make block or character special files''. BLOCK_SIZE: See ``Block size''. body, numbering: See ```nl': Number lines and write files''. Bourne shell syntax for color setup: See ```dircolors': Color setup for `ls'''. breaks, cause interrupts: See ``Input settings''. breaks, ignoring: See ``Input settings''. brkint: See ``Input settings''. bs: See ```dd': Convert and copy a file''. BSD sum: See ```sum': Print checksum and block counts''. BSD tail: See ```tail': Output the last part of files''. BSD touch compatibility: See ```touch': Change file timestamps''. bsN: See ``Output settings''. bugs, reporting: See ``Introduction''. built-in shell commands, conflicts with <1>: See ```nice': Run a command with modified scheduling priority''. built-in shell commands, conflicts with <2>: See ```pwd': Print working directory''. built-in shell commands, conflicts with: See ```test': Check file types and compare values''. byte count: See ```wc': Print byte, word, and line counts''. byte-swapping: See ```dd': Convert and copy a file''. c for character special file: See ```mknod': Make block or character special files''. C shell syntax for color setup: See ```dircolors': Color setup for `ls'''. C-s/C-q flow control: See ``Input settings''. calendar date item: See ``Calendar date items''. case folding: See ```sort': Sort text files''. case translation: See ``Local settings''. case, ignored in dates: See ``General date syntax''. cat: See ```cat': Concatenate and write files''. cbreak: See ``Combination settings''. cbs: See ```dd': Convert and copy a file''. CD-ROM filesystem type: See ```df': Report filesystem disk space usage''. cdfs filesystem type: See ```df': Report filesystem disk space usage''. change or print terminal settings: See ```stty': Print or change terminal characteristics''. changed files, verbosely describing: See ```chgrp': Change group ownership''. changed owners, verbosely describing: See ```chown': Change file owner and group''. changing access permissions: See ```chmod': Change access permissions''. changing file attributes: See ``Changing file attributes''. changing file ownership: See ```chown': Change file owner and group''. changing file timestamps: See ```touch': Change file timestamps''. changing group ownership <1>: See ```chgrp': Change group ownership''. changing group ownership: See ```chown': Change file owner and group''. changing special permissions: See ``Changing Special Permissions''. character classes: See ``Specifying sets of characters''. character count: See ```wc': Print byte, word, and line counts''. character size: See ``Control settings''. character special check: See ``File type tests''. character special files: See ```mknod': Make block or character special files''. character special files, creating: See ```mknod': Make block or character special files''. characters, special: See ``Special characters''. check file types: See ```test': Check file types and compare values''. checking for sortedness: See ```sort': Sort text files''. checksum, 128-bit: See ```md5sum': Print or check message-digests''. checksum, 16-bit: See ```sum': Print checksum and block counts''. chgrp: See ```chgrp': Change group ownership''. chmod: See ```chmod': Change access permissions''. chown: See ```chown': Change file owner and group''. chroot: See ```chroot': Run a command with a different root directory''. cksum: See ```cksum': Print CRC checksum and byte counts''. clocal: See ``Control settings''. cntrl: See ``Specifying sets of characters''. color database, printing: See ```dircolors': Color setup for `ls'''. color setup: See ```dircolors': Color setup for `ls'''. color, distinguishing file types with: See ``General output formatting''. cols: See ``Special settings''. COLUMNS: See ``Special settings''. columns: See ``Special settings''. COLUMNS: See ``General output formatting''. combination settings: See ``Combination settings''. comm: See ```comm': Compare two sorted files line by line''. commands for controlling processes: See ``Process control''. commands for delaying: See ``Delaying''. commands for exit status: See ``Conditions''. commands for file name manipulation: See ``File name manipulation''. commands for invoking other commands: See ``Modified command invocation''. commands for printing text: See ``Printing text''. commands for printing the working context: See ``Working context''. commands for printing user information: See ``User information''. commands for redirection: See ``Redirection''. commands for system context: See ``System context''. commas, outputting between files: See ``General output formatting''. comments, in dates: See ``General date syntax''. common field, joining on: See ```join': Join lines on a common field''. common lines: See ```comm': Compare two sorted files line by line''. common options: See ``Common options''. compare values: See ```test': Check file types and compare values''. comparing sorted files: See ```comm': Compare two sorted files line by line''. comparison operators: See ``Relations for `expr'''. concatenate and write files: See ```cat': Concatenate and write files''. conditional executability: See ``Conditional Executability''. conditions: See ``Conditions''. conflicts with shell built-ins <1>: See ```nice': Run a command with modified scheduling priority''. conflicts with shell built-ins <2>: See ```pwd': Print working directory''. conflicts with shell built-ins: See ```test': Check file types and compare values''. connectives, logical <1>: See ``Relations for `expr'''. connectives, logical: See ``Connectives for `test'''. context splitting: See ```csplit': Split a file into context-determined pieces''. context, system: See ``System context''. control characters, using ^C: See ``Local settings''. control settings: See ``Control settings''. conv: See ```dd': Convert and copy a file''. conversion block size: See ```dd': Convert and copy a file''. converting tabs to spaces: See ```expand': Convert tabs to spaces''. converting while copying a file: See ```dd': Convert and copy a file''. cooked: See ``Combination settings''. Coordinated Universal Time: See ``Options for `date'''. copying directories recursively: See ```cp': Copy files and directories''. copying existing permissions: See ``Copying Existing Permissions''. copying files: See ```cat': Concatenate and write files''. copying files and directories: See ```cp': Copy files and directories''. copying files and setting attributes: See ```install': Copy files and set attributes''. count: See ```dd': Convert and copy a file''. cp: See ```cp': Copy files and directories''. crashes and corruption: See ```sync': Synchronize data on disk with memory''. CRC checksum: See ```cksum': Print CRC checksum and byte counts''. cread: See ``Control settings''. creating directories: See ```mkdir': Make directories''. creating FIFOs (named pipes): See ```mkfifo': Make FIFOs (named pipes)''. creating links (hard only): See ```link': Make a hard link via the link syscall''. creating links (hard or soft): See ```ln': Make links between files''. crN: See ``Output settings''. crown margin: See ```fmt': Reformat paragraph text''. crt: See ``Combination settings''. crterase: See ``Local settings''. crtkill: See ``Local settings''. crtscts: See ``Control settings''. csh syntax for color setup: See ```dircolors': Color setup for `ls'''. csN: See ``Control settings''. csplit: See ```csplit': Split a file into context-determined pieces''. cstopb: See ``Control settings''. ctime, printing or sorting by: See ``Sorting the output''. ctlecho: See ``Local settings''. current working directory, printing: See ```pwd': Print working directory''. cut: See ```cut': Print selected parts of lines''. cyclic redundancy check: See ```cksum': Print CRC checksum and byte counts''. data, erasing: See ```shred': Remove files more securely''. database for color setup, printing: See ```dircolors': Color setup for `ls'''. date: See ```date': Print or set system date and time''. date directives: See ``Date directives''. date format, ISO 8601: See ``Calendar date items''. date input formats: See ``Date input formats''. date options: See ``Options for `date'''. date strings, parsing: See ``Options for `date'''. day in date strings: See ``Relative items in date strings''. day of week item: See ``Day of week items''. dd: See ```dd': Convert and copy a file''. dec: See ``Combination settings''. decctlq: See ``Combination settings''. delay for a specified time: See ```sleep': Delay for a specified time''. delaying commands: See ``Delaying''. deleting characters: See ``Squeezing repeats and deleting''. dereferencing symbolic links: See ```ln': Make links between files''. descriptor follow option: See ```tail': Output the last part of files''. destination directory <1>: See ```ln': Make links between files''. destination directory <2>: See ```mv': Move (rename) files''. destination directory <3>: See ```install': Copy files and set attributes''. destination directory <4>: See ```cp': Copy files and directories''. destination directory: See ``Target directory''. destinations, multiple output: See ```tee': Redirect output to multiple files''. device file, disk: See ```df': Report filesystem disk space usage''. df: See ```df': Report filesystem disk space usage''. DF_BLOCK_SIZE: See ``Block size''. dictionary order: See ```sort': Sort text files''. differing lines: See ```comm': Compare two sorted files line by line''. digit: See ``Specifying sets of characters''. dir: See ```dir': Briefly list directory contents''. dircolors: See ```dircolors': Color setup for `ls'''. directives, date: See ``Date directives''. directives, literal: See ``Literal directives''. directives, time: See ``Time directives''. directories, copying: See ```cp': Copy files and directories''. directories, copying recursively: See ```cp': Copy files and directories''. directories, creating: See ```mkdir': Make directories''. directories, creating with given attributes: See ```install': Copy files and set attributes''. directories, removing (recursively): See ```rm': Remove files or directories''. directories, removing empty: See ```rmdir': Remove empty directories''. directories, removing with unlink: See ```rm': Remove files or directories''. directory check: See ``File type tests''. directory components, printing: See ```dirname': Strip non-directory suffix from a file name''. directory deletion, ignoring failures: See ```rmdir': Remove empty directories''. directory deletion, reporting: See ```rmdir': Remove empty directories''. directory listing: See ```ls': List directory contents''. directory listing, brief: See ```dir': Briefly list directory contents''. directory listing, recursive: See ``Which files are listed''. directory listing, verbose: See ```vdir': Verbosely list directory contents''. directory order, listing by: See ``Sorting the output''. directory, stripping from file names: See ```basename': Strip directory and suffix from a file name''. dired Emacs mode support: See ``What information is listed''. dirname: See ```dirname': Strip non-directory suffix from a file name''. disabling special characters: See ``Special characters''. disk allocation: See ``What information is listed''. disk device file: See ```df': Report filesystem disk space usage''. disk usage: See ``Disk usage''. disk usage by filesystem: See ```df': Report filesystem disk space usage''. disk usage for files: See ```du': Estimate file space usage''. diskette filesystem: See ```df': Report filesystem disk space usage''. displacement of dates: See ``Relative items in date strings''. displaying text: See ```echo': Print a line of text''. division: See ``Numeric expressions''. do nothing, successfully: See ```true': Do nothing, successfully''. do nothing, unsuccessfully: See ```false': Do nothing, unsuccessfully''. DOS filesystem: See ```df': Report filesystem disk space usage''. double spacing: See ```pr': Paginate or columnate files for printing''. down columns: See ```pr': Paginate or columnate files for printing''. dsusp: See ``Special characters''. du: See ```du': Estimate file space usage''. DU_BLOCK_SIZE: See ``Block size''. duplicate lines, outputting: See ```uniq': Uniquify files''. ebcdic, converting to: See ```dd': Convert and copy a file''. echo <1>: See ``Local settings''. echo: See ```echo': Print a line of text''. echoctl: See ``Local settings''. echoe: See ``Local settings''. echok: See ``Local settings''. echoke: See ``Local settings''. echonl: See ``Local settings''. echoprt: See ``Local settings''. effective uid and gid, printing: See ```id': Print real and effective uid and gid''. effective UID, printing: See ```whoami': Print effective user id''. efs filesystem type: See ```df': Report filesystem disk space usage''. Eggert, Paul: See ``Authors of `getdate'''. eight-bit characters <1>: See ``Combination settings''. eight-bit characters: See ``Control settings''. eight-bit input: See ``Input settings''. ek: See ``Combination settings''. empty files, creating: See ```touch': Change file timestamps''. empty lines, numbering: See ```nl': Number lines and write files''. entire files, output of: See ``Output of entire files''. env: See ```env': Run a command in a modified environment''. environment variables, printing: See ```printenv': Print all or some environment variables''. environment, preserving: See ```su': Run a command with substitute user and group id''. environment, printing: See ```env': Run a command in a modified environment''. environment, running a program in a modified: See ```env': Run a command in a modified environment''. eof: See ``Special characters''. eol: See ``Special characters''. eol2: See ``Special characters''. epoch, for POSIX: See ``Date input formats''. epoch, seconds since: See ``Time directives''. equal string check: See ``String tests''. equivalence classes: See ``Specifying sets of characters''. erase: See ``Special characters''. erasing data: See ```shred': Remove files more securely''. error messages, omitting <1>: See ```chmod': Change access permissions''. error messages, omitting <2>: See ```chgrp': Change group ownership''. error messages, omitting: See ```chown': Change file owner and group''. evaluation of expressions: See ```expr': Evaluate expressions''. even parity: See ``Control settings''. evenp: See ``Combination settings''. exabyte, definition of: See ``Block size''. examples of date: See ``Examples of `date'''. examples of expr: See ``Examples of using `expr'''. exbibyte, definition of: See ``Block size''. excluding files from du: See ```du': Estimate file space usage''. executable file check: See ``Access permission tests''. executables and file type, marking: See ``General output formatting''. execute permission: See ``Structure of File Permissions''. execute permission, symbolic: See ``Setting Permissions''. existence-of-file check: See ``File characteristic tests''. existing backup method: See ``Backup options''. exit status commands: See ``Conditions''. exit status of expr: See ```expr': Evaluate expressions''. exit status of false: See ```false': Do nothing, unsuccessfully''. exit status of nohup: See ```nohup': Run a command immune to hangups''. exit status of pathchk: See ```pathchk': Check file name portability''. exit status of printenv: See ```printenv': Print all or some environment variables''. exit status of true: See ```true': Do nothing, successfully''. exit status of tty: See ```tty': Print file name of terminal on standard input''. expand: See ```expand': Convert tabs to spaces''. expr: See ```expr': Evaluate expressions''. expression evaluation <1>: See ```expr': Evaluate expressions''. expression evaluation: See ```test': Check file types and compare values''. expressions, numeric: See ``Numeric expressions''. expressions, string: See ``String expressions''. extension, sorting files by: See ``Sorting the output''. factor: See ```factor': Print prime factors''. failure exit status: See ```false': Do nothing, unsuccessfully''. false: See ```false': Do nothing, unsuccessfully''. fascism: See ```su': Run a command with substitute user and group id''. ffN: See ``Output settings''. field separator character: See ```sort': Sort text files''. fields, padding numeric: See ``Padding''. FIFOs, creating: See ```mkfifo': Make FIFOs (named pipes)''. file attributes, changing: See ``Changing file attributes''. file characteristic tests: See ``File characteristic tests''. file contents, dumping unambiguously: See ```od': Write files in octal or other formats''. file information, preserving: See ```cp': Copy files and directories''. file name manipulation: See ``File name manipulation''. file name pattern expansion, disabled: See ```su': Run a command with substitute user and group id''. file names, checking validity and portability: See ```pathchk': Check file name portability''. file names, stripping directory and suffix: See ```basename': Strip directory and suffix from a file name''. file offset radix: See ```od': Write files in octal or other formats''. file ownership, changing: See ```chown': Change file owner and group''. file permissions, numeric: See ``Numeric Modes''. file sizes: See ```du': Estimate file space usage''. file space usage: See ```du': Estimate file space usage''. file status: See ```stat': Report file or filesystem status''. file timestamps, changing: See ```touch': Change file timestamps''. file type and executables, marking: See ``General output formatting''. file type tests: See ``File type tests''. file type, marking: See ``General output formatting''. file types: See ``Special file types''. file types, special: See ``Special file types''. file utilities: See ``GNU Core-utils''. files beginning with -, removing: See ```rm': Remove files or directories''. files, copying: See ```cp': Copy files and directories''. filesystem disk usage: See ```df': Report filesystem disk space usage''. filesystem sizes: See ```df': Report filesystem disk space usage''. filesystem space, retrieving current data more slowly: See ```df': Report filesystem disk space usage''. filesystem space, retrieving old data more quickly: See ```df': Report filesystem disk space usage''. filesystem status: See ```stat': Report file or filesystem status''. filesystem types, limiting output to certain: See ```df': Report filesystem disk space usage''. filesystem types, printing: See ```df': Report filesystem disk space usage''. filesystems: See ```stat': Report file or filesystem status''. filesystems and hard links: See ```ln': Make links between files''. filesystems, omitting copying to different: See ```cp': Copy files and directories''. fingerprint, 128-bit: See ```md5sum': Print or check message-digests''. first in date strings: See ``General date syntax''. first part of files, outputting: See ```head': Output the first part of files''. flow control, hardware: See ``Control settings''. flow control, software: See ``Input settings''. flushing, disabling: See ``Local settings''. fmt: See ```fmt': Reformat paragraph text''. fold: See ```fold': Wrap input lines to fit in specified width''. folding long input lines: See ```fold': Wrap input lines to fit in specified width''. footers, numbering: See ```nl': Number lines and write files''. force deletion: See ```shred': Remove files more securely''. formatting file contents: See ``Formatting file contents''. formatting of numbers in seq: See ```seq': Print numeric sequences''. formatting times <1>: See ```date': Print or set system date and time''. formatting times: See ```pr': Paginate or columnate files for printing''. fortnight in date strings: See ``Relative items in date strings''. fsck: See ```rm': Remove files or directories''. general date syntax: See ``General date syntax''. general numeric sort: See ```sort': Sort text files''. getdate: See ``Date input formats''. gibibyte, definition of: See ``Block size''. gigabyte, definition of: See ``Block size''. giving away permissions: See ``The Umask and Protection''. globbing, disabled: See ```su': Run a command with substitute user and group id''. GMT: See ``Options for `date'''. grand total of disk space: See ```du': Estimate file space usage''. graph: See ``Specifying sets of characters''. Greenwich Mean Time: See ``Options for `date'''. group owner, default: See ``Structure of File Permissions''. group ownership of installed files, setting: See ```install': Copy files and set attributes''. group ownership, changing <1>: See ```chgrp': Change group ownership''. group ownership, changing: See ```chown': Change file owner and group''. group wheel, not supported: See ```su': Run a command with substitute user and group id''. group, permissions for: See ``Setting Permissions''. groups: See ```groups': Print group names a user is in''. growing files: See ```tail': Output the last part of files''. hangups, immunity to: See ```nohup': Run a command immune to hangups''. hard link check: See ``File characteristic tests''. hard link, defined: See ```ln': Make links between files''. hard links to directories: See ```ln': Make links between files''. hard links, counting in du: See ```du': Estimate file space usage''. hard links, creating <1>: See ```ln': Make links between files''. hard links, creating: See ```link': Make a hard link via the link syscall''. hard links, preserving: See ```cp': Copy files and directories''. hardware class: See ```uname': Print system information''. hardware flow control: See ``Control settings''. hardware platform: See ```uname': Print system information''. hardware type: See ```uname': Print system information''. hat notation for control characters: See ``Local settings''. head: See ```head': Output the first part of files''. headers, numbering: See ```nl': Number lines and write files''. help, online: See ``Common options''. hex dump of files: See ```od': Write files in octal or other formats''. High Sierra filesystem: See ```df': Report filesystem disk space usage''. holes, copying files with: See ```cp': Copy files and directories''. HOME: See ```su': Run a command with substitute user and group id''. horizontal, listing files: See ``General output formatting''. host processor type: See ```uname': Print system information''. hostid: See ```hostid': Print numeric host identifier.''. hostname <1>: See ```hostname': Print or set system name''. hostname: See ```uname': Print system information''. hour in date strings: See ``Relative items in date strings''. hsfs filesystem type: See ```df': Report filesystem disk space usage''. human-readable output <1>: See ```du': Estimate file space usage''. human-readable output <2>: See ```df': Report filesystem disk space usage''. human-readable output <3>: See ``What information is listed''. human-readable output: See ``Block size''. hup[cl]: See ``Control settings''. hurd, author, printing: See ``What information is listed''. ibs: See ```dd': Convert and copy a file''. icanon: See ``Local settings''. icrnl: See ``Input settings''. id: See ```id': Print real and effective uid and gid''. idle time: See ```who': Print who is currently logged in''. iexten: See ``Local settings''. if: See ```dd': Convert and copy a file''. ignbrk: See ``Input settings''. igncr: See ``Input settings''. ignore filesystems: See ```df': Report filesystem disk space usage''. ignoring case: See ```sort': Sort text files''. ignpar: See ``Input settings''. imaxbel: See ``Input settings''. immunity to hangups: See ```nohup': Run a command immune to hangups''. implementation, hardware: See ```uname': Print system information''. indenting lines: See ```pr': Paginate or columnate files for printing''. index: See ``String expressions''. information, about current users: See ```who': Print who is currently logged in''. initial part of files, outputting: See ```head': Output the first part of files''. initial tabs, converting: See ```expand': Convert tabs to spaces''. inlcr: See ``Input settings''. inode number, printing: See ``What information is listed''. inode usage: See ```df': Report filesystem disk space usage''. inode, and hard links: See ```ln': Make links between files''. inodes, written buffered: See ```sync': Synchronize data on disk with memory''. inpck: See ``Input settings''. input block size: See ```dd': Convert and copy a file''. input settings: See ``Input settings''. input tabs: See ```pr': Paginate or columnate files for printing''. install: See ```install': Copy files and set attributes''. interactivity <1>: See ```mv': Move (rename) files''. interactivity: See ```cp': Copy files and directories''. intr: See ``Special characters''. invocation of commands, modified: See ``Modified command invocation''. isig: See ``Local settings''. ISO 8601 date format: See ``Calendar date items''. ispeed: See ``Special settings''. istrip: See ``Input settings''. items in date strings: See ``General date syntax''. iterations, selecting the number of: See ```shred': Remove files more securely''. iuclc: See ``Input settings''. ixany: See ``Input settings''. ixoff: See ``Input settings''. ixon: See ``Input settings''. join: See ```join': Join lines on a common field''. kernel name: See ```uname': Print system information''. kernel release: See ```uname': Print system information''. kernel version: See ```uname': Print system information''. kibibyte, definition of: See ``Block size''. kibibytes for file sizes: See ```du': Estimate file space usage''. kibibytes for filesystem sizes: See ```df': Report filesystem disk space usage''. kill <1>: See ```kill': Send a signal to processes''. kill: See ``Special characters''. kilobyte, definition of: See ``Block size''. Knuth, Donald E.: See ```fmt': Reformat paragraph text''. language, in dates: See ``General date syntax''. last DAY <1>: See ``Day of week items''. last DAY: See ``Options for `date'''. last in date strings: See ``General date syntax''. last part of files, outputting: See ```tail': Output the last part of files''. LC_ALL <1>: See ```ls': List directory contents''. LC_ALL: See ```sort': Sort text files''. LC_COLLATE <1>: See ``Relations for `expr'''. LC_COLLATE <2>: See ```join': Join lines on a common field''. LC_COLLATE <3>: See ```comm': Compare two sorted files line by line''. LC_COLLATE <4>: See ```uniq': Uniquify files''. LC_COLLATE: See ```sort': Sort text files''. LC_CTYPE: See ```sort': Sort text files''. LC_MESSAGES: See ```pr': Paginate or columnate files for printing''. LC_NUMERIC <1>: See ```sort': Sort text files''. LC_NUMERIC: See ``Block size''. LC_TIME <1>: See ``Formatting file timestamps''. LC_TIME <2>: See ```sort': Sort text files''. LC_TIME: See ```pr': Paginate or columnate files for printing''. LCASE: See ``Combination settings''. lcase: See ``Combination settings''. lcase, converting to: See ```dd': Convert and copy a file''. lchown <1>: See ```chgrp': Change group ownership''. lchown: See ```chown': Change file owner and group''. leading directories, creating missing: See ```install': Copy files and set attributes''. leading directory components, stripping: See ```basename': Strip directory and suffix from a file name''. left margin: See ```pr': Paginate or columnate files for printing''. length: See ``String expressions''. limiting output of du: See ```du': Estimate file space usage''. line: See ``Special settings''. line count: See ```wc': Print byte, word, and line counts''. line numbering: See ```nl': Number lines and write files''. line settings of terminal: See ```stty': Print or change terminal characteristics''. line-breaking: See ```fmt': Reformat paragraph text''. line-by-line comparison: See ```comm': Compare two sorted files line by line''. LINES: See ``Special settings''. link: See ```link': Make a hard link via the link syscall''. links, creating <1>: See ```ln': Make links between files''. links, creating: See ```link': Make a hard link via the link syscall''. Linux filesystem types: See ```df': Report filesystem disk space usage''. literal directives: See ``Literal directives''. litout: See ``Combination settings''. ln: See ```ln': Make links between files''. ln format for nl: See ```nl': Number lines and write files''. lnext: See ``Special characters''. local filesystem types: See ```df': Report filesystem disk space usage''. local settings: See ``Local settings''. logging out and continuing to run: See ```nohup': Run a command immune to hangups''. logical and operator <1>: See ``Relations for `expr'''. logical and operator: See ``Connectives for `test'''. logical connectives <1>: See ``Relations for `expr'''. logical connectives: See ``Connectives for `test'''. logical or operator <1>: See ``Relations for `expr'''. logical or operator: See ``Connectives for `test'''. logical pages, numbering on: See ```nl': Number lines and write files''. login name, printing: See ```logname': Print current login name''. login sessions, printing users with: See ```users': Print login names of users currently logged in''. login shell: See ```su': Run a command with substitute user and group id''. login shell, creating: See ```su': Run a command with substitute user and group id''. login time: See ```who': Print who is currently logged in''. LOGNAME: See ```su': Run a command with substitute user and group id''. logname: See ```logname': Print current login name''. long ls format: See ``What information is listed''. lower: See ``Specifying sets of characters''. lowercase, translating to output: See ``Output settings''. ls: See ```ls': List directory contents''. LS_BLOCK_SIZE: See ``Block size''. LS_COLORS: See ```dircolors': Color setup for `ls'''. machine type: See ```uname': Print system information''. machine-readable stty output: See ```stty': Print or change terminal characteristics''. MacKenzie, D.: See ``Introduction''. MacKenzie, David: See ``Authors of `getdate'''. Makefiles, installing programs in: See ```install': Copy files and set attributes''. manipulating files: See ``Basic operations''. manipulation of file names: See ``File name manipulation''. match: See ``String expressions''. matching patterns: See ``String expressions''. md5sum: See ```md5sum': Print or check message-digests''. mebibyte, definition of: See ``Block size''. megabyte, definition of: See ``Block size''. merging files: See ```paste': Merge lines of files''. merging files in parallel: See ```pr': Paginate or columnate files for printing''. merging sorted files: See ```sort': Sort text files''. message status: See ```who': Print who is currently logged in''. message-digest, 128-bit: See ```md5sum': Print or check message-digests''. Meyering, J.: See ``Introduction''. Meyering, Jim: See ``Authors of `getdate'''. midnight in date strings: See ``Time of day items''. min: See ``Special settings''. minute in date strings: See ``Relative items in date strings''. minutes, time zone correction by: See ``Time of day items''. MIT AI lab: See ```su': Run a command with substitute user and group id''. mkdir: See ```mkdir': Make directories''. mkfifo: See ```mkfifo': Make FIFOs (named pipes)''. mknod: See ```mknod': Make block or character special files''. modem control: See ``Control settings''. modes and umask: See ``The Umask and Protection''. modes of created directories, setting: See ```mkdir': Make directories''. modes of created FIFOs, setting: See ```mkfifo': Make FIFOs (named pipes)''. modification time, sorting files by: See ``Sorting the output''. modified command invocation: See ``Modified command invocation''. modified environment, running a program in a: See ```env': Run a command in a modified environment''. modify time, changing: See ```touch': Change file timestamps''. modifying scheduling priority: See ```nice': Run a command with modified scheduling priority''. month in date strings: See ``Relative items in date strings''. month names in date strings: See ``Calendar date items''. months, sorting by: See ```sort': Sort text files''. months, written-out: See ``General date syntax''. MS-DOS filesystem: See ```df': Report filesystem disk space usage''. mtime, changing: See ```touch': Change file timestamps''. multicolumn output, generating: See ```pr': Paginate or columnate files for printing''. multiple changes to permissions: See ``Making Multiple Changes''. multiplication: See ``Numeric expressions''. multipliers after numbers: See ```dd': Convert and copy a file''. mv: See ```mv': Move (rename) files''. name follow option: See ```tail': Output the last part of files''. name of kernel: See ```uname': Print system information''. named pipe check: See ``File type tests''. named pipes, creating: See ```mkfifo': Make FIFOs (named pipes)''. network node name: See ```uname': Print system information''. newer files, moving only: See ```mv': Move (rename) files''. newer-than file check: See ``File characteristic tests''. newline echoing after kill: See ``Local settings''. newline, echoing: See ``Local settings''. newline, translating to crlf: See ``Output settings''. newline, translating to return: See ``Input settings''. next DAY <1>: See ``Day of week items''. next DAY: See ``Options for `date'''. next in date strings: See ``General date syntax''. NFS filesystem type: See ```df': Report filesystem disk space usage''. NFS mounts from BSD to HP-UX <1>: See ```du': Estimate file space usage''. NFS mounts from BSD to HP-UX: See ``What information is listed''. nice: See ```nice': Run a command with modified scheduling priority''. nl <1>: See ``Combination settings''. nl: See ```nl': Number lines and write files''. nlN: See ``Output settings''. no-op: See ```true': Do nothing, successfully''. node name: See ```uname': Print system information''. noerror: See ```dd': Convert and copy a file''. noflsh: See ``Local settings''. nohup: See ```nohup': Run a command immune to hangups''. nohup.out: See ```nohup': Run a command immune to hangups''. non-directories, copying as special files: See ```cp': Copy files and directories''. non-directory suffix, stripping: See ```dirname': Strip non-directory suffix from a file name''. none backup method: See ``Backup options''. none color option: See ``General output formatting''. none, sorting option for ls: See ``Sorting the output''. nonempty file check: See ``File characteristic tests''. nonprinting characters, ignoring: See ```sort': Sort text files''. nonzero-length string check: See ``String tests''. noon in date strings: See ``Time of day items''. not-equal string check: See ``String tests''. notrunc: See ```dd': Convert and copy a file''. now in date strings: See ``Relative items in date strings''. numbered backup method: See ``Backup options''. numbering lines: See ```nl': Number lines and write files''. numbers, written-out: See ``General date syntax''. numeric expressions: See ``Numeric expressions''. numeric field padding: See ``Padding''. numeric modes: See ``Numeric Modes''. numeric operations: See ``Numeric operations''. numeric sequences: See ```seq': Print numeric sequences''. numeric sort: See ```sort': Sort text files''. numeric tests: See ``Numeric tests''. numeric uid and gid: See ``What information is listed''. obs: See ```dd': Convert and copy a file''. ocrnl: See ``Output settings''. octal dump of files: See ```od': Write files in octal or other formats''. octal numbers for file modes: See ``Numeric Modes''. od: See ```od': Write files in octal or other formats''. odd parity: See ``Control settings''. oddp: See ``Combination settings''. of: See ```dd': Convert and copy a file''. ofdel: See ``Output settings''. ofill: See ``Output settings''. olcuc: See ``Output settings''. older-than file check: See ``File characteristic tests''. one filesystem, restricting du to: See ```du': Estimate file space usage''. one-line output format: See ```df': Report filesystem disk space usage''. onlcr: See ``Output settings''. onlret: See ``Output settings''. onocr: See ``Output settings''. operating on characters: See ``Operating on characters''. operating on sorted files: See ``Operating on sorted files''. operating system name: See ```uname': Print system information''. opost: See ``Output settings''. option delimiter: See ``Common options''. options for date: See ``Options for `date'''. or operator <1>: See ``Relations for `expr'''. or operator: See ``Connectives for `test'''. ordinal numbers: See ``General date syntax''. ospeed: See ``Special settings''. other permissions: See ``Setting Permissions''. output block size: See ```dd': Convert and copy a file''. output file name prefix <1>: See ```csplit': Split a file into context-determined pieces''. output file name prefix: See ```split': Split a file into fixed-size pieces''. output file name suffix: See ```csplit': Split a file into context-determined pieces''. output format: See ```stat': Report file or filesystem status''. output format, portable: See ```df': Report filesystem disk space usage''. output of entire files: See ``Output of entire files''. output of parts of files: See ``Output of parts of files''. output settings: See ``Output settings''. output tabs: See ```pr': Paginate or columnate files for printing''. overwriting of input, allowed: See ```sort': Sort text files''. owned by effective gid check: See ``Access permission tests''. owned by effective uid check: See ``Access permission tests''. owner of file, permissions for: See ``Setting Permissions''. owner, default: See ``Structure of File Permissions''. ownership of installed files, setting: See ```install': Copy files and set attributes''. p for FIFO file: See ```mknod': Make block or character special files''. pad character: See ``Output settings''. pad instead of timing for delaying: See ``Output settings''. padding of numeric fields: See ``Padding''. paragraphs, reformatting: See ```fmt': Reformat paragraph text''. parenb: See ``Control settings''. parent directories and cp: See ```cp': Copy files and directories''. parent directories, creating: See ```mkdir': Make directories''. parent directories, creating missing: See ```install': Copy files and set attributes''. parent directories, removing: See ```rmdir': Remove empty directories''. parentheses for grouping: See ```expr': Evaluate expressions''. parity: See ``Combination settings''. parity errors, marking: See ``Input settings''. parity, ignoring: See ``Input settings''. parmrk: See ``Input settings''. parodd: See ``Control settings''. parsing date strings: See ``Options for `date'''. parts of files, output of: See ``Output of parts of files''. pass8: See ``Combination settings''. passwd entry, and su shell: See ```su': Run a command with substitute user and group id''. paste: See ```paste': Merge lines of files''. Paterson, R.: See ``Introduction''. PATH <1>: See ```su': Run a command with substitute user and group id''. PATH: See ```env': Run a command in a modified environment''. pathchk: See ```pathchk': Check file name portability''. pattern matching: See ``String expressions''. PC filesystem: See ```df': Report filesystem disk space usage''. pcfs: See ```df': Report filesystem disk space usage''. pebibyte, definition of: See ``Block size''. permission tests: See ``Access permission tests''. permissions of installed files, setting: See ```install': Copy files and set attributes''. permissions, changing access: See ```chmod': Change access permissions''. permissions, copying existing: See ``Copying Existing Permissions''. permissions, for changing file timestamps: See ```touch': Change file timestamps''. permissions, output by ls: See ``What information is listed''. petabyte, definition of: See ``Block size''. phone directory order: See ```sort': Sort text files''. pieces, splitting a file into: See ```split': Split a file into fixed-size pieces''. Pinard, F. <1>: See ``Authors of `getdate'''. Pinard, F.: See ``Introduction''. pipe fitting: See ```tee': Redirect output to multiple files''. Plass, Michael F.: See ```fmt': Reformat paragraph text''. platform, hardware: See ```uname': Print system information''. pm in date strings: See ``Time of day items''. portable file names, checking for: See ```pathchk': Check file name portability''. portable output format: See ```df': Report filesystem disk space usage''. POSIX: See ``Introduction''. POSIX output format: See ```df': Report filesystem disk space usage''. POSIXLY_CORRECT <1>: See ``Warning messages''. POSIXLY_CORRECT <2>: See ```sort': Sort text files''. POSIXLY_CORRECT <3>: See ```wc': Print byte, word, and line counts''. POSIXLY_CORRECT <4>: See ```pr': Paginate or columnate files for printing''. POSIXLY_CORRECT <5>: See ``Standards conformance''. POSIXLY_CORRECT: See ``Common options''. POSIXLY_CORRECT, and block size: See ``Block size''. pr: See ```pr': Paginate or columnate files for printing''. prime factors: See ```factor': Print prime factors''. print: See ``Specifying sets of characters''. print name of current directory: See ```pwd': Print working directory''. print system information: See ```uname': Print system information''. print terminal file name: See ```tty': Print file name of terminal on standard input''. printenv: See ```printenv': Print all or some environment variables''. printf: See ```printf': Format and print data''. printing all or some environment variables: See ```printenv': Print all or some environment variables''. printing color database: See ```dircolors': Color setup for `ls'''. printing current user information: See ```who': Print who is currently logged in''. printing current usernames: See ```users': Print login names of users currently logged in''. printing groups a user is in: See ```groups': Print group names a user is in''. printing real and effective uid and gid: See ```id': Print real and effective uid and gid''. printing text: See ```echo': Print a line of text''. printing text, commands for: See ``Printing text''. printing the current time: See ```date': Print or set system date and time''. printing the effective UID: See ```whoami': Print effective user id''. printing the host identifier: See ```hostid': Print numeric host identifier.''. printing the hostname: See ```hostname': Print or set system name''. printing user's login name: See ```logname': Print current login name''. printing, preparing files for: See ```pr': Paginate or columnate files for printing''. priority, modifying: See ```nice': Run a command with modified scheduling priority''. processes, commands for controlling: See ``Process control''. prompting, and ln: See ```ln': Make links between files''. prompting, and mv: See ```mv': Move (rename) files''. prompting, and rm: See ```rm': Remove files or directories''. prompts, forcing: See ```mv': Move (rename) files''. prompts, omitting: See ```mv': Move (rename) files''. prterase: See ``Local settings''. ptx: See ```ptx': Produce permuted indexes''. punct: See ``Specifying sets of characters''. pure numbers in date strings: See ``Pure numbers in date strings''. pwd: See ```pwd': Print working directory''. quit: See ``Special characters''. quoting style: See ``Formatting the file names''. radix for file offsets: See ```od': Write files in octal or other formats''. ranges: See ``Specifying sets of characters''. raw: See ``Combination settings''. read errors, ignoring: See ```dd': Convert and copy a file''. read from stdin and write to stdout and files: See ```tee': Redirect output to multiple files''. read permission: See ``Structure of File Permissions''. read permission, symbolic: See ``Setting Permissions''. read system call, and holes: See ```cp': Copy files and directories''. readable file check: See ``Access permission tests''. real uid and gid, printing: See ```id': Print real and effective uid and gid''. recursive directory listing: See ``Which files are listed''. recursively changing access permissions: See ```chmod': Change access permissions''. recursively changing file ownership: See ```chown': Change file owner and group''. recursively changing group ownership: See ```chgrp': Change group ownership''. recursively copying directories: See ```cp': Copy files and directories''. redirection: See ``Redirection''. reformatting paragraph text: See ```fmt': Reformat paragraph text''. regular expression matching: See ``String expressions''. regular file check: See ``File type tests''. relations, numeric or string: See ``Relations for `expr'''. relative items in date strings: See ``Relative items in date strings''. release of kernel: See ```uname': Print system information''. remainder: See ``Numeric expressions''. remote hostname: See ```who': Print who is currently logged in''. removing empty directories: See ```rmdir': Remove empty directories''. removing files after shredding: See ```shred': Remove files more securely''. removing files or directories: See ```rm': Remove files or directories''. removing files or directories (via the unlink syscall): See ```unlink': Remove files via the unlink syscall''. removing permissions: See ``Setting Permissions''. repeated characters: See ``Specifying sets of characters''. repeated output of a string: See ```yes': Print a string until interrupted''. restricted deletion flag: See ``Structure of File Permissions''. restricted shell: See ```su': Run a command with substitute user and group id''. return, ignoring: See ``Input settings''. return, translating to newline <1>: See ``Output settings''. return, translating to newline: See ``Input settings''. reverse sorting <1>: See ``Sorting the output''. reverse sorting: See ```sort': Sort text files''. reversing files: See ```tac': Concatenate and write files in reverse''. rm: See ```rm': Remove files or directories''. rmdir: See ```rmdir': Remove empty directories''. rn format for nl: See ```nl': Number lines and write files''. root as default owner: See ```install': Copy files and set attributes''. root directory, running a program in a specified: See ```chroot': Run a command with a different root directory''. root, becoming: See ```su': Run a command with substitute user and group id''. rows: See ``Special settings''. rprnt: See ``Special characters''. RTS/CTS flow control: See ``Control settings''. running a program in a modified environment: See ```env': Run a command in a modified environment''. running a program in a specified root directory: See ```chroot': Run a command with a different root directory''. rz format for nl: See ```nl': Number lines and write files''. Salz, Rich: See ``Authors of `getdate'''. same file check: See ``File characteristic tests''. sane: See ``Combination settings''. scheduling priority, modifying: See ```nice': Run a command with modified scheduling priority''. screen columns: See ```fold': Wrap input lines to fit in specified width''. seconds since the epoch: See ``Time directives''. section delimiters of pages: See ```nl': Number lines and write files''. seek: See ```dd': Convert and copy a file''. self-backups: See ```cp': Copy files and directories''. send a signal to processes: See ```kill': Send a signal to processes''. sentences and line-breaking: See ```fmt': Reformat paragraph text''. separator for numbers in seq: See ```seq': Print numeric sequences''. seq: See ```seq': Print numeric sequences''. sequence of numbers: See ```seq': Print numeric sequences''. set-group-id check: See ``Access permission tests''. set-user-id check: See ``Access permission tests''. setgid: See ``Structure of File Permissions''. setting permissions: See ``Setting Permissions''. setting the hostname: See ```hostname': Print or set system name''. setting the time: See ``Setting the time''. setuid: See ``Structure of File Permissions''. setup for color: See ```dircolors': Color setup for `ls'''. sh syntax for color setup: See ```dircolors': Color setup for `ls'''. SHELL: See ```su': Run a command with substitute user and group id''. SHELL environment variable, and color: See ```dircolors': Color setup for `ls'''. shell utilities: See ``GNU Core-utils''. shred: See ```shred': Remove files more securely''. SI output <1>: See ```du': Estimate file space usage''. SI output <2>: See ```df': Report filesystem disk space usage''. SI output <3>: See ``What information is listed''. SI output: See ``Block size''. simple backup method: See ``Backup options''. SIMPLE_BACKUP_SUFFIX: See ``Backup options''. single-column output of files: See ``General output formatting''. size: See ``Special settings''. size for main memory sorting: See ```sort': Sort text files''. size of file to shred: See ```shred': Remove files more securely''. size of files, reporting: See ``What information is listed''. size of files, sorting files by: See ``Sorting the output''. skip: See ```dd': Convert and copy a file''. sleep: See ```sleep': Delay for a specified time''. socket check: See ``File type tests''. software flow control: See ``Input settings''. sort: See ```sort': Sort text files''. sort field: See ```sort': Sort text files''. sort zero-terminated lines: See ```sort': Sort text files''. sorted files, operations on: See ``Operating on sorted files''. sorting files: See ```sort': Sort text files''. sorting ls output: See ``Sorting the output''. space: See ``Specifying sets of characters''. sparse files, copying: See ```cp': Copy files and directories''. special characters: See ``Special characters''. special file types: See ``Special file types''. special files: See ```mknod': Make block or character special files''. special settings: See ``Special settings''. specifying sets of characters: See ``Specifying sets of characters''. speed: See ``Special settings''. split: See ```split': Split a file into fixed-size pieces''. splitting a file into pieces: See ```split': Split a file into fixed-size pieces''. splitting a file into pieces by context: See ```csplit': Split a file into context-determined pieces''. squeezing blank lines: See ```cat': Concatenate and write files''. squeezing repeat characters: See ``Squeezing repeats and deleting''. Stallman, R.: See ``Introduction''. standard input: See ``Common options''. standard output: See ``Common options''. start: See ``Special characters''. stat: See ```stat': Report file or filesystem status''. status time, printing or sorting by: See ``Sorting the output''. sticky: See ``Structure of File Permissions''. sticky bit check: See ``Access permission tests''. stop: See ``Special characters''. stop bits: See ``Control settings''. strftime and date: See ```date': Print or set system date and time''. string constants, outputting: See ```od': Write files in octal or other formats''. string expressions: See ``String expressions''. string tests: See ``String tests''. strip directory and suffix from file names: See ```basename': Strip directory and suffix from a file name''. stripping non-directory suffix: See ```dirname': Strip non-directory suffix from a file name''. stripping symbol table information: See ```install': Copy files and set attributes''. stripping trailing slashes <1>: See ```mv': Move (rename) files''. stripping trailing slashes: See ```cp': Copy files and directories''. stty: See ```stty': Print or change terminal characteristics''. su: See ```su': Run a command with substitute user and group id''. substitute user and group ids: See ```su': Run a command with substitute user and group id''. substr: See ``String expressions''. subtracting permissions: See ``Setting Permissions''. subtraction: See ``Numeric expressions''. successful exit: See ```true': Do nothing, successfully''. suffix, stripping from file names: See ```basename': Strip directory and suffix from a file name''. sum: See ```sum': Print checksum and block counts''. summarizing files: See ``Summarizing files''. super-user, becoming: See ```su': Run a command with substitute user and group id''. superblock, writing: See ```sync': Synchronize data on disk with memory''. supplementary groups, printing: See ```groups': Print group names a user is in''. susp: See ``Special characters''. swab (byte-swapping): See ```dd': Convert and copy a file''. swap space, saving text image in: See ``Structure of File Permissions''. swtch: See ``Special characters''. symbol table information, stripping: See ```install': Copy files and set attributes''. symbolic (soft) links, creating: See ```ln': Make links between files''. symbolic link check: See ``File type tests''. symbolic link, defined: See ```ln': Make links between files''. symbolic links and pwd: See ```pwd': Print working directory''. symbolic links, changing group: See ```chgrp': Change group ownership''. symbolic links, changing owner <1>: See ```chgrp': Change group ownership''. symbolic links, changing owner: See ```chown': Change file owner and group''. symbolic links, copying: See ```cp': Copy files and directories''. symbolic links, copying with: See ```cp': Copy files and directories''. symbolic links, dereferencing: See ``Which files are listed''. symbolic links, dereferencing in du: See ```du': Estimate file space usage''. symbolic links, dereferencing in stat: See ```stat': Report file or filesystem status''. symbolic links, permissions of: See ```chmod': Change access permissions''. symbolic modes: See ``Symbolic Modes''. sync: See ```sync': Synchronize data on disk with memory''. sync (padding with nulls): See ```dd': Convert and copy a file''. synchronize disk and memory: See ```sync': Synchronize data on disk with memory''. syslog: See ```su': Run a command with substitute user and group id''. system context: See ``System context''. system information, printing: See ```uname': Print system information''. system name, printing: See ```hostname': Print or set system name''. System V sum: See ```sum': Print checksum and block counts''. tabN: See ``Output settings''. tabs: See ``Combination settings''. tabs to spaces, converting: See ```expand': Convert tabs to spaces''. tabstops, setting: See ```expand': Convert tabs to spaces''. tac: See ```tac': Concatenate and write files in reverse''. tagged paragraphs: See ```fmt': Reformat paragraph text''. tail: See ```tail': Output the last part of files''. tandem: See ``Input settings''. target directory <1>: See ```ln': Make links between files''. target directory <2>: See ```mv': Move (rename) files''. target directory <3>: See ```install': Copy files and set attributes''. target directory <4>: See ```cp': Copy files and directories''. target directory: See ``Target directory''. tebibyte, definition of: See ``Block size''. tee: See ```tee': Redirect output to multiple files''. telephone directory order: See ```sort': Sort text files''. temporary directory: See ```sort': Sort text files''. terabyte, definition of: See ``Block size''. TERM: See ```su': Run a command with substitute user and group id''. terminal check: See ``File type tests''. terminal file name, printing: See ```tty': Print file name of terminal on standard input''. terminal lines, currently used: See ```who': Print who is currently logged in''. terminal settings: See ```stty': Print or change terminal characteristics''. terminal, using color iff: See ``General output formatting''. terse output: See ```stat': Report file or filesystem status''. test: See ```test': Check file types and compare values''. text image, saving in swap space: See ``Structure of File Permissions''. text input files: See ```md5sum': Print or check message-digests''. text utilities: See ``GNU Core-utils''. text, displaying: See ```echo': Print a line of text''. text, reformatting: See ```fmt': Reformat paragraph text''. this in date strings: See ``Relative items in date strings''. time <1>: See ``Special settings''. time: See ```touch': Change file timestamps''. time directives: See ``Time directives''. time formats <1>: See ```date': Print or set system date and time''. time formats: See ```pr': Paginate or columnate files for printing''. time of day item: See ``Time of day items''. time setting: See ``Setting the time''. time style: See ``Formatting file timestamps''. time units: See ```sleep': Delay for a specified time''. time zone correction: See ``Time of day items''. time zone item <1>: See ``Time zone items''. time zone item: See ``General date syntax''. time, printing or setting: See ```date': Print or set system date and time''. TIME_STYLE: See ``Formatting file timestamps''. timestamps of installed files, preserving: See ```install': Copy files and set attributes''. timestamps, changing file: See ```touch': Change file timestamps''. TMPDIR: See ```sort': Sort text files''. today in date strings: See ``Relative items in date strings''. tomorrow: See ``Options for `date'''. tomorrow in date strings: See ``Relative items in date strings''. topological sort: See ```tsort': Topological sort''. tostop: See ``Local settings''. total counts: See ```wc': Print byte, word, and line counts''. touch: See ```touch': Change file timestamps''. tr: See ```tr': Translate, squeeze, and/or delete characters''. trailing slashes: See ``Trailing slashes''. translating characters: See ``Translating''. true: See ```true': Do nothing, successfully''. truncating output file, avoiding: See ```dd': Convert and copy a file''. tsort: See ```tsort': Topological sort''. tty: See ```tty': Print file name of terminal on standard input''. Twenex: See ```su': Run a command with substitute user and group id''. two-way parity: See ``Control settings''. type size: See ```od': Write files in octal or other formats''. u, and disabling special characters: See ``Special characters''. ucase, converting to: See ```dd': Convert and copy a file''. ufs filesystem type: See ```df': Report filesystem disk space usage''. umask and modes: See ``The Umask and Protection''. uname: See ```uname': Print system information''. unblock: See ```dd': Convert and copy a file''. unexpand: See ```unexpand': Convert spaces to tabs''. uniq: See ```uniq': Uniquify files''. unique lines, outputting: See ```uniq': Uniquify files''. uniquify files: See ```uniq': Uniquify files''. uniquifying output: See ```sort': Sort text files''. unlink <1>: See ```unlink': Remove files via the unlink syscall''. unlink: See ```rm': Remove files or directories''. unprintable characters, ignoring: See ```sort': Sort text files''. unsorted directory listing: See ``Sorting the output''. upper: See ``Specifying sets of characters''. uppercase, translating to lowercase: See ``Input settings''. use time, changing: See ```touch': Change file timestamps''. use time, printing or sorting files by: See ``Sorting the output''. USER: See ```su': Run a command with substitute user and group id''. user id, switching: See ```su': Run a command with substitute user and group id''. user information, commands for: See ``User information''. user name, printing: See ```logname': Print current login name''. usernames, printing current: See ```users': Print login names of users currently logged in''. users: See ```users': Print login names of users currently logged in''. UTC: See ``Options for `date'''. utmp: See ```logname': Print current login name''. valid file names, checking for: See ```pathchk': Check file name portability''. vdir: See ```vdir': Verbosely list directory contents''. verbose ls format: See ``What information is listed''. verifying MD5 checksums: See ```md5sum': Print or check message-digests''. version number, finding: See ``Common options''. version of kernel: See ```uname': Print system information''. version, sorting option for ls: See ``Sorting the output''. version-control Emacs variable: See ``Backup options''. VERSION_CONTROL <1>: See ```ln': Make links between files''. VERSION_CONTROL <2>: See ```mv': Move (rename) files''. VERSION_CONTROL <3>: See ```install': Copy files and set attributes''. VERSION_CONTROL <4>: See ```cp': Copy files and directories''. VERSION_CONTROL: See ``Backup options''. vertical sorted files in columns: See ``General output formatting''. vtN: See ``Output settings''. wc: See ```wc': Print byte, word, and line counts''. week in date strings: See ``Relative items in date strings''. werase: See ``Special characters''. wheel group, not supported: See ```su': Run a command with substitute user and group id''. who: See ```who': Print who is currently logged in''. who am i: See ```who': Print who is currently logged in''. whoami: See ```whoami': Print effective user id''. word count: See ```wc': Print byte, word, and line counts''. working context: See ``Working context''. working directory, printing: See ```pwd': Print working directory''. wrapping long input lines: See ```fold': Wrap input lines to fit in specified width''. writable file check: See ``Access permission tests''. write permission: See ``Structure of File Permissions''. write permission, symbolic: See ``Setting Permissions''. write, allowed: See ```who': Print who is currently logged in''. xcase: See ``Local settings''. xdigit: See ``Specifying sets of characters''. XON/XOFF flow control: See ``Input settings''. year in date strings: See ``Relative items in date strings''. yes: See ```yes': Print a string until interrupted''. yesterday: See ``Options for `date'''. yesterday in date strings: See ``Relative items in date strings''. yottabyte, definition of: See ``Block size''. Youmans, B.: See ``Introduction''. zero-length string check: See ``String tests''. zettabyte, definition of: See ``Block size''. |: See ``Relations for `expr'''. ...Short Contents... ...Table of Contents...