First here is the directory structure: test/ test/subtest1/ test/subtest1/subtest11.xml test/subtest1/subtest12.xml test/subtest1/subtest13.xml test/subtest1/subtest2/ test/subtest1/subtest2/subtest21.xml test/subtest1/subtest2/subtest22.xml test/subtest1/subtest2/subtest23.xml test/subtest2/ test/subtest2/subtest21.xml test/subtest2/subtest22.xml test/subtest2/subtest23.xml test/subtest3/ test/subtest3/subtest31.xml test/subtest3/subtest32.xml test/subtest3/subtest33.xml test/test1.xml test/test2.xml test/test3.xml
I want to archive test. I want to exclude the directory test/subtest1/subtest2 I have tried every combination of this command that I can think of and nothing has worked. tar -cvf test.tar test --exclude=test/subtest1/subtest2 tar -cvf test.tar test --exclude=test/subtest1/subtest2/ tar -cvf test.tar test --exclude=subtest1/subtest2 tar -cvf test.tar test --exclude=subtest1/subtest2/ tar -cvf test.tar test --exclude="test/subtest1/subtest2" tar -cvf test.tar test --exclude="test/subtest1/subtest2/" tar -cvf test.tar test --exclude="subtest1/subtest2" tar -cvf test.tar test --exclude="subtest1/subtest2/" tar -cvf test.tar test --exclude='test/subtest1/subtest2' tar -cvf test.tar test --exclude='test/subtest1/subtest2/' tar -cvf test.tar test --exclude='subtest1/subtest2' tar -cvf test.tar test --exclude='subtest1/subtest2/' tar -cvf test.tar --exclude=test/subtest1/subtest2 test .... all the same cases as above tar -c -v --exclude=test/subtest1/subtest2 test -f test.tar .... all the same cases as above I have also tried removing the "=" and converting to all absolute paths. Everything has produced the exact same result. The test/subtest1/subtest2 is archived. I am using GNU tar on Windows 7 Service Pack 1. Here is the --version result: tar (GNU tar) 1.13 Copyright (C) 1988, 92,93,94,95,96,97,98, 1999 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by John Gilmore and Jay Fenlason. Many years ago I used tar to create archives using excludes. I have tried repeating what I did back then but got the same result. Thanks, Randy Powers