This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tar --exclude not working


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]