Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jan 1999 01:19:08 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        jahanur <jahanur@jjsoft.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: How do I untar multiple *.tar files?
Message-ID:  <19990103011908.A56131@dan.emsphone.com>
In-Reply-To: <Pine.BSF.3.96.990102234350.7791A-100000@runner.jjsoft.com>; from "jahanur" on Sat Jan  2 23:55:07 GMT 1999
References:  <Pine.BSF.3.96.990102234350.7791A-100000@runner.jjsoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jan 02), jahanur said:
> Hi Everybody,
> I am new to Unix.
> 
> Is there any command to untar a lot of *.tar files at one command.
> 
> I have tried doing #tar xv *.* /cdrom/dir/ 
> 
> It does not work. Please help!

Under Unix, wildcards are expanded before the command is executed.  Try
this (if you're using a sh-based shell):

cd /destination
for i in /cdrom/dir/*.tar ; do tar xv $i ; done

	-Dan Nelson
	dnelson@emsphone.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?19990103011908.A56131>