2014-01-28 20:08:30 +08:00
|
|
|
# unzip
|
|
|
|
|
2024-03-14 02:01:06 -03:00
|
|
|
> Extract files/directories from Zip archives.
|
2022-12-31 08:51:52 +10:00
|
|
|
> See also: `zip`.
|
2021-10-19 16:11:22 -04:00
|
|
|
> More information: <https://manned.org/unzip>.
|
2014-01-28 20:08:30 +08:00
|
|
|
|
2022-12-31 08:51:52 +10:00
|
|
|
- Extract all files/directories from specific archives into the current directory:
|
2014-01-28 20:08:30 +08:00
|
|
|
|
2022-12-31 08:51:52 +10:00
|
|
|
`unzip {{path/to/archive1.zip path/to/archive2.zip ...}}`
|
2014-01-28 20:08:30 +08:00
|
|
|
|
2022-12-31 08:51:52 +10:00
|
|
|
- Extract files/directories from archives to a specific path:
|
2014-01-28 20:08:30 +08:00
|
|
|
|
2022-12-31 08:51:52 +10:00
|
|
|
`unzip {{path/to/archive1.zip path/to/archive2.zip ...}} -d {{path/to/output}}`
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 12:36:05 -08:00
|
|
|
|
2024-10-16 18:46:31 +03:00
|
|
|
- Extract files/directories from archives to `stdout` alongside the extracted file names:
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 12:36:05 -08:00
|
|
|
|
2022-12-31 08:51:52 +10:00
|
|
|
`unzip -c {{path/to/archive1.zip path/to/archive2.zip ...}}`
|
2017-12-05 19:53:15 +02:00
|
|
|
|
2024-10-16 18:46:31 +03:00
|
|
|
- Extract an archive created on Windows, containing files with non-ASCII (e.g. Chinese or Japanese characters) filenames:
|
2017-12-05 19:53:15 +02:00
|
|
|
|
2022-12-31 08:51:52 +10:00
|
|
|
`unzip -O {{gbk}} {{path/to/archive1.zip path/to/archive2.zip ...}}`
|
2018-05-07 17:11:58 +08:00
|
|
|
|
2022-12-31 08:51:52 +10:00
|
|
|
- List the contents of a specific archive without extracting them:
|
2018-05-07 17:11:58 +08:00
|
|
|
|
2022-12-31 08:51:52 +10:00
|
|
|
`unzip -l {{path/to/archive.zip}}`
|
2023-01-10 17:46:51 -05:00
|
|
|
|
|
|
|
- Extract a specific file from an archive:
|
|
|
|
|
2024-09-16 18:17:12 +03:00
|
|
|
`unzip -j {{path/to/archive.zip}} {{path/to/file1_in_archive path/to/file2_in_archive ...}}`
|