From: John P. Looney (valen at domain redbrick.dcu.ie)
Date: Tue 18 May 1999 - 12:18:00 IST
On Tue, May 18, 1999 at 11:41:00AM +0100, Dave O'Flynn mentioned:
> ><Noel>
> >Somebody correct me if I'm wrong - I'm still in the newbie phase myself - but
> >tar -xzf <filename> should unzip that. I think either that or gzip but
> >I always use tar myself.
> I think it might be:
> uncompress linpack.tar.Z
> then:
> tar -xvf linpack.tar
Tar understands compressed (.Z) and gzipped (.gz) binaries. I've a little
shell function that may be handy, for people that want to save time. It
uncompresses a number of files into the current directory. The usage is:
unarc filename.tar.gz filename.zip ...
Stick it in your .bashrc or something.
unarc () {
for file in $*
do
if [ "`echo $file | grep bz2`" != "" ] ; then
echo Unarchiving bzipped tarfile $file...
nice bzip2 -dc $file | tar xf -
elif [ "`echo $file | grep zip`" != "" ] ; then
echo Unarchiving pkzipped file $file...
nice unzip -L -q $file
elif [ "`echo $file | grep tar.gz`" != "" ] ; then
echo Unarchiving gzipped tarfile $file...
nice gzip -dc $file | tar xf -
elif [ "`echo $file | grep tgz`" != "" ] ; then
echo Unarchiving gzipped tarfile $file...
nice gzip -dc $file | tar xf -
elif [ "`echo $file | grep tar.Z`" != "" ] ; then
echo Unarchiving gzipped tarfile $file...
nice gzip -dc $file | tar xf -
else
echo Unarchiving tarfile $file...
nice tar xf $file
fi
done
}
--
Is PIRACY killing the Amiga?" bravely ponders AMIGA FORMAT -
well, either that or someone's stopped manufacturing the hardware.
-- www.ntk.net (30.04.99)
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:12 GMT