www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/16/05:35:54

From: ams AT ludd DOT luth DOT se (Martin Str|mberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: tar --exclude
Date: 16 Jan 1999 10:27:27 GMT
Organization: University of Lulea, Sweden
Lines: 28
Message-ID: <77ppif$b8n$3@news.luth.se>
References: <77ne5h$3es$1 AT newsserver DOT rrzn DOT uni-hannover DOT de>
NNTP-Posting-Host: queeg.ludd.luth.se
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Dirk Färber (faerber AT ant DOT uni-hannover DOT de) wrote:
: for some reasons I don't know the exclude of specific files doesn't 
: work in the DOS-Shell from Windows95. 
: I've tried:
:   tar -cvz --exclude=*.log -f archive.tgz *
:   tar -cvz --exclude="*.log" -f archive.tgz *
:   tar -cvz --exclude-from=donots -f archive.tgz *
:   tar -cvz -X donots -f archive.tgz *
:   File donots: 
:     *.log
:   
: The rest of tar (version 112) 
: works fine. E.g.:
:   tar -cvzf archive.tgz *
: 
: The manual says, that files explicitly included in the file list override
: the exclude list. I hope, that * is not an explicit inclusion in this 
: sense.

I'm afraid that * is expanded to all the files in the current
directory before it is passed to tar itself. Hence * is an explicit
inclusion. Try "tar -cvz --exclude-from=donots -f archive.tgz .",
which might work.


Right,

							MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019