原文
Split:按指定的行數截斷檔案
格式: split [-n] file [name]
參數說明:
-n: 指定截斷的每一檔案的長度,不指定預設為1000行
file: 要截斷的檔案
name: 截斷後產生的檔案的檔案名稱的開頭字母,不指定預設為x,即截斷後產生的檔案的檔案名稱為xaa,xab….直到xzz
例:
split -200 myfile prefix_
將檔案myfile依次截斷到名為prefix_aa, prefix_ab, prefix_ac…..的檔案中,每一檔案的長度為200行
[root@dbapp101 splits]# split --help
Usage: split [OPTION] [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT
is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-a, --suffix-length=N use suffixes of length N (default 2)
-b, --bytes=SIZE put SIZE bytes per output file
-C, --line-bytes=SIZE put at most SIZE bytes of lines per output file
-d, --numeric-suffixes use numeric suffixes instead of alphabetic
-l, --lines=NUMBER put NUMBER lines per output file
--verbose print a diagnostic to standard error just
before each output file is opened
--help display this help and exit
--version output version information and exit
SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.
Report bugs to <bug-coreutils@gnu.org>.
</bug-coreutils@gnu.org>