split—splits a file into pieces
split [ –n ] [ filename [ name ] ]
split reads filename and writes it in n line pieces into a set of output files. The first output file is named with aa appended, and so on lexicographically, up to zz (a maximum of 676 files). The maximum length of name is 2 characters less than the maximum filename length allowed by the filesystem. See statvfs. If no output name is given, x is used as the default. (Output files will be called xaa, xab, etc.)
Example A.52.
1 split -500 filea
2 split -1000 fileb out
EXPLANATION
Splits filea into 500-line files. Files are named xaa, xab, xac, and so on. Splits fileb into 1,000-line files named out.aa, out.ab, and so on.
|