1. The function description compresses or decompresses the general file. The default extension of the compressed file is “.gz”, in fact, gunzip is a hard link to gzip, so whether it is compression or decompression can be achieved by gzip.
Note gzip can only compress files, not directories, even if you specify a compressed directory, you can only compress all files in the directory. The format is as follows: gzip [options] Compressed (decompressed) document name The options for the gzip command and their descriptions are shown in Table 4.29. Table 4.29 Options and Descriptions of the gzip Command
Option Meaning-d Decompress the compressed file -r Recursively compress all files in the specified directory and subdirectories -t Check the integrity of the compressed document -v Each compressed and decompressed document, showing the corresponding file name and compression ratio -l shows the compressed information of the compressed file, the display fields are compressed document size, uncompressed document size, compression ratio and uncompressed document name -num with the specified number num Configure the compression ratio, “-1” or “-fast” indicates the lowest compression ratio, “-9” or “-best” indicates the highest compression ratio. The system default compression ratio is 6. 2. For example, (1) first compress all the files and subdirectories in the /etc directory, back up the compressed package etc.zip to the /opt directory, and then gzip the etc.zip file to set the compression level of gzip to 9. [root@mylinux ~]#zip –r /opt/etc.zip /etc[root@mylinux ~]#gzip -9v /opt/etc.zipetc.zip: 6.5% -- replaced with etc.zip.gz( 2) View the compression information of the above etc.zip.gz file. [root@mylinux ~]# gzip -l /opt/etc.zip.gz compressed uncompressed ratio uncompressed_name11938745 12767265 6.5% /opt/etc.zip(3) Decompress the above etc.zip.gz file to the current directory. [root@mylinux ~]#gzip –d /opt/etc.zip.gz Or execute [root@mylinux ~]#gunzip /opt/etc.zip.gz by the above example to know "gzip –d" Equivalent to the “gunzip” command.
In recent years, the open source Linux system can be said to be in the limelight, whether it is pers
See many online how to ask how to configure the linux system nat Internet, now write an article here
Linux has created a friendly environment that gives us the possibility to choose. For example, most
Installing VMware in Linux System Due to the project needs, you need to virtuali
Introduction to Linux operating system network configuration process under virtual machine
Webmail Roundcube installation configuration basic tutorial
Exynos 4412 startup process analysis
Linux system configuration VI or VIM tips
How to adjust the SWAP space size of Linux system tutorial
Learn how to disable computers from using software
Where is the location of the Win7 Ultimate NVIDIA Control Panel?
How to use the Win10 built-in recorder function?
Windows 7 version of IE10 browser will be launched in mid-November
Win7 system prompts "Ping is not an internal and external command" how to solve
What news of Windows 8 has already begun to appear?
Master essential skills Play mouse drag and drop operation
Win10 9926 how to voice activation Microsoft Xiaona
How to set the timed shutdown of the win7 system