I'm trying to exclude a certain folder and its contents from an archive. I tried
Code:
$ tar --create --file="test.tar" --exclude="test/folder1" test
However, this not only excludes the file
, but also other files matching that pattern, e.g.
Code:
./test/somefolder/test/folder1
Is there some way to exclude
exactly this one file?
Giving the full pathname, as in
Code:
--exclude="/home/username/test/folder1
results in tar excluding nothing at all.
I already serarched the web and the tar manpages, but I did not find anything regarding that issue.
Any help is appreciated.