1、簡介
程式unzip可以解壓縮zip檔案。
2、文法
Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir; file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).
-p extract files to pipe, no messages
-l 顯示壓縮檔內所包含的檔案。
-f 更新現有的檔案
-t 檢查壓縮檔是否正確
-u update files, create if necessary
-z display archive comment
-x 指定不要處理.zip壓縮檔中的哪些檔案
-d 指定檔案解壓縮後所要儲存的目錄
modifiers:
-q quiet mode (-qq => quieter)
-n never overwrite existing files
-a auto-convert any text files
-o overwrite files WITHOUT prompting
-aa treat ALL files as text
-j junk paths (do not make directories)
-v be verbose/print version info
-C match filenames case-insensitively
-L make (some) names lowercase
-X restore UID/GID info
-V retain VMS version numbers
-K keep setuid/setgid/tacky permissions
-M pipe through "more" pager
3、樣本
1)解壓縮war包到指定的目錄
unzip -d test blog.war
參考文獻:百度百科