SH - Split (File)
About
split a file into pieces
Articles Related
Syntax
split [OPTION] [INPUT [PREFIX]]
where:
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, …
Mandatory arguments to long options are mandatory for short options too.
With no , or when INPUT is -, read standard input.
Prefix, Suffix
default PREFIX is ‘x’
Options:
-a, –suffix-length=N: use suffixes of length N (default 2)
-d, –numeric-suffixes: use numeric suffixes instead of alphabetic
Size
default size is 1000 lines. SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.
Size Options are:
-b, –bytes=SIZE: put SIZE bytes per output file
-C, –line-bytes=SIZE: put at most SIZE bytes of lines per output file
-l, –lines=NUMBER: put NUMBER lines per output file
Support
–verbose: print a diagnostic to standard error just before each output file is opened
–help display this help and exit
–version: output version information and exit