split [file] [prefix]

The split utility reads the given file and breaks it up into files of 1000 lines each (if no options are specified), leaving the file unchanged. If file is a single dash ('-') or absent, split reads from the standard input

Arguments

NameDescription
fileThe file to split
prefixPrefix for the names of the files into which the file is split

Options

NameDescription
-a <suffix_length>Use suffix_length letters to form the suffix of the file name
-b <byte_count>Create split files byte_count bytes in length. If k or K is appended to the number, the file is split into byte_count kilobyte pieces. If m or M is appended to the number, the file is split into byte_count megabyte pieces. If g or G is appended to the number, the file is split into byte_count gigabyte pieces
-dUse a numeric suffix instead of a alphabetic suffix
-l <line_count>Create split files line_count lines in length
-p <pattern>The file is split whenever an input line matches pattern, which is interpreted as an extended regular expression. The matching line will be the first line of the next output file. This option is incompatible with the -b and -l options