This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: tar --exclude not working
- From: "Ken Shaffer" <strobelight dot audio at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 14 Feb 2007 08:57:39 -0500
- Subject: 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/