$ split aa $ ls -rw-rw-r-- 1 user user 611037792 Jan 15 22:09 aa -rw-rw-r-- 1 user user 356533 Jan 15 22:10 xaa -rw-rw-r-- 1 user user 377414 Jan 15 22:10 xab -rw-rw-r-- 1 user user 346342 Jan 15 22:10 xac -rw-rw-r-- 1 user user 358728 Jan 15 22:10 xad -rw-rw-r-- 1 user user 391466 Jan 15 22:10 xae -rw-rw-r-- 1 user user 368786 Jan 15 22:10 xaf -rw-rw-r-- 1 user user 377274 Jan 15 22:10 xag -rw-rw-r-- 1 user user 393500 Jan 15 22:10 xah -rw-rw-r-- 1 user user 362512 Jan 15 22:10 xai -rw-rw-r-- 1 user user 365170 Jan 15 22:10 xaj -rw-rw-r-- 1 user user 362878 Jan 15 22:10 xak -rw-rw-r-- 1 user user 387394 Jan 15 22:10 xal -rw-rw-r-- 1 user user 355614 Jan 15 22:10 xam -rw-rw-r-- 1 user user 366420 Jan 15 22:10 xan -rw-rw-r-- 1 user user 368912 Jan 15 22:10 xao -rw-rw-r-- 1 user user 350226 Jan 15 22:10 xap -rw-rw-r-- 1 user user 386102 Jan 15 22:10 xaq -rw-rw-r-- 1 user user 377292 Jan 15 22:10 xar -rw-rw-r-- 1 user user 376416 Jan 15 22:10 xas -rw-rw-r-- 1 user user 347584 Jan 15 22:10 xat -rw-rw-r-- 1 user user 376586 Jan 15 22:10 xau -rw-rw-r-- 1 user user 352778 Jan 15 22:10 xav -rw-rw-r-- 1 user user 380608 Jan 15 22:10 xaw -rw-rw-r-- 1 user user 356634 Jan 15 22:10 xax -rw-rw-r-- 1 user user 377414 Jan 15 22:10 xay -rw-rw-r-- 1 user user 346342 Jan 15 22:10 xaz
切分为1MB的文件
可以使用-b参数,切分为准确字节的文件,如下:
1 2 3 4 5 6 7 8 9 10
$ split aa -b 1024000 $ ll -rw-rw-r-- 1 user user 611037792 Jan 15 22:09 aa -rw-rw-r-- 1 user user 1024000 Jan 15 22:15 xaa -rw-rw-r-- 1 user user 1024000 Jan 15 22:15 xab -rw-rw-r-- 1 user user 1024000 Jan 15 22:15 xac -rw-rw-r-- 1 user user 1024000 Jan 15 22:15 xad -rw-rw-r-- 1 user user 1024000 Jan 15 22:15 xae -rw-rw-r-- 1 user user 1024000 Jan 15 22:15 xaf
指定前缀
这个参数直接跟在输入的文件后面即可,如下:
1 2 3 4 5 6 7 8 9 10
$ split aa DAT $ ls aa DATaa DATab DATac DATad DATae DATaf