Linux下大型容量件的切割与合并

本文介绍在Linux环境下如何使用split命令将大文件切割成小文件,并通过cat或join命令进行合并的方法。此外,还提供了一种使用自定义脚本进行更灵活的文件分割与合并的方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Linux下大型容量件的切割与合并

             

当前目录下有sp4.exe文件容量129M
我用64的U盘把spe.exe考到另一台机器上
#split -b 60m sp4.exe
-b, --bytes=SIZE   SIZE 值为每一输出档案的大小,单位为 byte。-C, --line-bytes=SIZE SIZE 可加入单位: b 代表 512, k 代表 1K, m 代表 1 Meg
#ls
-rw-r--r--    1 root     root     62914560  5月 18 00:40 xaa
-rw-r--r--    1 root     root     62914560  5月 18 00:41 xab
-rw-r--r--    1 root     root      8576176  5月 18 00:41 xac

到另一台机器上合并
#cat xa* >; ./sp4.exe     用jion也可以合并


还有一种方法
到[url]http://see.online.sh.cn/ch/sw/dl/split.htm[/url]下载
解压后

[root@rhas3 knife-2.0.1]# ls
knife  link  linkfiles.pl  sp4.exe
分割:
[root@rhas3 knife-2.0.1]# ./knife -c sp4.exe 500   ( 500:字节大小)
Cutting......Cutted Over
[root@rhas3 knife-2.0.1]# ls -l
总用量 44
-rwxr-xr-x    1 root     root        12949 2000-02-28  knife
-rwxr-xr-x    1 root     root           17 2000-02-28  link
-rwxr-xr-x    1 root     root         1088 2000-02-28  linkfiles.pl
-rw-r--r--    1 root     root         1543 2000-02-28  sp4.exe
-rw-r--r--    1 root     root          500  5月 18 00:49 sp4.exe.k00
-rw-r--r--    1 root     root          500  5月 18 00:49 sp4.exe.k01
-rw-r--r--    1 root     root          500  5月 18 00:49 sp4.exe.k02
-rw-r--r--    1 root     root           43  5月 18 00:49 sp4.exe.k03

合并:
[root@rhas3 knife-2.0.1]# ./link sp4.exe.k00 sp4.exe.k01 sp4.exe.k02 sp4.exe.k03                                                                                 
Please intput the file name you want to LINK up, one by one.
Just input OK when you have finished inputting. (一定要全输完在ok)
ok
In this order:

Now it's time you type the name of the output file.

-->;sp4.exe
[root@rhas3 knife-2.0.1]#


OK!

本文出自 “李晨光原创技术博客” 博客,转载请与作者联系!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值