[email protected] ~]# split [-BL] File PREFIX
Parameters:
-B : Can be divided into the file size, can be added units, such as B, K, m, etc.;
- L : Split by number of rows.
Example:
Example One: my/etc/termcap has more than 700 k, if want to divide into 300K a file?
[Email protected] ~]# cd/tmp; Split-b 300k/etc/termcap termcap
[Email protected] tmp]# ls-l termcap*
-rw-rw-r–1 root root 307200 August 00:25 Termcapaa
-rw-rw-r–1 root root 307200 August 00:25 termcapab
-rw-rw-r–1 root root 184848 August 00:25 Termcapac
# The file name is free to take! As long as we write the preamble, the small file will be
# Xxxaa, Xxxab, Xxxac and other ways to build a small file!
Example Two: how to synthesize the above three small files into one file, file name Termcapback
[email protected] tmp]# cat termcap* >> termcapback
# It's easy, huh? Just use the data flow redirect. Simple!
Ext.: http://dongyongjun.i.sohu.com/blog/view/165756234.htm
Split usage in Linux shell