split
Syntax
split [options]
file [
prefix
]
Options
-l
n
(where n
is a number) puts n
lines in each file.
-
n
(where n
is a number) puts n
lines in each file.
-b
n
k
(where n
is a number) splits the file every n
kilobytes.
-c
n
k
(where n
is a number) puts as many lines as possible in a split file without exceeding n
kilobytes per file.
Description
The split
command breaks up a large file into smaller files. By default, split
puts 1,000 lines into each file. The files are named by groups of letters such as aa
, ab
, ac
, and so on. You can specify a prefix for the filenames. For example, to split a large archive into smaller files that fit into several high-density, 3.5-inch diskettes, use split
as follows:
split -C 1440k bigfile.tar disk.
This creates files named disk.aa
, disk.ab
, and so on.