Re: How to untar .tar.gz when you don't have "-z" option?

From: Ted Nolan (ted_at_loft.tnolan.com)
Date: 10/26/05


Date: Wed, 26 Oct 2005 16:15:53 GMT

In article <1130340711.877575.274190@g14g2000cwa.googlegroups.com>,
 <phillip.s.powell@gmail.com> wrote:
>
>
>I am not used to this interface, sorry! AUGH!
>
>Ok, an update.. I was able to to find an alternative to "tar -z", only
>that it fails using FreeBSD UNIX:
>
>[BASH]
>cd $1
>hasGunzip=`which gunzip | grep -E 'no gunzip'`
>if [ -n $hasGunzip ]; then
> gunzip -c $1/$3_$4.tar.gz | tar -xvf
>else
> echo "You can't unzip, you're screwed"
> exit
>fi
>[/BASH]
>
>However, upon using this code I get the following error message:
>
>[Quote]
>
>tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile]
>[blocksize] [[-C directory] file] ...
>
>[/Quote]
>
>However, using Red Hat Enterprise Level 3 version of UNIX, the
>untarring takes place with no faults of any kind.
>
>The destination, however, is FreeBSD so it must work for both platforms
>of UNIX.
>
>Phil
>
>phillip.s.powell@gmail.com wrote:
>> Sorry, not an option in this case. It has to be packaged up and sent
>> to a system that doesn't have "tar -z" option (although it does have
>> gzip/gunzip though)
>>
>> Phil
>

Just a note:

If the FreeBSD system you are using doesn't support -z, then it is something
the hosting company has done to break it. Out of the box, both FreeBSD 4.x &
FreeBSD 5.x support 'z' in the default /usr/bin/tar

                                Ted



Relevant Pages

  • Re: Newbie Experience
    ... I've only been around since FreeBSD 5.4 ... FreeBSD kernel too. ... always sunshine and linux is farts. ... in the hey day of AT&T Unix I'm ...
    (freebsd-questions)
  • Re: Naming confusion
    ... what I've seen all across the UNIX world. ... me to FreeBSD was that the Mac OS-X was based on FreeBSD. ... >will tend to have an adverse reaction to the hostname and IP number ... >flexible configuration-wise as a MacOS box is. ...
    (freebsd-questions)
  • A strategic question
    ... download and install the SP2 than to install Windows XP. ... As opposed to Linux and free BSD implementations of UNIX, ... I came to FreeBSD, with the idea that it had a more homogeneous quality ...
    (freebsd-questions)
  • Re: wireless help
    ... I am completely new to linux and need help with wireless connectivity. ... Technically, FreeBSD is not Linux. ... Bell Labs Unix ...
    (freebsd-questions)
  • Re: learning unix w/ fbsd?
    ... Commando taught me that the flag options were both useful ... > Given the loss of commando in OS X and the improvements in FreeBSD ... > Mac, but that was never the point of FreeBSD. ... It is instructive to recall what the first /killer app/ for AT&T unix ...
    (comp.unix.bsd.freebsd.misc)