Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jan 1999 23:11:07 -0800 (PST)
From:      Mike Meyer <mwm@phone.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: How do I untar multiple *.tar files?
Message-ID:  <Pine.BSF.4.05.9901022307450.11212-100000@guru.phone.net>
In-Reply-To: <Pine.BSF.3.96.990102234350.7791A-100000@runner.jjsoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
With a loop. I'm not sure what the last argument to tar is, but if
it's where the tar files live, it'd look like this in an sh variant:

	for f in /cdrom/dir/*.*; do; tar xv $f; done

If you do this often enough, a function for that purpose might be
appropriate. Add this to your startup file (needs to be an sh shell
variant, not csh):

untardir() {
	for f in $1/*.*
	do
		untar $f
	done
}
		
	<mike

On Sat, 2 Jan 1999, jahanur wrote:

> Date: Sat, 2 Jan 1999 23:55:07 -0600 (CST)
> From: jahanur <jahanur@jjsoft.com>
> To: freebsd-questions@FreeBSD.ORG
> Subject: How do I untar multiple *.tar files?
> 
> 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!
> 
> Thanks
> 
> Jahanur
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 


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?Pine.BSF.4.05.9901022307450.11212-100000>