How do I extract bz2 files?

10 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?

Created by Anonymous 17 weeks 4 days ago
  Tags:

Answer(s):

5 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.

Created by Anonymous

Post your Answer

  • Lines and paragraphs break automatically.
  • 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 <% ... %>.
  • Links to specified hosts will have a rel="nofollow" added to them.

More information about formatting options