DEV Community

I.G
I.G

Posted on

How to exclude a file or folder when zipping a folder (on Mac)

# ex: zip -r app.zip ./app -x "*node_modules*"
# ex2: zip -r app.zip ./zpp -x "*.pyc*"

zip -r <ZIP_FILE_NAME> <TARGET_FOLDER_PATH> -x "*<FILE_OR_FOLDER_PATTERN>*"
Enter fullscreen mode Exit fullscreen mode

Create a zip file excluding a specified file or folder(ja)

Top comments (0)