One tool, that you need nearly every day on the linux command line ist the "tar" command. Even when i use it quite frequently, i forget the options that i need to create and extract a tar archive.
In this post i want to summarize how to create and extract an tar.gz archiv.
A tar.gz archive can be build with the following command:
During the creation the following options are used
To extract the tar.gz on a target system you can use the following command:
For the extraction we have used the following options:
x - extract: We want to extract the tar.gz archiv
f - file: The input is a file
v - verbose: We want to see the extracted files of the tar.gz
z - compress: The input file is a gzip compressed archiv.
You can see a list of all available options for tar in the man pages.