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 split can be joint again by cat.

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

Options

-b byte_count
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.

2020–11–26