Skip to content

Instantly share code, notes, and snippets.

@BumbuKhan
Created November 29, 2017 08:48
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 BumbuKhan/5ffdc84b09afbdf27047e5f6eb0a8f90 to your computer and use it in GitHub Desktop.
Save BumbuKhan/5ffdc84b09afbdf27047e5f6eb0a8f90 to your computer and use it in GitHub Desktop.
How to create tar.gz archive in linux command line
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
Here’s what those switches actually mean:
-c: Create an archive.
-z: Compress the archive with gzip.
-v: Display progress in the terminal while creating the archive, also known as “verbose” mode. The v is always optional in these commands, but it’s helpful.
-f: Allows you to specify the filename of the archive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment