split - split files into pieces
split [ options ] [ file [ name ] ]
reads an input file and writes one or more output files so that
on these files will produce the input file. The default size for each
piece is 1000 lines. The suffix consists of suffix_len
lower case characters from the POSIX locale.
If prefix is specified it will be used as a prefix for each of the resulting files from the split operation. If prefix
is specified, the prefix x will be used.
If no file is given, or if the file is -, split copies from standard input starting at the current
The option arguments for -b and -C can optionally be followed by one of the following characters to specify a
different unit other than a single byte:
- 512 bytes.
For backwards compatibility, -line_count
is equivalent to -l line_count
- -l, --lines=line_count
line_count specified the number of lines for each piece except the last.
If the input does not end in a newline, the partial line is included in the last piece. The default value is 1000.
- -a|n, --suffix-length=suffix_len
suffix_len defines the number of letters that form the suffix
portion of the file names for each of the pieces that the file is split into. The default value is 2.
- -b, --bytes=n
Splits the file into byte size pieces defined by n rather than lines.
- -C, --line-bytes=n
Splits the file into lines totaling a most n bytes.
- Successful completion.
An error occurred.