STScI Logo

split utilities


NAME · USAGE · PARAMETERS · DESCRIPTION · EXAMPLES · TIME_REQUIREMENTS
SEE_ALSO

NAME

split -- split a large file into smaller segments

USAGE

split input output

PARAMETERS

input
The name of the input file (only a single file can be processed).
output
The root name of the output files.
nlines = 1000
The maximum number of lines per output segment file, if the input file is a text file.
nbytes = 16384
The maximum number of bytes per output segment file, if the input file is a binary file.
maxfiles = 999
Maximum number of output files. Used to determine the amount of zero padding needed for the filename extensions.
verbose = yes
Print the name and size of each output file as it is generated.

DESCRIPTION

The split task is used to break large files up into smaller segments, e.g., when it is necessary to deal with an unmanageably large file. Lacking any knowledge of the file structure, the segments are broken on arbitrarly located but equally spaced boundaries. The segments may subsequently be reassembled into larger segments of the original file with concatenate or copy (with output redirection), or split may be applied again to break a large segment up into smaller segments without losing any information.

EXAMPLES

1. Split a large text file into segments, each of which is the default size.

cl> split textfile seg

2. Split a large tar format archive file (10240 byte records) up into a series of smaller files, each of which contains 10 records from the input tar file.

cl> split big.arc seg nb=(10240*10)

TIME REQUIREMENTS

very fast

SEE ALSO

concatenate, copy


Source Code · Search Form · STSDAS