Extracting file or files from tar.gz in Linux, command line:
tar zxvf file.tar.gz
- z - filtering the archive through gzip
- x - extracting files from an archive
- v - listing the files processed
- f - using archive file
The command extracts the contents of a compressed archive to the current directory.
Tar creates an archive of one or several files. Then gzip is used to compress it. Or both processes are made at once by tar only, with corresponding options employed. The duality of nature - archived and compressed after - is reflected in the extension of the file ("tar.gz") and requires two procedures to be performed while extracting: decompressing and unpacking. Hence both z (decompress it) and x (unpack it) in the command.
Sources for the option letters description: