cmd:split 

Info 

split - split a file into pieces

Working examples 

Usage 

Usage2 
ls thefile
split -b 500k !$ !$.
split -b 500k !$ !$.split.
!! | xargsi -t split {} ~+1/{}. -d -a 3 -b 500k/10m
# space ok!
Usage1 
 !! | split -l 1000 - tmp.split.
 perl -e '$lmt=30; $pre="tmp.split."; $si="aa"; foreach (1..$lmt){ print "$pre$si\n"; $si++} '

 ls tmp.split.?? | doeach.pl fileh ftt0 @~cat @_@~
 rm tmp.split.??
Usage0 
$ jot 10 | split -l 3 -
$ ls xa? | doeach.pl echo @~cat @_@~

echo `cat xaa`
1 2 3

echo `cat xab`
4 5 6

echo `cat xac`
7 8 9

echo `cat xad`
10

Help 

quick help 
$ split --help
 Usage: split [OPTION] [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
PREFIX is `x'.  With no INPUT, or when INPUT is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
  -a, --suffix-length=N   use suffixes of length N (default 2)
  -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
      --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

SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.
man 
-d, --numeric-suffixes
       use numeric suffixes instead of alphabetic
-a, --suffix-length=N
       use suffixes of length N (default 2)
-b, --bytes=SIZE
       put SIZE bytes per output file

enumeration 

jot 30 | split -l 1 - tmp.split.

$ echo tmp.split.* | fold -sw 68
tmp.split.aa tmp.split.ab tmp.split.ac tmp.split.ad tmp.split.ae
tmp.split.af tmp.split.ag tmp.split.ah tmp.split.ai tmp.split.aj
tmp.split.ak tmp.split.al tmp.split.am tmp.split.an tmp.split.ao
tmp.split.ap tmp.split.aq tmp.split.ar tmp.split.as tmp.split.at
tmp.split.au tmp.split.av tmp.split.aw tmp.split.ax tmp.split.ay
tmp.split.az tmp.split.ba tmp.split.bb tmp.split.bc tmp.split.bd

$ perl -e '$lmt=30; $pre="tmp.split."; $si="aa"; foreach (1..$lmt){ print "$pre$si\n"; $si++} ' | xargs | fold -sw 68
tmp.split.aa tmp.split.ab tmp.split.ac tmp.split.ad tmp.split.ae
tmp.split.af tmp.split.ag tmp.split.ah tmp.split.ai tmp.split.aj
tmp.split.ak tmp.split.al tmp.split.am tmp.split.an tmp.split.ao
tmp.split.ap tmp.split.aq tmp.split.ar tmp.split.as tmp.split.at
tmp.split.au tmp.split.av tmp.split.aw tmp.split.ax tmp.split.ay
tmp.split.az tmp.split.ba tmp.split.bb tmp.split.bc tmp.split.bd

documented on: 1999.10.26