The common compression format is.zip.gz. bz2.tar.gz. tar.bz2

If the compression command cannot be found in Linux, install the related command. In centOS, you can use the yum command to install the compression command

Yum -y install (*) : select y or n yum install (*) : select y or n yum install (*) : select y or n yum install (*) : select y or n yum install (*) : Install the RPM package RPM -e Package name (* is not supported) : uninstall the RPM package. Example: yum -y install zip zip Compressed file format: zip compressed file name source file Installation command: yum -y install zip Example:  [root@localhost ~]# zip 123.zip 123 adding: 123 (stored 0%) [root@localhost ~]# ll 8-rw-r -- r --. 1 root root 0 1月 14 14:14123 -RW-r -- r --. 1 root root 156 1月 14 日 14:21 123.zip Zip directory format: The -r option specifies that you want to recursively include all files contained in the Filesdir directory without using the -r option. [root@localhost ~]# zip -r we.zip we [root@localhost ~]# ll drwxr-xr-x. 2 root root 6 1月 13 16:25 we-rw-r -- r --. 1 root Root 156 1月 14 14:26 we.zip Zip decompression format: unzip zip file For example: [root@localhost ~]# unzip we.zipCopy the code