Tizen 2.0 Release
[external/tizen-coreutils.git] / man / sort.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.35.
2 .TH SORT "1" "March 2007" "GNU coreutils 6.9" "User Commands"
3 .SH NAME
4 sort \- sort lines of text files
5 .SH SYNOPSIS
6 .B sort
7 [\fIOPTION\fR]... [\fIFILE\fR]...
8 .SH DESCRIPTION
9 .\" Add any additional description here
10 .PP
11 Write sorted concatenation of all FILE(s) to standard output.
12 .PP
13 Mandatory arguments to long options are mandatory for short options too.
14 Ordering options:
15 .TP
16 \fB\-b\fR, \fB\-\-ignore\-leading\-blanks\fR
17 ignore leading blanks
18 .TP
19 \fB\-d\fR, \fB\-\-dictionary\-order\fR
20 consider only blanks and alphanumeric characters
21 .TP
22 \fB\-f\fR, \fB\-\-ignore\-case\fR
23 fold lower case to upper case characters
24 .TP
25 \fB\-g\fR, \fB\-\-general\-numeric\-sort\fR
26 compare according to general numerical value
27 .TP
28 \fB\-i\fR, \fB\-\-ignore\-nonprinting\fR
29 consider only printable characters
30 .TP
31 \fB\-M\fR, \fB\-\-month\-sort\fR
32 compare (unknown) < `JAN' < ... < `DEC'
33 .TP
34 \fB\-n\fR, \fB\-\-numeric\-sort\fR
35 compare according to string numerical value
36 .TP
37 \fB\-R\fR, \fB\-\-random\-sort\fR
38 sort by random hash of keys
39 .TP
40 \fB\-\-random\-source\fR=\fIFILE\fR
41 get random bytes from FILE (default /dev/urandom)
42 .TP
43 \fB\-r\fR, \fB\-\-reverse\fR
44 reverse the result of comparisons
45 .PP
46 Other options:
47 .TP
48 \fB\-c\fR, \fB\-\-check\fR, \fB\-\-check\fR=\fIdiagnose\-first\fR
49 check for sorted input; do not sort
50 .TP
51 \fB\-C\fR, \fB\-\-check\fR=\fIquiet\fR, \fB\-\-check\fR=\fIsilent\fR
52 like \fB\-c\fR, but do not report first bad line
53 .TP
54 \fB\-\-compress\-program\fR=\fIPROG\fR
55 compress temporaries with PROG;
56 decompress them with PROG \fB\-d\fR
57 .TP
58 \fB\-k\fR, \fB\-\-key\fR=\fIPOS1[\fR,POS2]
59 start a key at POS1, end it at POS2 (origin 1)
60 .TP
61 \fB\-m\fR, \fB\-\-merge\fR
62 merge already sorted files; do not sort
63 .TP
64 \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
65 write result to FILE instead of standard output
66 .TP
67 \fB\-s\fR, \fB\-\-stable\fR
68 stabilize sort by disabling last\-resort comparison
69 .TP
70 \fB\-S\fR, \fB\-\-buffer\-size\fR=\fISIZE\fR
71 use SIZE for main memory buffer
72 .TP
73 \fB\-t\fR, \fB\-\-field\-separator\fR=\fISEP\fR
74 use SEP instead of non\-blank to blank transition
75 .TP
76 \fB\-T\fR, \fB\-\-temporary\-directory\fR=\fIDIR\fR
77 use DIR for temporaries, not $TMPDIR or /tmp;
78 multiple options specify multiple directories
79 .TP
80 \fB\-u\fR, \fB\-\-unique\fR
81 with \fB\-c\fR, check for strict ordering;
82 without \fB\-c\fR, output only the first of an equal run
83 .TP
84 \fB\-z\fR, \fB\-\-zero\-terminated\fR
85 end lines with 0 byte, not newline
86 .TP
87 \fB\-\-help\fR
88 display this help and exit
89 .TP
90 \fB\-\-version\fR
91 output version information and exit
92 .PP
93 POS is F[.C][OPTS], where F is the field number and C the character position
94 in the field; both are origin 1.  If neither \fB\-t\fR nor \fB\-b\fR is in effect, characters
95 in a field are counted from the beginning of the preceding whitespace.  OPTS is
96 one or more single\-letter ordering options, which override global ordering
97 options for that key.  If no key is given, use the entire line as the key.
98 .PP
99 SIZE may be followed by the following multiplicative suffixes:
100 % 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y.
101 .PP
102 With no FILE, or when FILE is \-, read standard input.
103 .PP
104 *** WARNING ***
105 The locale specified by the environment affects sort order.
106 Set LC_ALL=C to get the traditional sort order that uses
107 native byte values.
108 .SH AUTHOR
109 Written by Mike Haertel and Paul Eggert.
110 .SH "REPORTING BUGS"
111 Report bugs to <bug\-coreutils@gnu.org>.
112 .SH COPYRIGHT
113 Copyright \(co 2007 Free Software Foundation, Inc.
114 .br
115 This is free software.  You may redistribute copies of it under the terms of
116 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
117 There is NO WARRANTY, to the extent permitted by law.
118 .SH "SEE ALSO"
119 The full documentation for
120 .B sort
121 is maintained as a Texinfo manual.  If the
122 .B info
123 and
124 .B sort
125 programs are properly installed at your site, the command
126 .IP
127 .B info sort
128 .PP
129 should give you access to the complete manual.