# Ubuntu
$ man tar
...
-X, --exclude-from=FILE
Exclude files matching patterns listed in FILE.
# macOS
$ man tar
...
-X filename, --exclude-from filename
Read a list of exclusion patterns from the specified file. See --exclude for more information about the handling of exclusions.