码迷,mamicode.com
首页 > 系统相关 > 详细

Mac解压命令之不解压__MACOSX相关文件

时间:2015-07-26 14:19:24      阅读:286      评论:0      收藏:0      [点我收藏+]

标签:shell   mac   解密   unzip   macosx   

当我们在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

版权声明:本文为博主原创文章,未经博主允许不得转载。

Mac解压命令之不解压__MACOSX相关文件

标签:shell   mac   解密   unzip   macosx   

原文地址:http://blog.csdn.net/showhilllee/article/details/47067115

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!