Created
August 22, 2014 05:14
-
-
Save zodiac1111/09326228b57e4e095f73 to your computer and use it in GitHub Desktop.
tar 压缩,排除文件,目录,符号连接,指定用户
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --numeric-owner:指定解压出来的文件所有者为root,因为目标为root(0)用于 | |
tar --exclude="$(DIST_PAGKE)" --exclude=".svn" --exclude=".git" \ | |
--exclude="etc" \ | |
--exclude="data/config" \ | |
--exclude="*.log" \ | |
--exclude="scss" \ | |
--exclude=".project" --exclude=".gitignore" --exclude=".cproject" \ | |
-hczf $(DIST_PAGKE) -C $(DIST_DIR) . \ | |
--numeric-owner --owner=0 --group=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment