Go to the first, previous, next, last section, table of contents.


split: Split a file into fixed-size pieces

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 letters `aa', `ab', and so on, such that concatenating the output files in sorted order by file name produces the original input file. (If more than 676 output files are required, split uses `zaa', `zab', etc.)

The program accepts the following options. Also see section Common options.

`-lines'
`-l lines'
`--lines=lines'
Put lines lines of input into each output file.
`-b bytes'
`--bytes=bytes'
Put the first bytes bytes of input into each output file. Appending `b' multiplies bytes by 512, `k' by 1024, and `m' by 1048576.
`-C bytes'
`--line-bytes=bytes'
Put into each output file as many complete lines of input as possible without exceeding bytes bytes. For lines longer than bytes bytes, put bytes bytes into each output file until less than bytes bytes of the line are left, then continue normally. bytes has the same format as for the `--bytes' option.
`--verbose'
Write a diagnostic to standard error just before each output file is opened.


Go to the first, previous, next, last section, table of contents.