I am trying to exclude multiple directories when using tar. I can do it for just one directory with --exclude=directory
I can also do it for multiple directories by typing that code again and again. But.. I now have this:
tar -czpv --exclude="$EXCLUDE"
where the $EXCLUDE is a variable that looks like this:
As you can see im trying to call this variable that has endless amounts of directories in it seperated by a space.. but when run it doesnt work! It will however work if i just put one directory in the variable. Any ideas?
Also.. i tried --exclude-tag --exclude-tag-all --exclude-tag-under but to no avail.
Any help would be greatly appreciated!