split file to pieces and restore under 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.


你可能感兴趣的:(split file to pieces and restore under linux)