Linux / UNIX command to open .gz files

Linux / UNIX command to open .gz files

To open a .gz file on a Linux or Unix system, you can use the gunzip command. The gunzip command is a utility for decompressing .gz files and is included by default on most Linux and Unix systems.

To use the gunzip command, simply pass the name of the .gz file as an argument. For example, to decompress a file named file.gz, you can use the gunzip command like this:

gunzip file.gz
‮S‬ource:www.lautturi.com

This will decompress the file.gz file and create a new file named file in the current directory.

If you want to keep the original .gz file and create a new, decompressed copy of the file, you can use the -c option. For example:

gunzip -c file.gz > file

This will decompress the file.gz file and write the decompressed data to a new file named file, while leaving the original file.gz file unchanged.

Created Time:2017-10-29 22:08:55  Author:lautturi