解开 .zip 的 unzip
.. _linux_unzip_beginner:
.. note::
千淘万漉虽辛苦,吹尽狂沙始到金。
唐 刘禹锡《浪淘沙》
unzip 专管把 .zip 还原成文件和目录。打包压缩请用 :ref:linux_zip_beginner。
官方定义为:
unzip - list, test and extract compressed files in a ZIP archive
命令格式
1 | $ unzip [选项] file.zip [成员...] [-d 目录] [-x 排除...] |
解压到当前目录
1 | $ unzip file.zip |
指定目录解压
1 | $ unzip archive.zip -d /path/where/to/extract |
排除某些成员
包很大、个别文件暂时不需要时:
1 | $ unzip file.zip -x data |
先打包后解压的完整闭环,另一半在 :ref:linux_zip_beginner。