Run the following commands in the/home directory:
Cd/home # enter the/home Directory
1. compress the mydatafile under the/home directory as mydata.zip.
Zip-rmydata.zipmydata # compressing mydata Directories
2. Decompress mydata.zip in the/homecatalog to the mydatabak directory.
Unzipmydata.zip-dmydatabak
3. compress the abcfolder and 123.txtfile under the/Home Directory into abc123.zip
Zip-rabc123.zipabc123.txt
4. Extract the wwwroot.zip file in the/homedirectory to the/home directory.
Unzipwwwroot.zip
5. Decompress abc12.zip、abc23.zip、abc34.zip in the/homedirectory to the/home directory at the same time.
Unzipabc \ *. zip
6. view the content in wwwroot.zip under/homecontents.
Unzip-vwwwroot.zip
7. Verify that the wwwroot.zip file under/homedirectory is complete
Unzip-twwwroot.zip
8. Decompress all the files in wwwroot.zip under the/homedirectory to the first level directory.
Unzip-jwwwroot.zip
System O & M reminder: qihang01 original content is copyrighted. For more information, see the source and original article links.
========================================================== ==================
Main Parameters
-C: extract the result
-L: displays the files contained in the compressed file.
-P: similar to the-c parameter, the extracted result is displayed on the screen, but no conversion is performed.
-T: Check whether the compressed file is correct.
-U: similar to the-f parameter. However, in addition to updating existing files, other files in the compressed files will be decompressed to the directory.
-V: detailed information is displayed when execution is performed.
-Z: only the remarks of the compressed file are displayed.
-A: necessary character conversion for text files
-B: Do not convert characters in text files.
-C: The file name in the compressed file is case sensitive.
-J: the original directory path of the compressed file is not processed.
-L: change all file names in the compressed file to lowercase letters.
-M: Send the output result to the more program for processing.
-N: Do not overwrite the original file during decompression.
-O: No need to ask the user first. After unzip is executed, the original file will be overwritten.
-P <password>: Use the zip password option.
-Q: No information is displayed during execution.
-S: converts the blank characters in the file name to the bottom line characters.
-V: retain the file version information of VMS.
-X: saves the original UID/GID of the file at the same time.