posts - 88, comments - 3, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

split file to pieces and restore under linux

Posted on 2012-05-30 17:38 Milo的海域 阅读(272) 评论(0)  编辑  收藏 所属分类: Linux
Sometime mailbox disallows u upload file exceed some limitation. you can split it before upload. here is one example:

create test file
touch file1 file2;
echo 1 > file1;
echo 2 > file2;
tar zvcf old.tar.gz file1 file2;

split file to segment with size as u wished
split -b 50 old.tar.gz;

restore file from segments
cat xa* > new.tar.gz;

verify the restore
md5sum old.tar.gz new.tar.gz

Generally, the check result should be same.



只有注册用户登录后才能发表评论。


网站导航: