Monday, May 17, 2010

Compress and Split Files in Ubuntu 9.10

01. cd films/split-files (change the filepath to where you want to keep
the split files)

02. tar -cvj /home/username/films/large-files.avi | split -b 640m -d – "large-files.tar.bz."

You will now see several files appearing at the split-files folder, each
with file size of 640MB and with filenames large-files.tar.bz.00,
large-files.tar.bz.01, large-files.tar.bz.02, etc.

To recover and extract the split files, type

#cat large-files.tar.bz.* > large-files.tar.bz
#tar -xvj large-file.tar.bz

and you can get the original file back.

No comments:

Post a Comment