Created
February 9, 2019 09:21
-
-
Save epynic/0547177634475a04af6c4c89bd567cdd to your computer and use it in GitHub Desktop.
tar - all tar command example
This file contains 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
# create archive create verbose file | |
tar cvf output_tar_file.tar /home/epynic/ | |
# tar.gz | |
tar cvzf output_tar_file.tar /home/epynic/ | |
# tar.bz2 | |
tar cvfj output_tar_file.tar /home/epynic/ | |
# Untar - current directory - works for tar, gz | |
tar -xvf output_tar_file.tar | |
# Untar to directory | |
tar -xvf output_tar_file.tar -C /temp/epynic/ | |
# Files in tar list them t = list content | |
tar -tvf output_tar_file.tar | |
# Extract single file , mulitple | |
tar -xvf output_tar_file.tar first_file.xls second_file.xls | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment