split - split a file into pieces
split [-lline_count] [-asuffix_length] [file [name]]
split -bn[k|m] [-asuffix_length] [file [name]]
split [ -line_count ] [ file [ name ] ]
split reads an input file and writes it in one or more output files. The
default size of each output file is 1000 lines. The size of the output
files can be modified by -b and -l options. Each output file is created
with a unique suffix. The suffix consists of exactly suffix_length
lower-case letters from locale. The letters of the suffix are used as if
they were a base-26 digit system, with the first suffix to be created
consisting of all a characters, the second with a b replacing the last a,
and so sorth, until a name of all z characters is created. By default,
The names of the output files are x, followed by a two-character suffix
from the character set as described above, starting with aa, ab, ac, and
so forth, and continuing until the suffix zz, for a maximum of 676 files.
If the number of files required exceeds the maximum allowed by the suffix
length provided, such that the last allowable file would be larger than
the requested size, split will fail after creating the last file with a
valid suffix; it will not delete the files it created with valid
suffixes. If the file limit is not exceeded, the last file created will
contain the remainder of the input file, and may be smaller than the
file is the pathname of the file to be split. If no file is given or file
is -, the standard input will be used. name is the prefix to be used for
each of the files resulting from the split operation. If not given, x
will be used as the prefix of the output files.
Use suffix_length letters to form the suffix portion of the
filenames of the split file. Default suffix length is 2. If the sum
of name and suffix_length option-argument would create a filename
exceeding NAME_MAX bytes, split will exit with a diagnostic message
and no files will be created.
Specify the output file size in bytes n. With k specified, an output
file is n*1024 bytes in size;with m specified, a file is n*1048576
bytes in size.
-lline_count or -line_count
Specify the number of lines in each output file. line_count is an
unsigned decimal integer. The default is 1000. If the input does not
end with a newline character, the partial line will be included in
the last ouput file.
language-specific message file (see LANG on environ(5)
bfs(1), csplit(1), statvfs(2)
PPPPaaaaggggeeee 2222 [ Back ]