Skip to content

Instantly share code, notes, and snippets.

@ronaldgreeff
Last active July 8, 2020 09:06
Show Gist options
  • Save ronaldgreeff/5942e0c7068e6e5ce9d7473062e674a3 to your computer and use it in GitHub Desktop.
Save ronaldgreeff/5942e0c7068e6e5ce9d7473062e674a3 to your computer and use it in GitHub Desktop.
Extract tar tar.gz tar.gz2 using Linux / Git-Windows
Tar is an archiving utility in Linux. Extract various archived files in Linux using this utility.
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".
* providing "location" or "." doesn't seem to be valid in Windows + Git
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