Date: Tue, 8 Dec 1998 11:41:08 -0600 (CST) From: David Kelly <dkelly@mail.HiWAAY.net> To: billh@finsco.com, marko@uk.radan.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: tar Message-ID: <199812081741.LAA21539@mail.HiWAAY.net>
next in thread | raw e-mail | index | archive | help
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:
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812081741.LAA21539>
