Skip to content

Instantly share code, notes, and snippets.

@esafwan
Created November 29, 2013 12:11
Show Gist options
  • Save esafwan/7704841 to your computer and use it in GitHub Desktop.
Save esafwan/7704841 to your computer and use it in GitHub Desktop.
Simple command in Linux terminal to tar file by excluding individual directory within which you don't want.
tar --exclude='path/to/exclude' -zcvf filename-you-want.tar.gz /directory/to/archive
#also possible in multiple
tar --exclude='path/to/exclude1' --exclude='path/to/exclude2' -zcvf filename-you-want.tar.gz /directory/to/archive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment