1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
2 .TH SORT "1" "January 2016" "GNU coreutils 8.25" "User Commands"
4 sort \- sort lines of text files
7 [\fI\,OPTION\/\fR]... [\fI\,FILE\/\fR]...
10 [\fI\,OPTION\/\fR]... \fI\,--files0-from=F\/\fR
12 .\" Add any additional description here
14 Write sorted concatenation of all FILE(s) to standard output.
16 With no FILE, or when FILE is \-, read standard input.
18 Mandatory arguments to long options are mandatory for short options too.
21 \fB\-b\fR, \fB\-\-ignore\-leading\-blanks\fR
24 \fB\-d\fR, \fB\-\-dictionary\-order\fR
25 consider only blanks and alphanumeric characters
27 \fB\-f\fR, \fB\-\-ignore\-case\fR
28 fold lower case to upper case characters
30 \fB\-g\fR, \fB\-\-general\-numeric\-sort\fR
31 compare according to general numerical value
33 \fB\-i\fR, \fB\-\-ignore\-nonprinting\fR
34 consider only printable characters
36 \fB\-M\fR, \fB\-\-month\-sort\fR
37 compare (unknown) < 'JAN' < ... < 'DEC'
39 \fB\-h\fR, \fB\-\-human\-numeric\-sort\fR
40 compare human readable numbers (e.g., 2K 1G)
42 \fB\-n\fR, \fB\-\-numeric\-sort\fR
43 compare according to string numerical value
45 \fB\-R\fR, \fB\-\-random\-sort\fR
46 shuffle, but group identical keys. See shuf(1)
48 \fB\-\-random\-source\fR=\fI\,FILE\/\fR
49 get random bytes from FILE
51 \fB\-r\fR, \fB\-\-reverse\fR
52 reverse the result of comparisons
54 \fB\-\-sort\fR=\fI\,WORD\/\fR
55 sort according to WORD:
56 general\-numeric \fB\-g\fR, human\-numeric \fB\-h\fR, month \fB\-M\fR,
57 numeric \fB\-n\fR, random \fB\-R\fR, version \fB\-V\fR
59 \fB\-V\fR, \fB\-\-version\-sort\fR
60 natural sort of (version) numbers within text
64 \fB\-\-batch\-size\fR=\fI\,NMERGE\/\fR
65 merge at most NMERGE inputs at once;
66 for more use temp files
68 \fB\-c\fR, \fB\-\-check\fR, \fB\-\-check\fR=\fI\,diagnose\-first\/\fR
69 check for sorted input; do not sort
71 \fB\-C\fR, \fB\-\-check\fR=\fI\,quiet\/\fR, \fB\-\-check\fR=\fI\,silent\/\fR
72 like \fB\-c\fR, but do not report first bad line
74 \fB\-\-compress\-program\fR=\fI\,PROG\/\fR
75 compress temporaries with PROG;
76 decompress them with PROG \fB\-d\fR
79 annotate the part of the line used to sort,
80 and warn about questionable usage to stderr
82 \fB\-\-files0\-from\fR=\fI\,F\/\fR
83 read input from the files specified by
84 NUL\-terminated names in file F;
85 If F is \- then read names from standard input
87 \fB\-k\fR, \fB\-\-key\fR=\fI\,KEYDEF\/\fR
88 sort via a key; KEYDEF gives location and type
90 \fB\-m\fR, \fB\-\-merge\fR
91 merge already sorted files; do not sort
93 \fB\-o\fR, \fB\-\-output\fR=\fI\,FILE\/\fR
94 write result to FILE instead of standard output
96 \fB\-s\fR, \fB\-\-stable\fR
97 stabilize sort by disabling last\-resort comparison
99 \fB\-S\fR, \fB\-\-buffer\-size\fR=\fI\,SIZE\/\fR
100 use SIZE for main memory buffer
102 \fB\-t\fR, \fB\-\-field\-separator\fR=\fI\,SEP\/\fR
103 use SEP instead of non\-blank to blank transition
105 \fB\-T\fR, \fB\-\-temporary\-directory\fR=\fI\,DIR\/\fR
106 use DIR for temporaries, not $TMPDIR or \fI\,/tmp\/\fP;
107 multiple options specify multiple directories
109 \fB\-\-parallel\fR=\fI\,N\/\fR
110 change the number of sorts run concurrently to N
112 \fB\-u\fR, \fB\-\-unique\fR
113 with \fB\-c\fR, check for strict ordering;
114 without \fB\-c\fR, output only the first of an equal run
116 \fB\-z\fR, \fB\-\-zero\-terminated\fR
117 line delimiter is NUL, not newline
120 display this help and exit
123 output version information and exit
125 KEYDEF is F[.C][OPTS][,F[.C][OPTS]] for start and stop position, where F is a
126 field number and C a character position in the field; both are origin 1, and
127 the stop position defaults to the line's end. If neither \fB\-t\fR nor \fB\-b\fR is in
128 effect, characters in a field are counted from the beginning of the preceding
129 whitespace. OPTS is one or more single\-letter ordering options [bdfgiMhnRrV],
130 which override global ordering options for that key. If no key is given, use
131 the entire line as the key. Use \fB\-\-debug\fR to diagnose incorrect key usage.
133 SIZE may be followed by the following multiplicative suffixes:
134 % 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y.
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 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
145 Report sort translation bugs to <http://translationproject.org/team/>
147 Copyright \(co 2016 Free Software Foundation, Inc.
148 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
150 This is free software: you are free to change and redistribute it.
151 There is NO WARRANTY, to the extent permitted by law.
156 Full documentation at: <http://www.gnu.org/software/coreutils/sort>
158 or available locally via: info \(aq(coreutils) sort invocation\(aq