Created
March 15, 2015 04:55
-
-
Save mondwan/0563f507d1439d431138 to your computer and use it in GitHub Desktop.
Archiving and compressing files 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
# Extract files fomr mydir.tar | |
tar xvf mydir.tar | |
# Create the archive for file mydir and compress with gzip | |
tar zcvf mydir.tar.gz mydir | |
# Create the archive for file mydir and compress with bz2 | |
tar jcvf mydir.tar.bz2 mydir | |
# Create the archive for file mydir and compress with xz | |
tar Jcvf mydir.tar.xz mydir | |
# List contents for an archive | |
tar tvf mydir.tar.gz | |
# Extract file | |
# Do not need to specify which format you are using | |
tar xvf mydir.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment