Skip to content

Instantly share code, notes, and snippets.

@epynic
Created February 9, 2019 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epynic/0547177634475a04af6c4c89bd567cdd to your computer and use it in GitHub Desktop.
Save epynic/0547177634475a04af6c4c89bd567cdd to your computer and use it in GitHub Desktop.
tar - all tar command example
# 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