当我们在Mac系统压缩时,系统会给你默认放一个__MACOSX目录,如果你用系统直接解压不会出现这个目录,但是如果你用命令或者在win上解压,这个目录就显现出来了。
所以这里说下用命令解压时不解压__MACOSX目录的方法。解压命令为:
unzip shell.zip -x __MACOSX/*
这样解压后就不会生成 __MACOSX目录了。
博客原文地址:http://blog.csdn.net/showhilllee/article/details/47067115
PS.附上zip和unzip相关参数及解释:
UnZip 5.52 of 28 February 2005, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
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 list files (short format)
-f freshen existing files, create none -t test compressed archive data
-u update files, create if necessary -z display archive comment
-x exclude files that follow (in xlist) -d extract files into exdir
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
Examples (see unzip.txt for more info):
unzip data1 -x joe => extract all files except joe from zipfile data1.zip
unzip -p foo | more => send contents of foo.zip via pipe into program more
unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
转载请注明出处http://blog.csdn.net/showhilllee/article/details/47067115
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/showhilllee/article/details/47067115