zip -r myfile.zip test/
Pack the test directory into myfile.zip.
Run example:

unzip myfile.zip
Unzip myfile.zip. to the current directory.
Run example:

$ zip -d myfile.zip a.txt
$ zip -m myfile.zip a.txt
| Parameters | Description |
|---|---|
| - x | The file list decompresses the file, but does not include the specified file file. |
| - v | View the compressed file directory, but do not decompress. |
| - t | Test whether the file is damaged, but do not decompress it. |
| - d | Directory Unzip the compressed file to the specified directory. |
| - z | Only show the comments of compressed files. |
| - n | Do not overwrite existing files. |
| - o | Overwrite an existing file without requiring user confirmation. |
| - j | Do not rebuild the directory structure of the document, extract all files to the same directory |
Detailed explanation of ubuntu linux zip and unzip commands
Recommended Posts