並べ替えユーティリティ
sort
- C:\Windows\system32\sort.exe /?
Output:
SORT [/R] [/+n] [/M KB] [/L ロケール] [/REC レコードバイト]
[[ドライブ1:][パス1]ファイル名1] [/T [ドライブ2:][パス2]]
[/O [ドライブ3:][パス3]ファイル名3]
/+n 各行の比較を始める文字番号 n を指定します。
/+3 は、各行の 3 番目の文字から比較を始める
ことを意味します。n 文字より少ない行は、ほかの
行より前に照合されます。
既定では、比較はそれぞれの行の最初から始め
ます。
/L[OCALE] ロケール 指定されたロケールでシステム既定のロケールを
上書きします。""C"" ロケールは、最も速い照合
シーケンスに従います。現在指定できるロケール
は ""C"" のみです。並べ替えは、常に大文字と小
文字を区別します。
/M[EMORY] KB 並べ替えに使うメイン メモリのサイズを KB
で指定します。メモリ サイズは、常に最小
160 KB で制限されます。メモリ サイズが
指定された場合、メイン メモリをどれだけ利用
できるかにかかわらず、指定されたサイズのメモリ
を使用します。
通常は、メモリ サイズを指定していないとき、最高
のパフォーマンスを得られます。既定では、並べ替
えが既定の最大メモリ サイズに格納できる場合は、
(一時ファイルを使わないで) 1 回のパスで実行
します。そうでない場合は、(一部の並べ替えられ
たデータを一時ファイルに格納して) 2 回のパス
で実行し、並べ替えと結合パスのためのメモリのサイ
ズを等しくします。入力と出力の両方がファイルの
場合、既定の最大メモリ サイズは利用できるメイン
メモリの 90% になります。そうでない場合は、
メイン メモリの 45% になります。
/REC[ORD_MAXIMUM] 文字数 レコードの最大文字数を指定します
(既定値 4096、最大値 65535)。
/R[EVERSE] 並べ替えの順序を降順にします。つまり、Z から A、
9 から 0 の順に並べ替えます。
[ドライブ1:][パス1]ファイル名1
並べ替えられるファイルを指定します。指定されて
いない場合、標準入力を並べ替えます。
入力ファイルを指定する方が同じファイルへの標準
入力をリダイレクトするより速くなります。
/T[EMPORARY]
[ドライブ2:][パス2]
データをメイン メモリに格納できないときのた
めに、並べ替えのための一時記憶域を保持する
ディレクトリを指定します。既定ではシステムの
一時ディレクトリを使用します。
/O[UTPUT]
[ドライブ3:][パス3]ファイル名3
並べ替えられた入力ファイルが格納されるファイル
を指定します。指定されていない場合、データは
標準出力に書き込まれます。出力ファイルを指定す
る方が同じファイルへの標準出力をリダイレクト
するより速くなります。
SORT [/R] [/+n] [/M kilobytes] [/L locale] [/REC recordbytes]
[[drive1:][path1]filename1] [/T [drive2:][path2]]
[/O [drive3:][path3]filename3]
/+n Specifies the character number, n, to
begin each comparison. /+3 indicates that
each comparison should begin at the 3rd
character in each line. Lines with fewer
than n characters collate before other lines.
By default comparisons start at the first
character in each line.
/L[OCALE] locale Overrides the system default locale with
the specified one. The ""C"" locale yields
the fastest collating sequence and is
currently the only alternative. The sort
is always case insensitive.
/M[EMORY] kilobytes Specifies amount of main memory to use for
the sort, in kilobytes. The memory size is
always constrained to be a minimum of 160
kilobytes. If the memory size is specified
the exact amount will be used for the sort,
regardless of how much main memory is
available.
The best performance is usually achieved by
not specifying a memory size. By default the
sort will be done with one pass (no temporary
file) if it fits in the default maximum
memory size, otherwise the sort will be done
in two passes (with the partially sorted data
being stored in a temporary file) such that
the amounts of memory used for both the sort
and merge passes are equal. The default
maximum memory size is 90% of available main
memory if both the input and output are
files, and 45% of main memory otherwise.
/REC[ORD_MAXIMUM] characters Specifies the maximum number of characters
in a record (default 4096, maximum 65535).
/R[EVERSE] Reverses the sort order; that is,
sorts Z to A, then 9 to 0.
[drive1:][path1]filename1 Specifies the file to be sorted. If not
specified, the standard input is sorted.
Specifying the input file is faster than
redirecting the same file as standard input.
/T[EMPORARY]
[drive2:][path2] Specifies the path of the directory to hold
the sort's working storage, in case the data
does not fit in main memory. The default is
to use the system temporary directory.
/O[UTPUT]
[drive3:][path3]filename3 Specifies the file where the sorted input is
to be stored. If not specified, the data is
written to the standard output. Specifying
the output file is faster than redirecting
standard output to the same file.
Return Code: 0
C:\Windows\system32\sort.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
| File | Info |
|---|---|
| File Size | 28672bytes |
| Creation Time | 2019/12/07 18:09:34 |
| LastWrite Time | 2019/12/07 18:09:34 |
| ProductVersion | 10.0.19041.1889 |
| FileVersion | 10.0.19041.1889 (WinBuild.160101.0800) |
| Hash | Value |
|---|---|
| MD5 | 28079b69dc7ef8d6dcecd0a6a0750bba |
| SHA1 | 602a982e7b574870e853c9ea5f7f83c0e76a2bf5 |
| SHA224 | a02e4b35f324074244cbb7f011ced49d714117c17b91762181bcfcda |
| SHA256 | c9d8c048beec3aa7d0494a36e77d5692391dff26bd32b07a3358c010d8c84c79 |
| SHA384 | e278e94ed8a1513774a16bbd0fedb697bff1ddca3ee68fd7583fdb14bcee0169161991c0556a4afebe6af80fd3ba3007 |
| SHA512 | 3343b18197f8d9245466c5260d332e80c5167403e9de5411b9d926ac01d24892ad1be26e28a2c28d7e0e37898a6178e9837dd131535d04bac1a87f96c98e6330 |