Skip to content

Instantly share code, notes, and snippets.

@tadone
Last active March 13, 2018 10:06
Show Gist options
  • Save tadone/f7a40839eecdb4a14f5bafdc322b51f0 to your computer and use it in GitHub Desktop.
Save tadone/f7a40839eecdb4a14f5bafdc322b51f0 to your computer and use it in GitHub Desktop.
[tar --exclude] Exclude some folder
# Exclude folder from tar
$ tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .
# Make sure to put --exclude before the source and destination items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment