Learn how to easily create and extract tar files via the command line.
In order to create a tar.gz you will need to open up your terminal and make use of the following schema:
tar -czvf compressed-file-name.tar.gz/path/to/uncompressed/file
The flags stand for the following parameters:
create an archive of the inputted file(s)
compress the archive using (g)z(ip)
execute in verbose mode, meaning that the terminal will display its progress in executing the command (this is an optional parameter but can prove helpful in case of error)
implements the naming of the resultant file
If you are using a *nix based operating system, your
extract automatically on opening. If not, you can use the following
command which simply reverses the creation process:
tar -xzvf file.tar.gz
Here the parameters have the same meaning as above. The additional -x flag means 'extract'.