Skip to content

Instantly share code, notes, and snippets.

@richardcornish
Created January 14, 2024 23:08
Show Gist options
  • Save richardcornish/95855847627c43521d9f5ed1bd7d09b3 to your computer and use it in GitHub Desktop.
Save richardcornish/95855847627c43521d9f5ed1bd7d09b3 to your computer and use it in GitHub Desktop.
Extract and create archive files

tar

Extract and create archive files

Extract

  • -x Extract
  • -z (De)compress archive with gzip
  • -v Verbose
  • -f <filename> Location of archive
tar -xzvf file.tar.gz

Create

  • -c Create
  • -z Compress archive with gzip
  • -v Verbose
  • -f <filename> Location of archive
tar -czvf file.tar.gz path/to/dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment