OSDN Git Service

Update translations: chroot, csplit, dd, du, pwd
[linuxjm/coreutils.git] / original / man1 / sort.1
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"
3 .SH NAME
4 sort \- sort lines of text files
5 .SH SYNOPSIS
6 .B sort
7 [\fI\,OPTION\/\fR]... [\fI\,FILE\/\fR]...
8 .br
9 .B sort
10 [\fI\,OPTION\/\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 With no FILE, or when FILE is \-, read standard input.
17 .PP
18 Mandatory arguments to long options are mandatory for short options too.
19 Ordering options:
20 .TP
21 \fB\-b\fR, \fB\-\-ignore\-leading\-blanks\fR
22 ignore leading blanks
23 .TP
24 \fB\-d\fR, \fB\-\-dictionary\-order\fR
25 consider only blanks and alphanumeric characters
26 .TP
27 \fB\-f\fR, \fB\-\-ignore\-case\fR
28 fold lower case to upper case characters
29 .TP
30 \fB\-g\fR, \fB\-\-general\-numeric\-sort\fR
31 compare according to general numerical value
32 .TP
33 \fB\-i\fR, \fB\-\-ignore\-nonprinting\fR
34 consider only printable characters
35 .TP
36 \fB\-M\fR, \fB\-\-month\-sort\fR
37 compare (unknown) < 'JAN' < ... < 'DEC'
38 .TP
39 \fB\-h\fR, \fB\-\-human\-numeric\-sort\fR
40 compare human readable numbers (e.g., 2K 1G)
41 .TP
42 \fB\-n\fR, \fB\-\-numeric\-sort\fR
43 compare according to string numerical value
44 .TP
45 \fB\-R\fR, \fB\-\-random\-sort\fR
46 shuffle, but group identical keys.  See shuf(1)
47 .TP
48 \fB\-\-random\-source\fR=\fI\,FILE\/\fR
49 get random bytes from FILE
50 .TP
51 \fB\-r\fR, \fB\-\-reverse\fR
52 reverse the result of comparisons
53 .TP
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
58 .TP
59 \fB\-V\fR, \fB\-\-version\-sort\fR
60 natural sort of (version) numbers within text
61 .PP
62 Other options:
63 .TP
64 \fB\-\-batch\-size\fR=\fI\,NMERGE\/\fR
65 merge at most NMERGE inputs at once;
66 for more use temp files
67 .TP
68 \fB\-c\fR, \fB\-\-check\fR, \fB\-\-check\fR=\fI\,diagnose\-first\/\fR
69 check for sorted input; do not sort
70 .TP
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
73 .TP
74 \fB\-\-compress\-program\fR=\fI\,PROG\/\fR
75 compress temporaries with PROG;
76 decompress them with PROG \fB\-d\fR
77 .TP
78 \fB\-\-debug\fR
79 annotate the part of the line used to sort,
80 and warn about questionable usage to stderr
81 .TP
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
86 .TP
87 \fB\-k\fR, \fB\-\-key\fR=\fI\,KEYDEF\/\fR
88 sort via a key; KEYDEF gives location and type
89 .TP
90 \fB\-m\fR, \fB\-\-merge\fR
91 merge already sorted files; do not sort
92 .TP
93 \fB\-o\fR, \fB\-\-output\fR=\fI\,FILE\/\fR
94 write result to FILE instead of standard output
95 .TP
96 \fB\-s\fR, \fB\-\-stable\fR
97 stabilize sort by disabling last\-resort comparison
98 .TP
99 \fB\-S\fR, \fB\-\-buffer\-size\fR=\fI\,SIZE\/\fR
100 use SIZE for main memory buffer
101 .TP
102 \fB\-t\fR, \fB\-\-field\-separator\fR=\fI\,SEP\/\fR
103 use SEP instead of non\-blank to blank transition
104 .TP
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
108 .TP
109 \fB\-\-parallel\fR=\fI\,N\/\fR
110 change the number of sorts run concurrently to N
111 .TP
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
115 .TP
116 \fB\-z\fR, \fB\-\-zero\-terminated\fR
117 line delimiter is NUL, not newline
118 .TP
119 \fB\-\-help\fR
120 display this help and exit
121 .TP
122 \fB\-\-version\fR
123 output version information and exit
124 .PP
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.
132 .PP
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.
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 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
144 .br
145 Report sort translation bugs to <http://translationproject.org/team/>
146 .SH COPYRIGHT
147 Copyright \(co 2016 Free Software Foundation, Inc.
148 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
149 .br
150 This is free software: you are free to change and redistribute it.
151 There is NO WARRANTY, to the extent permitted by law.
152 .SH "SEE ALSO"
153 shuf(1), uniq(1)
154 .PP
155 .br
156 Full documentation at: <http://www.gnu.org/software/coreutils/sort>
157 .br
158 or available locally via: info \(aq(coreutils) sort invocation\(aq