SPLIT(1) User Commands SPLIT(1)

split - split a file into pieces

split [-b bytes[k|m] | -l lines | -lines] [-a suffixlength] [file [name]]

Split reads file and writes it in 1000-line pieces as many as necessary, onto a set of output files. The name of the first output file is name with aa appended, and so on lexicographically. If no output name is given, x is default.

If no input file is given, or if - is given in its stead, then the standard input file is used.

The following options (all of them introduced by POSIX.2) are accepted:

Use suffixlength characters for the appended part of the output file name different for each file instead of 2 (using a suffixlength of 3 will create files named xaaaxzzz, and so forth).
Split the file in pieces of n bytes each. If k is appended, n is taken in kilobyte (1024-byte) units; with m, in megabyte units.
Split the file in pieces of n lines each.

csplit(1)

12/6/04 Heirloom Toolchest