

gunzip -l file_name.gzĬompress a file to a GZIP archive with GZ extension To view information about the compressive GZ gzip file, you can use the gunzip command like below, it does not uncompress the archive but give you vital information about the archive. If you want to keep the archive as well, please use the -k parameter with the command as below. Extract GZ file keep both orginal file and new so, your compressed archive is no longer available but the extracted file. v stands for verbose, which shows a log of actions happening while the archive is decompressed.Īlso note, after decompressing using gubzip, the GZ extention is removed from the file. If you want to see what happens during the unzip operation, you can user the -v parameter with the command. If the operation is successful, nothing is shown and linux command prompt is given back to the user Extract GZ file and see verbose output gz files we use gunzip command is used in Linux. gz files are compressed with gzip compression algorithm. To extract the GZ archive to the current directory, use below command.

Now let’s extract file and file.log from this archive. I have already shown you the content of the compressed_ in the previous section (listing files). If you just wanted to take a look at the contents of an archive, you would use the -t or -list flag: tar -tf compressed_ Let’s take a look at some other options now. You’ve already seen the usage of the -x flag for extracting an archive. x, -extract, -get extract files from an archive t, -list list the contents of an archive Below are three of these options: -c, -create create a new archive This mode has some basic options for creating and extracting archives.

We’ll be using the main operation mode most of the time. You can access it by typing in tar -help.

The tar command has a plethora of options in the help menu. The basic syntax of the tar command is as follows: tar Just right click on the tar gz archive file you want to extract and click on the Extract option. For example, you could extract a tar.gz file with the same command.Īlternatively, you can also use the graphical user interface (GUI) instead of the command line. You don’t need to specify the file/compression type to extract. The tar command detects the compression type automatically and extracts it. Here, x stands for extract and f stands for the archive file. To extract all the files inside of a tar.gz file, use the -xf flag with the tar command: tar -xf In the later sections, you will get to know the tar command in a little bit more detail. In this section, we’ll show you a simple method to extract any tar.gz file. Extract specific files/folders from a tar gz archive.Listing the contents of a tar gz archive.
