[NTLUG:Discuss] tar --exclude doesn't

Cameron, Thomas Thomas.Cameron at bankofamerica.com
Wed Oct 1 16:32:16 CDT 2003


> -----Original Message-----
> From: Courtney Grimland [mailto:cgrimland at yahoo.com]
> Sent: Wednesday, October 01, 2003 4:06 PM
> To: NTLUG Discussion List
> Subject: Re: [NTLUG:Discuss] tar --exclude doesn't
> 
> 
> >  From the man page:
> > 
> >   --exclude=FILE
> >         exclude file FILE
> > 
> > Please note, a single file, no globbing promised.
> > 
> > [globbing, a.k.a wildcard expansion; in general unix utils don't do
> > this 
> > themselves, the shell does it for you and passes the now multiple
> > args to the 
> > program (or the wildcarded string if there is no expansion
> > possible)]
> 
> [root at mercury ~]# tar --help | grep exclude
>     --exclude=PATTERN      exclude files, given as a globbing PATTERN
> -X, --exclude-from=FILE    exclude globbing patterns listed in FILE
> 
> 
> Quoting the PATTERN with single quotes should tell the shell not to
> do it's own expansion, but I still get the same results no matter how
> I quote it.  I agree that your approaches both should work, given
> what I've found that works and what doesn't.  I was more concerned
> with whether or not I was misinterpreting something, or if tar was
> simply not doing what it says it will do.
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> 
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
> 


My tar commands always wind up looking really ugly:

tar zcvf /dev/nst0 \
  --exclude /proc \
  --exclude /dev \
  --exclude /tmp \
/

But they work.  ;-)

--
Thomas Cameron, RHCE, CNE, MCSE, MCT
Assistant Vice President
Linux Design and Engineering
Bank of America

The opinions expressed in this message are mine alone and do not necessarily reflect the opinions of my employer, Bank of America. 



More information about the Discuss mailing list