How to decompress the zip file in Linux
Use the unzip command to extract the zip file in linux for example:
Unzip-o-d / home/sunny myfile.zip
Extract the myfile.zip file to / home/sunny/
-o: overwrite files without prompting
-DRV / home/sunny indicates that the files should be extracted to the / home/sunny directory.
Unzip command parameters:
-c displays the unzipped results on the screen and converts the characters appropriately.
-f update existing files.
-l displays the files contained in the compressed file.
The-p parameter is similar to the-c parameter and displays the result of the decompression to the screen, but no conversion is performed.
-t check that the compressed file is correct.
The-u parameter is similar to the-f parameter, but in addition to updating existing files, other files in the compressed file are also unzipped to a directory.
-v displays detailed information when executing Yes.
-z displays only the remarks text of the compressed file.
-a make the necessary character conversion to the text file.
-b do not convert characters to text files.
-the file name in a compressed C file is case sensitive.
-j does not process the original directory path in the compressed file.
-L changes all file names in the compressed file to lowercase.
-M sends the output to the more program for processing.
-n do not overwrite the original file when unzipping.
-o you do not need to ask the user first, the original file will be overwritten after unzip execution.
-P uses the password option of zip.
-Q does not display any information when executed.
-s converts white space characters in the file name to underscore characters.
-V retains the file version information of VMS.
-X unzips the original UID/GID of the file at the same time.
[.zip file] specifies the .zip zip file.
[file] specifies which files in the .zip zip file are to be processed.
-d specifies the directory to store after the file is unzipped.
-x specifies which files in the .zip zip file should not be processed.
-Z unzip-Z equals the execution of zipinfo instructions.
Zip command
Zip-r myfile.zip. / *
All files and folders in the current directory are compressed into myfile.zip files, and-r means to recursively compress all files in the subdirectory.
These are the details of how to decompress zip in Linux. Please pay more attention to other related articles!