On Monday 30 July 2007 01:16, Alexey Eremenko wrote:
AE Hi all ! AE AE I came across a problem: splitting files. AE AE How to best approach this problem ? AE AE I have used "split" command: AE Like that, to split 1 ISO file into many 1 MB files. AE split -d -b $[1000*1000] --verbose ../visopsys-0.62.iso AE AE But I came across a problem, how-to merge them back? AE AE I did something *very* ugly: AE alexey@opensuse102:/F/OSes/test> cp x00 finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x01 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x02 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x03 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x04 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x05 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x06 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x07 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x08 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x09 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> cat x10 >> finalfile.iso AE alexey@opensuse102:/F/OSes/test> AE alexey@opensuse102:/F/OSes/test> md5sum ../visopsys-0.62.iso AE f76eea3e3bbb441570984a7f6fb8d646 ../visopsys-0.62.iso AE alexey@opensuse102:/F/OSes/test> md5sum finalfile.iso AE f76eea3e3bbb441570984a7f6fb8d646 finalfile.iso AE AE Is there any beautyful command, that is "anti-split" ? AE I have tried "join", but this command is very bad: it can only join up AE to 2 files. AE AE I have heard about the possibility of multi-volume TAR archives, but I AE could not find the right keys in the tar info pages. AE AE Please help me finding the convenient commands to split/join files AE AE -- AE -Alexey Eremenko "Technologov"
You may try to join them in this way: 1) Put all parts in one place (for example ~/tmp/finalfile) 2) Make sure that there are no other files in this directory 3) Join files. It works, because `split` gives names to files with alphabetical order. find ~/tmp/finalfile | while read file; do cat $file >> finalfile.iso; done; 4) Check md5 sums 5) Now you may delete x* files in ~/tmp/finalfile directory -- WBR, Dmitry. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org