Date: Wed, 09 Dec 1998 00:39:09 +0000 From: Mark Ovens <marko@uk.radan.com> To: David Kelly <dkelly@mail.hiwaay.net> Cc: billh@finsco.com, freebsd-questions@FreeBSD.ORG Subject: Re: tar Message-ID: <366DC6AD.25E8B7E8@uk.radan.com> References: <199812081741.LAA21539@mail.HiWAAY.net>
next in thread | previous in thread | raw e-mail | index | archive | help
David Kelly wrote: > > Mark Ovens <marko@uk.radan.com> writes: > > Bill Hamilton wrote: > > > > > > This should be an easy question for someone that uses tar alot. > > > I was trying to recover the *.dist files into /etc/mtree that I > > > clobbered by accident (don't ask). > > > I used the bin.?? from my /dos/freebsd/bin directory from the install > > > to do a cat bin.?? | tar -vtzf - | grep etc/mtree > > > and it displayed the files. But when I do this: > > > > > > cat bin.?? | tar -vxzf - etc/mtree/BSD* -C /etc/mtree > > > > You can't use wildcards in the list of files to extract > > (etc/mtree/BSD*) > > Sure you can. You just have to escape them from the shell as tar > doesn't get to see the asterix as its used above. Example: > I stand corrected. Traditionally tar can't handle wildcards when extracting, at least all the *nix I've used (mainly SunOS) can't. GNU tar has obviously addressed this. > Grumpy: {1004} cd /etc/mtree > Grumpy: {1005} ls > BSD.include.dist BSD.root.dist BSD.var.dist > BSD.local.dist BSD.usr.dist > Grumpy: {1006} tar -cvf /tmp/tar * > BSD.include.dist > BSD.local.dist > BSD.root.dist > BSD.usr.dist > BSD.var.dist > Grumpy: {1007} tar -tvf /tmp/tar "*root*" > -r--r--r-- root/wheel 798 Mar 10 06:52 1997 BSD.root.dist > Grumpy: {1008} > > -- > David Kelly N4HHE, dkelly@hiwaay.net (hm) > ====================================================================== > The human mind ordinarily operates at only ten percent of its > capacity -- the rest is overhead for the operating system. -- Trust the computer industry to shorten Year 2000 to Y2K. It was this thinking that caused the problem in the first place. Mark Ovens, CNC Applications Engineer, Radan Computational Ltd Sheet Metal CAD/CAM Solutions mailto:marko@uk.radan.com http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?366DC6AD.25E8B7E8>