how to extract a "tar.bz2" file?
What's the easiest way or command to extract a "tar.bz2" file to the current active folder?
Thanks for the help guys. |
'tar jxf filename.tar.bz2' should work
|
Open a terminal and type:
tar xvjf filename.tar.bz2 Which will untar it to the current directory. Normally (99% of the time) it will create it's own subdirectory so you don't need to worry about that. Just so you know: 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" will give you more options and info |
Cool thanks guys!
|
Well, double clicking on it is probably the 'easiest' way..... :) Often not the fastest way overall but easy, yes...
|
Hey thanks! I had the same question! :D :D :D
|
double clicking on it is probably the 'easiest' way,
How would you do that in ssh? |
I'm back with another question. How do I view these tar files?
|
bzip2 -d name-of-file, will unzip the file. Then you can use tar -xvf to open the tarball, then climb into the directory that the tarball created, and either run the program or compile the results.
|
Quote:
|
Quote:
|
another way of doing it
to extract in from .bz2 , use below
bzip2 -cd files.tar.bz2 | tar xvf - and to compress into .bz2 , use below bzip2 -cd files.tar.bz2 | tar tvf - Thanks, Vinay |
Install bzip2
Just to add a comment: you'll need to install bzip2, ie. yum install bzip2 (RHEL, CentOS, Fedora).
Regards |
@damonh: have you seen the age of this thread?
|
FYI:
The doubled file-extension .tar.bz2, like .tar.gz, means that a so-called "tape-archive (tar)" file has been compressed, using either the "GZip" (gz) or the "BZip2" (bz2) compressor. As you will see by reading the documentation (man tar), the tar command has options to build or to extract these compressed-archive files in a single convenient step. You could use two commands, to first decompress the archive then extract from it, but you don't have to. |
All times are GMT -5. The time now is 01:17 PM. |