Skip to content

Instantly share code, notes, and snippets.

@zxhfighter

zxhfighter/tar-exclude.md

Last active Apr 9, 2021
Embed
What would you like to do?
using `--exclude` in tar command

Mac 下打包排除目录,--exclude 参数必须紧跟在 tar 命令后边,否则不会生效。

tar --exclude="*.pkg" --exclude=".git" --exclude="node_modules*" -cvzf weirwood-node.tar.gz weirwood-node/

tar --exclude="*.pkg" --exclude="dist" --exclude="upload-files"  --exclude="log" --exclude="upload-files-source" --exclude="sourcemap-cache" --exclude=".git" --exclude="node_modules*" -cvzf weirwood-node.tar.gz weirwood-node/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment