tar --exclude not working

Ken Shaffer strobelight.audio@gmail.com
Wed Feb 14 13:57:00 GMT 2007


> tar tf test.tar --anchored --exclude="D:/"

temp$ tar tf tartest.tar -P
c:/temp/file1
file2

temp$ tar tf tartest.tar -P --anchored --exclude='/temp'
file2

So, if you really want to exclude your D:/Bkp files, you could enter:

  tar tf test.tar --anchored --exclude='/Bkp'

The -P option used on my test tar file forced absolute paths and I
didn't get the message "tar: Removing leading `c:/' from member
names".  In fact, this message clued me to how I might exclude the
desired file. Even though it says it removed "c:/", it appears it only
removed "c:" since I had to provide the leading / to exclude the file.

mount points may also have something to do with the behaviour:

   c:\temp on /tmp type system (binmode)
   c: on /c type system (binmode)


But, in any event, I'd also agree there's something up with --exclude.

Ken

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list