From owner-freebsd-questions Tue Dec 8 09:42:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA22388 for freebsd-questions-outgoing; Tue, 8 Dec 1998 09:42:06 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail.HiWAAY.net (fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA22383 for ; Tue, 8 Dec 1998 09:42:05 -0800 (PST) (envelope-from dkelly@mail.HiWAAY.net) Received: (from dkelly@localhost) by mail.HiWAAY.net (8.9.0/8.9.0) id LAA21539; Tue, 8 Dec 1998 11:41:08 -0600 (CST) Date: Tue, 8 Dec 1998 11:41:08 -0600 (CST) From: David Kelly Message-Id: <199812081741.LAA21539@mail.HiWAAY.net> To: billh@finsco.com, marko@uk.radan.com Subject: Re: tar Cc: freebsd-questions@FreeBSD.ORG Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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: 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message