Parameter | Description | Value |
---|---|---|
source-filename |
Specifies the name of a source file to be decompressed. |
The value is a string of 1 to 160 case-insensitive characters without spaces in the format [ drive ] [ path ] filename. If the string is enclosed in double quotation marks (" "), the string can contain spaces. If the value is a file name, the value is a string of 1 to 64 characters. In the preceding parameter, drive specifies the storage device name, and path specifies the directory and subdirectory. You are advised to add : and / between the storage device name and directory. The directory name cannot contain the following characters: ~ * / \ : ' " |
destination-filename |
Specifies the name of a destination file that is decompressed. |
The value is a string of 1 to 160 case-insensitive characters without spaces in the format [ drive ] [ path ] filename. If the string is enclosed in double quotation marks (" "), the string can contain spaces. If the value is a file name, the value is a string of 1 to 64 characters. In the preceding parameter, drive specifies the storage device name, and path specifies the directory and subdirectory. You are advised to add : and / between the storage device name and directory. The directory name cannot contain the following characters: ~ * / \ : ' " |
Usage Scenario
You can decompress files, especially log files that are stored on the storage device and run the more command to query the file.
The following describes the drive name.
If devices are stacked, drive can be named as:
For example, slot2#flash: indicates the flash memory in slot 2.
Precautions
If the destination file path is specified while the file name is not specified, the designation file name is the same as the source file name.
The source file persists after being decompressed.
The compressed file must be a .zip file. If a file to be decompressed is not a zip file, the system displays an error message during decompression.
The source file must be a single file. If you attempt to decompress a directory or multiple files, the decompression cannot succeed.
# Decompress log file logfile-2012-02-27-17-47-50.zip that are stored in the logfile directory and save it to the root directory as file log.txt.
<HUAWEI> pwd flash:/logfile <HUAWEI> unzip logfile-2012-02-27-17-47-50.zip flash:/log.txt Extract flash:/logfile/logfile-2012-02-27-17-47-50.zip to flash:/log.txt?[Y/N]:y 100% complete %Decompressed file flash:/logfile/logfile-2012-02-27-17-47-50.zip to flash :/log.txt.