Could someone give me some pointers on the "--exclude" option for 'tar'?
Specifically, the --exclude option only seems to exclude files and will
not exclude entire directories. Any pointers on how to make it work for
entire directories?
For example, the following commands will *not* work:
tar cv --exclude=/var/tmp/directory-to-exclude -f var.tar /var
tar cv --exclude=/var/tmp/directory-to-exclude/* -f var.tar /var
It seems that 'tar' wants me to list every single specific file to be
excluded. This is a problem because the to-be-excluded directory has
thousands of files, subdirectories, etc, etc, etc... Any clues?
BTW, I am aware of the "--exclude-file" option too, but this won't work
because many of the files in the to-be-excluded directory are constantly
changing and there are new files constantly being added/removed. Thus, I
can't really feed it a 'ls' output because there are always new files
getting added/removed.
Any pointers? Thanks!
--
== Jay Jacobson
== Edgeos, Inc. --
http://www.edgeos.com
==
== Automated Information Security and Vulnerability Assessment