How to handle .tar.bz2 files

How to handle .tar.bz2 files

How to handle .tar.bz2 files 150 150 Roderick Derks

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     &

 

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message