From e00f9214ef85e980b343df2bdf4066d3933f5a7f Mon Sep 17 00:00:00 2001 From: Being simple Date: Sat, 20 Feb 2016 11:59:18 +0800 Subject: [PATCH] add a zip cmd zip exclude some patterns --- pages/common/zip.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/zip.md b/pages/common/zip.md index 7750484b8..4b27158fc 100644 --- a/pages/common/zip.md +++ b/pages/common/zip.md @@ -13,3 +13,7 @@ - Remove unwanted files from an existing zip file: `zip -d {{compressed.zip}} "{{foo/*.tmp}}"` + +- Remove unwanted pattern files from target dirs: + +`zip -r {{compressed.zip}} {{target_dirs}} -x \*.git\* \*node_modules\* ...`