1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
2 .TH SORT "1" "April 2010" "GNU coreutils 8.5" "User Commands"
4 sort \- sort lines of text files
7 [\fIOPTION\fR]... [\fIFILE\fR]...
10 [\fIOPTION\fR]... \fI--files0-from=F\fR
12 .\" Add any additional description here
14 Write sorted concatenation of all FILE(s) to standard output.
16 Mandatory arguments to long options are mandatory for short options too.
19 \fB\-b\fR, \fB\-\-ignore\-leading\-blanks\fR
22 \fB\-d\fR, \fB\-\-dictionary\-order\fR
23 consider only blanks and alphanumeric characters
25 \fB\-f\fR, \fB\-\-ignore\-case\fR
26 fold lower case to upper case characters
28 \fB\-g\fR, \fB\-\-general\-numeric\-sort\fR
29 compare according to general numerical value
31 \fB\-i\fR, \fB\-\-ignore\-nonprinting\fR
32 consider only printable characters
34 \fB\-M\fR, \fB\-\-month\-sort\fR
35 compare (unknown) < `JAN' < ... < `DEC'
37 \fB\-h\fR, \fB\-\-human\-numeric\-sort\fR
38 compare human readable numbers (e.g., 2K 1G)
40 \fB\-n\fR, \fB\-\-numeric\-sort\fR
41 compare according to string numerical value
43 \fB\-R\fR, \fB\-\-random\-sort\fR
44 sort by random hash of keys
46 \fB\-\-random\-source\fR=\fIFILE\fR
47 get random bytes from FILE
49 \fB\-r\fR, \fB\-\-reverse\fR
50 reverse the result of comparisons
52 \fB\-\-sort\fR=\fIWORD\fR
53 sort according to WORD:
54 general\-numeric \fB\-g\fR, human\-numeric \fB\-h\fR, month \fB\-M\fR,
55 numeric \fB\-n\fR, random \fB\-R\fR, version \fB\-V\fR
57 \fB\-V\fR, \fB\-\-version\-sort\fR
58 natural sort of (version) numbers within text
62 \fB\-\-batch\-size\fR=\fINMERGE\fR
63 merge at most NMERGE inputs at once;
64 for more use temp files
66 \fB\-c\fR, \fB\-\-check\fR, \fB\-\-check\fR=\fIdiagnose\-first\fR
67 check for sorted input; do not sort
69 \fB\-C\fR, \fB\-\-check\fR=\fIquiet\fR, \fB\-\-check\fR=\fIsilent\fR
70 like \fB\-c\fR, but do not report first bad line
72 \fB\-\-compress\-program\fR=\fIPROG\fR
73 compress temporaries with PROG;
74 decompress them with PROG \fB\-d\fR
76 \fB\-\-files0\-from\fR=\fIF\fR
77 read input from the files specified by
78 NUL\-terminated names in file F;
79 If F is \- then read names from standard input
81 \fB\-k\fR, \fB\-\-key\fR=\fIPOS1[\fR,POS2]
82 start a key at POS1 (origin 1), end it at POS2
85 \fB\-m\fR, \fB\-\-merge\fR
86 merge already sorted files; do not sort
88 \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
89 write result to FILE instead of standard output
91 \fB\-s\fR, \fB\-\-stable\fR
92 stabilize sort by disabling last\-resort comparison
94 \fB\-S\fR, \fB\-\-buffer\-size\fR=\fISIZE\fR
95 use SIZE for main memory buffer
97 \fB\-t\fR, \fB\-\-field\-separator\fR=\fISEP\fR
98 use SEP instead of non\-blank to blank transition
100 \fB\-T\fR, \fB\-\-temporary\-directory\fR=\fIDIR\fR
101 use DIR for temporaries, not $TMPDIR or /tmp;
102 multiple options specify multiple directories
104 \fB\-u\fR, \fB\-\-unique\fR
105 with \fB\-c\fR, check for strict ordering;
106 without \fB\-c\fR, output only the first of an equal run
108 \fB\-z\fR, \fB\-\-zero\-terminated\fR
109 end lines with 0 byte, not newline
112 display this help and exit
115 output version information and exit
117 POS is F[.C][OPTS], where F is the field number and C the character position
118 in the field; both are origin 1. If neither \fB\-t\fR nor \fB\-b\fR is in effect, characters
119 in a field are counted from the beginning of the preceding whitespace. OPTS is
120 one or more single\-letter ordering options, which override global ordering
121 options for that key. If no key is given, use the entire line as the key.
123 SIZE may be followed by the following multiplicative suffixes:
124 % 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y.
126 With no FILE, or when FILE is \-, read standard input.
129 The locale specified by the environment affects sort order.
130 Set LC_ALL=C to get the traditional sort order that uses
133 Written by Mike Haertel and Paul Eggert.
135 Report sort bugs to bug\-coreutils@gnu.org
137 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
139 General help using GNU software: <http://www.gnu.org/gethelp/>
141 Report sort translation bugs to <http://translationproject.org/team/>
143 Copyright \(co 2010 Free Software Foundation, Inc.
144 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
146 This is free software: you are free to change and redistribute it.
147 There is NO WARRANTY, to the extent permitted by law.
149 The full documentation for
151 is maintained as a Texinfo manual. If the
155 programs are properly installed at your site, the command
157 .B info coreutils \(aqsort invocation\(aq
159 should give you access to the complete manual.