在没有__MACOSX元数据的情况下,Automator Bash脚本在MacOS Finder中创建一个干净的zips

Finder压缩到ZIP,但总是包含无关的元数据文件(__MACOSX和. ds_store)文件和文件夹,可能会混淆其他程序。一种选择是创建它们,然后编辑ZIP。这个可以独立工作或automator脚本接受多个选择(文件或文件夹)并创建一个zip
.

0

linux命令:echo "$@" for f in "$@"; do FILENAME=${f##*/};FILEPATH=${f%/*}; cd "${FILEPATH}"; zip -r "${f}".zip "${FILENAME}" -x "*.DS_Store" -x "__MACOSX"; done; afplay /System/Library/Sounds/Sosumi.aiff /System/Library/Sounds/Sosumi.aiff afplay done; "__MACOSX"; -x "*.DS_Store" -x "${FILENAME}" "${f}".zip -r zip "${FILEPATH}"; cd FILENAME=${f##*/};FILEPATH=${f%/*}; do "$@"; in f for "$@" echo echo "$@" for f in "$@"; do FILENAME=${f##*/};FILEPATH=${f%/*}; cd "${FILEPATH}"; zip -r "${f}".zip "${FILENAME}" -x "*.DS_Store" -x "__MACOSX"; done; afplay /System/Library/Sounds/Sosumi.aiffrootopen.com
linux命令:echo "$@" for f in "$@"; do FILENAME=${f##*/};FILEPATH=${f%/*}; cd "${FILEPATH}"; zip -r "${f}".zip "${FILENAME}" -x "*.DS_Store" -x "__MACOSX"; done; afplay /System/Library/Sounds/Sosumi.aiff /System/Library/Sounds/Sosumi.aiff afplay done; "__MACOSX"; -x "*.DS_Store" -x "${FILENAME}" "${f}".zip -r zip "${FILEPATH}"; cd FILENAME=${f##*/};FILEPATH=${f%/*}; do "$@"; in f for "$@" echo echo "$@" for f in "$@"; do FILENAME=${f##*/};FILEPATH=${f%/*}; cd "${FILEPATH}"; zip -r "${f}".zip "${FILENAME}" -x "*.DS_Store" -x "__MACOSX"; done; afplay /System/Library/Sounds/Sosumi.aiffrootopen.com
rlim 2018-10-22 21:06:40
输出

评论

相关推荐
共收录0条命令行
这里是记录和分享命令行的地方, 所有命令行都可以进行评论、提交替代方案.

热门文章