Difference between revisions of "Archiving"
Jump to navigation
Jump to search
(Created page with "Creating archives and compress files. =Windows= ==zip== ;zip archive.zip file :Create or update archive.zip, put file in there. If file is already existing in the archive it...") |
(→zip) |
||
Line 11: | Line 11: | ||
:Extract file from archive.zip and put it in the current directory | :Extract file from archive.zip and put it in the current directory | ||
− | ;unzip | + | ;unzip archive.zip path |
− | :Extract path from archive.zip and put it in the current directory | + | :Extract path from archive.zip and put it in the current directory. Use quotes if path has wildcards. |
+ | |||
+ | ;unzip -l archive.zip | ||
+ | :List all files in the archive. | ||
+ | |||
+ | ;unzip -l archive.zip path | ||
+ | :List path if it is in the archive. | ||
=Unix and Linux= | =Unix and Linux= |
Revision as of 16:37, 21 February 2019
Creating archives and compress files.
Windows
zip
- zip archive.zip file
- Create or update archive.zip, put file in there. If file is already existing in the archive it is replaced.
- zip -r archive.zip path
- Create or update archive.zip, put path and all below in there. Files existing in the archive are replaced.
- unzip archive.zip file
- Extract file from archive.zip and put it in the current directory
- unzip archive.zip path
- Extract path from archive.zip and put it in the current directory. Use quotes if path has wildcards.
- unzip -l archive.zip
- List all files in the archive.
- unzip -l archive.zip path
- List path if it is in the archive.