1

I have been trying to zip a folder using the terminal and excluding the Google Drive pesky "Icon" file.

This is the command I tried using:

zip my-zipped-folder.zip -r folder-to-zip/ -x "Icon" "*.DS_Store"

# Also tried \r and ^M
zip ... -x "Icon\r" "Icon^M"

For some reason excluding the .DS_Store file works, but excluding the Icon file does not.

Does anybody know how to exclude the Icon file from the final zip?

1 Answer 1

2

Instead of -x "Icon" use -x "*Icon*"

2
  • Did you use strong quotes: ' or weak quotes: " ?
    – fd0
    Commented May 5, 2015 at 11:33
  • This works on my OS X box- -x "*Icon*"
    – fd0
    Commented May 5, 2015 at 11:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .