linux下分割和重組文件
linux shell命令裏的split和cat命令可以輕鬆完成這兩個功能,舉個例子來說,比如一個1GB大小的文件foo.zip,以100M為塊分割:
分割: split -b 100M -d foo.zip foo.zip.
重組: cat foo.zip.?? > foo_same.zip
注意 -b中的 100M和100MB是有區別的,按照man的說法:
-b, --bytes=SIZE
put SIZE bytes per output file
SIZE is an integer and optional unit (example: 10M is 10*1024*1024).
Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (pow‐
ers of 1000).
另外 -d是形成數字後綴而不是默認的阿拉伯字母後綴.
最後更新:2017-04-03 07:57:16