Next: csplit invocation, Previous: tail invocation, Up: Output of parts of files
split creates output files containing consecutive sections of input (standard input if none is given or input is ‘-’). Synopsis:
split [option] [input [prefix]]
By default, split puts 1000 lines of input (or whatever is left over for the last section), into each output file.
The output files' names consist of prefix (‘x’ by default) followed by a group of characters (‘aa’, ‘ab’, ... by default), such that concatenating the output files in traditional sorted order by file name produces the original input file. If the output file names are exhausted, split reports an error without deleting the output files that it did create.
The program accepts the following options. Also see Common options.
For compatibility split also supports an obsolete
option syntax -lines. New scripts should use -l
lines instead.
An exit status of zero indicates success, and a nonzero value indicates failure.