linux下分割和重组文件 – hopy

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是形成数字后缀而不是默认的阿拉伯字母后缀.

分明是比谁记的都清楚,比谁都更加在意,

linux下分割和重组文件 – hopy

相关文章:

你感兴趣的文章:

标签云: