I think this may depend on your version of tar. You can use "man tar" or "tar -help" to find out the details of your version. But the options I found are as follows:
tar -X filename: excludes everything listed in this text file tar --exclude = pattern: excludes everything that matches the pattern
source
share