OSDN Git Service

GNU_coreutils: Update originals to version 8.16.
[linuxjm/jm.git] / manual / GNU_coreutils / original / man1 / sort.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.35.
2 .TH SORT "1" "March 2012" "GNU coreutils 8.16" "User Commands"
3 .SH NAME
4 sort \- sort lines of text files
5 .SH SYNOPSIS
6 .B sort
7 [\fIOPTION\fR]... [\fIFILE\fR]...
8 .br
9 .B sort
10 [\fIOPTION\fR]... \fI--files0-from=F\fR
11 .SH DESCRIPTION
12 .\" Add any additional description here
13 .PP
14 Write sorted concatenation of all FILE(s) to standard output.
15 .PP
16 Mandatory arguments to long options are mandatory for short options too.
17 Ordering options:
18 .TP
19 \fB\-b\fR, \fB\-\-ignore\-leading\-blanks\fR
20 ignore leading blanks
21 .TP
22 \fB\-d\fR, \fB\-\-dictionary\-order\fR
23 consider only blanks and alphanumeric characters
24 .TP
25 \fB\-f\fR, \fB\-\-ignore\-case\fR
26 fold lower case to upper case characters
27 .TP
28 \fB\-g\fR, \fB\-\-general\-numeric\-sort\fR
29 compare according to general numerical value
30 .TP
31 \fB\-i\fR, \fB\-\-ignore\-nonprinting\fR
32 consider only printable characters
33 .TP
34 \fB\-M\fR, \fB\-\-month\-sort\fR
35 compare (unknown) < 'JAN' < ... < 'DEC'
36 .TP
37 \fB\-h\fR, \fB\-\-human\-numeric\-sort\fR
38 compare human readable numbers (e.g., 2K 1G)
39 .TP
40 \fB\-n\fR, \fB\-\-numeric\-sort\fR
41 compare according to string numerical value
42 .TP
43 \fB\-R\fR, \fB\-\-random\-sort\fR
44 sort by random hash of keys
45 .TP
46 \fB\-\-random\-source\fR=\fIFILE\fR
47 get random bytes from FILE
48 .TP
49 \fB\-r\fR, \fB\-\-reverse\fR
50 reverse the result of comparisons
51 .TP
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
56 .TP
57 \fB\-V\fR, \fB\-\-version\-sort\fR
58 natural sort of (version) numbers within text
59 .PP
60 Other options:
61 .TP
62 \fB\-\-batch\-size\fR=\fINMERGE\fR
63 merge at most NMERGE inputs at once;
64 for more use temp files
65 .TP
66 \fB\-c\fR, \fB\-\-check\fR, \fB\-\-check\fR=\fIdiagnose\-first\fR
67 check for sorted input; do not sort
68 .TP
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
71 .TP
72 \fB\-\-compress\-program\fR=\fIPROG\fR
73 compress temporaries with PROG;
74 decompress them with PROG \fB\-d\fR
75 .TP
76 \fB\-\-debug\fR
77 annotate the part of the line used to sort,
78 and warn about questionable usage to stderr
79 .TP
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
84 .TP
85 \fB\-k\fR, \fB\-\-key\fR=\fIKEYDEF\fR
86 sort via a key; KEYDEF gives location and type
87 .TP
88 \fB\-m\fR, \fB\-\-merge\fR
89 merge already sorted files; do not sort
90 .TP
91 \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
92 write result to FILE instead of standard output
93 .TP
94 \fB\-s\fR, \fB\-\-stable\fR
95 stabilize sort by disabling last\-resort comparison
96 .TP
97 \fB\-S\fR, \fB\-\-buffer\-size\fR=\fISIZE\fR
98 use SIZE for main memory buffer
99 .TP
100 \fB\-t\fR, \fB\-\-field\-separator\fR=\fISEP\fR
101 use SEP instead of non\-blank to blank transition
102 .TP
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
106 .TP
107 \fB\-\-parallel\fR=\fIN\fR
108 change the number of sorts run concurrently to N
109 .TP
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
113 .TP
114 \fB\-z\fR, \fB\-\-zero\-terminated\fR
115 end lines with 0 byte, not newline
116 .TP
117 \fB\-\-help\fR
118 display this help and exit
119 .TP
120 \fB\-\-version\fR
121 output version information and exit
122 .PP
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.
130 .PP
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.
133 .PP
134 With no FILE, or when FILE is \-, read standard input.
135 .PP
136 *** WARNING ***
137 The locale specified by the environment affects sort order.
138 Set LC_ALL=C to get the traditional sort order that uses
139 native byte values.
140 .SH AUTHOR
141 Written by Mike Haertel and Paul Eggert.
142 .SH "REPORTING BUGS"
143 Report sort bugs to bug\-coreutils@gnu.org
144 .br
145 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
146 .br
147 General help using GNU software: <http://www.gnu.org/gethelp/>
148 .br
149 Report sort translation bugs to <http://translationproject.org/team/>
150 .SH COPYRIGHT
151 Copyright \(co 2012 Free Software Foundation, Inc.
152 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
153 .br
154 This is free software: you are free to change and redistribute it.
155 There is NO WARRANTY, to the extent permitted by law.
156 .SH "SEE ALSO"
157 The full documentation for
158 .B sort
159 is maintained as a Texinfo manual.  If the
160 .B info
161 and
162 .B sort
163 programs are properly installed at your site, the command
164 .IP
165 .B info coreutils \(aqsort invocation\(aq
166 .PP
167 should give you access to the complete manual.