Created
August 9, 2012 14:23
-
-
Save biswarupadhikari/3304593 to your computer and use it in GitHub Desktop.
How to extract .tar.bz2 and .tar.gz file in Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tar is an archiving utility in Linux. Lets see how can we extract various archived files in Linux using this utility. We will also see the meaning of the options provided with the commands. Type the following commands in terminal (Keyboard short cut: Ctrl+Alt+T in Ubuntu): | |
Extracting .tar.bz2: | |
tar xvjf filename.tar.bz2 location | |
Extracting .tar.gz: | |
tar xvzf filename.tar.gz location | |
Where: | |
x — extract | |
v — verbose (it will show the extracting files in the terminal) | |
f — file | |
z — gzip (or gz in short) | |
j — bzip2 (or bz2 in short) | |
location — location where you want to save the extracted the files. If you want to save it in the same directory where you have the zipped file use “.” in place of “location”. | |
All extracted files will be kept in a single directory automatically. The name of this directory is decided by the zipped file itself. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment