1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
2 .TH SORT "1" "May 2014" "GNU coreutils 8.21" "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
77 annotate the part of the line used to sort,
78 and warn about questionable usage to stderr
80 \fB\-\-files0\-from\fR=\fIF\fR
81 read input from the files specified by
82 NUL\-terminated names in file F;
83 If F is \- then read names from standard input
85 \fB\-k\fR, \fB\-\-key\fR=\fIKEYDEF\fR
86 sort via a key; KEYDEF gives location and type
88 \fB\-m\fR, \fB\-\-merge\fR
89 merge already sorted files; do not sort
91 \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
92 write result to FILE instead of standard output
94 \fB\-s\fR, \fB\-\-stable\fR
95 stabilize sort by disabling last\-resort comparison
97 \fB\-S\fR, \fB\-\-buffer\-size\fR=\fISIZE\fR
98 use SIZE for main memory buffer
100 \fB\-t\fR, \fB\-\-field\-separator\fR=\fISEP\fR
101 use SEP instead of non\-blank to blank transition
103 \fB\-T\fR, \fB\-\-temporary\-directory\fR=\fIDIR\fR
104 use DIR for temporaries, not $TMPDIR or /tmp;
105 multiple options specify multiple directories
107 \fB\-\-parallel\fR=\fIN\fR
108 change the number of sorts run concurrently to N
110 \fB\-u\fR, \fB\-\-unique\fR
111 with \fB\-c\fR, check for strict ordering;
112 without \fB\-c\fR, output only the first of an equal run
114 \fB\-z\fR, \fB\-\-zero\-terminated\fR
115 end lines with 0 byte, not newline
118 display this help and exit
121 output version information and exit
123 KEYDEF is F[.C][OPTS][,F[.C][OPTS]] for start and stop position, where F is a
124 field number and C a character position in the field; both are origin 1, and
125 the stop position defaults to the line's end. If neither \fB\-t\fR nor \fB\-b\fR is in
126 effect, characters in a field are counted from the beginning of the preceding
127 whitespace. OPTS is one or more single\-letter ordering options [bdfgiMhnRrV],
128 which override global ordering options for that key. If no key is given, use
129 the entire line as the key.
131 SIZE may be followed by the following multiplicative suffixes:
132 % 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y.
134 With no FILE, or when FILE is \-, read standard input.
137 The locale specified by the environment affects sort order.
138 Set LC_ALL=C to get the traditional sort order that uses
141 Written by Mike Haertel and Paul Eggert.
143 Report sort bugs to bug\-coreutils@gnu.org
145 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
147 General help using GNU software: <http://www.gnu.org/gethelp/>
149 Report sort translation bugs to <http://translationproject.org/team/>
151 Copyright \(co 2013 Free Software Foundation, Inc.
152 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
154 This is free software: you are free to change and redistribute it.
155 There is NO WARRANTY, to the extent permitted by law.
159 The full documentation for
161 is maintained as a Texinfo manual. If the
165 programs are properly installed at your site, the command
167 .B info coreutils \(aqsort invocation\(aq
169 should give you access to the complete manual.