split – Split a file into pieces

Syntax

split {option} [file [name]]

The split utility reads the given file and breaks it up into files of a given number of lines or bytes each (default is 1000 lines). If file is a single dash - or absent, split reads from the standard input.

The pieces generated by the split utility can be joint again by the cat utility.

The split utility exits with the value 0 on success, and with positive integer value if an error occurred.

Options include

-b byte_count[k|m]
Create smaller files byte_count bytes in length. If k is appended to the number, the file is split into byte_count KB pieces. If m is appended to the number, the file is split into byte_count MB pieces.
-l line_count
Create smaller files line_count lines in length.

Further information

man split


2022-01-30