From owner-freebsd-questions Tue Dec 8 16:44:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA07393 for freebsd-questions-outgoing; Tue, 8 Dec 1998 16:44:22 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from post.mail.demon.net (post-20.mail.demon.net [194.217.242.27]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA07386 for ; Tue, 8 Dec 1998 16:44:19 -0800 (PST) (envelope-from marko@uk.radan.com) Received: from [158.152.75.22] (helo=uk.radan.com) by post.mail.demon.net with smtp (Exim 2.054 #1) id 0znXjf-0005wR-00; Wed, 9 Dec 1998 00:44:11 +0000 Organisation: Radan Computational Ltd., Bath, UK. Phone: +44-1225-320320 Fax: +44-1225-320311 Received: from beavis.uk.radan.com (beavis [193.114.228.122]) by uk.radan.com (8.6.10/8.6.10) with SMTP id AAA00308; Wed, 9 Dec 1998 00:43:38 GMT Received: from uk.radan.com (rasnt-1) by beavis.uk.radan.com (4.1/SMI-4.1) id AA21644; Wed, 9 Dec 98 00:43:33 GMT Message-Id: <366DC6AD.25E8B7E8@uk.radan.com> Date: Wed, 09 Dec 1998 00:39:09 +0000 From: Mark Ovens X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en-GB Mime-Version: 1.0 To: David Kelly Cc: billh@finsco.com, freebsd-questions@FreeBSD.ORG Subject: Re: tar References: <199812081741.LAA21539@mail.HiWAAY.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Kelly wrote: > > Mark Ovens 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