How do I extract bz2 files?

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


15 points

I have a file in bz2 format as follows on my linux box:

drupal-date-9-may-2010.sql.bz2

How do I extract it?



8 points

You can use the following shell command to extract:

tar xvjf filename.bz2

This would also extract:

tar xvjf filename.tar.bz2

Here,
tar - Tape ARchiver
And the options:
x - extract
v - verbose output (lists all files as they are extracted)
j - deal with bzipped file
f - read from a file, rather than a tape device

"tar --help" gives more options and info.

Anonymous's picture
Created by Anonymous

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.