How to handle .tar.bz2 files PDF Print E-mail
Friday, 02 March 2007 21:41

Files with the extension .tar.bz2 are compressed tarballs, a common way of sharing files on the internet. The compression rate is higher then that of a *.tar.gz or *.tgz file. Unpackig demands more CPU though.

You can extract files from a tarball using the 'tar' command, this will creat a new folder containing the files from the tarball.
# tar xvjf bestand.tar.bz2

Create a tar archive
# tar cvjf name_of_your_archive.tar.bz2 /path/to/directory

short explanation:
-x : extract
-c : create
-v : verbose
-j : type of compresssion used: bz2
-z: type of compresssion used: zip (*.tar.gz files)
-f : filename

scripts

A way to tar and zip files simultaniously using a script:

tar cvf -  ./apl       | gzip > /backup_dir/apl.tar.gz           &

tar cvf -  ./bin       | gzip > /backup_dir/abin.tar.gz          &

tar cvf -  ./dualpath  | gzip > /backup_dir/adualpath.tar.gz     &

 

 

Add comment


Security code
Refresh

More KB Articles