Generally speaking, zip is more general, whether under Windows or Linux, zip can be easily compressed and decompression.
Here are two more commonly used compression commands and decompression commands.
Compress
Zip Mypackge.zip-r/var/test/
Compresses all files in the/var/test/directory, including subfolders and files, into Mypackge.zip
-R represents a recursive subdirectory
Decompression
Unzip mypackge.zip-d/var/test2/
Extract the Mypackge.zip into the/var/test2/directory
If not specified, the default is extracted directly to the current directory, such as unzip Mypackge.zip
-D to specify which directory to extract
Main parameters
-C: The result of the decompression
-L: Displays files contained within a compressed file
-P: Similar to the-c parameter, the uncompressed results are displayed to the screen, but no conversions are performed
-T: Check that the compressed file is correct
-U: Similar to the-f argument, but in addition to updating an existing file, the other files in the compressed file are extracted into the directory
-V: Display detailed information when execution is performed
-Z: Only notes text for compressed files is displayed
-A: Make necessary character conversions to text files
-B: Do not convert text files to characters
-C: File names in compressed files are case-sensitive
-J: Do not process compressed files in the existing directory path
-L: Change all file names in compressed file to lowercase
-M: Send output to more program processing
-N: Do not overwrite existing files when extracting
-O: Do not need to ask the user first, unzip overwrite the original file after execution
-P: Password option with zip
-Q: Do not display any information at execution time
-S: Converts whitespace characters in file names to bottom line characters
-V: Keep VMS file version information
-X: Back up the file at the same time when extracting the original Uid/gid