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

This is a discussion on How to untar .tar.gz when you don't have "-z" option? - Unix ; In article , wrote: > > >See below.. thanx > >Dave Hinz wrote: >> On 26 Oct 2005 08:31:51 -0700, phillip.s.powell@gmail.com > wrote: >> > I am not used to this interface, sorry! AUGH! >> >> If you subscribe to ...

+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 21 to 40 of 47

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

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

    In article <1130343646.404574.79430@g47g2000cwa.googlegroups.c om>,
    wrote:
    >
    >
    >See below.. thanx
    >
    >Dave Hinz wrote:
    >> On 26 Oct 2005 08:31:51 -0700, phillip.s.powell@gmail.com

    > wrote:
    >> > I am not used to this interface, sorry! AUGH!

    >>
    >> If you subscribe to news.individual.net for 10 euro a year (13 bucks or
    >> so), you can use a real newsreader and not have to suffer with google.
    >>
    >> > hasGunzip=`which gunzip | grep -E 'no gunzip'`

    >>
    >> All that proves is that it's not in your path. Ask your draconian
    >> hosting company where gzip and whatever you need, is located. If they
    >> don't know, or won't tell you, or it's not there and they won't fix
    >> that, get a better hosting company.

    >
    >Thanx, but that is not quite my problem. The problem is that I get an
    >error message when I'm trying to pipe a gunzip command on the file into
    >a tar command.
    >
    >[BASH]
    >gunzip -c $1/$3_$4.tar.gz | tar -xvf
    >[/BASH]
    >
    >produces
    >
    >
    >tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile]
    >[blocksize] [[-C directory] file] ...
    >
    >
    >Phil
    >


    Explicitly specify stdin, never hurts to thrown in 'B' either:

    gunzip -c $1/$3_$4.tar.gz | tar xBvf -


    Ted

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


    Thomas Richter wrote:
    > Hi,
    >
    > >
    > > tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile]
    > > [blocksize] [[-C directory] file] ...
    > >

    >
    > $ man tar
    >
    > So long,
    > Thomas


    That did not help me one bit.

    Phil


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

    Following are the error messages the code generated:


    gunzip: /home/adnetint/web/tools/adnet_10242005.tar.gz: No such file or
    directory
    tar: B: unknown option
    When using

    [BASH]
    gunzip -c "$1/$3_$4.tar.gz" | tar xBvf -

    Taking out the B option I then get this:


    gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    directory
    Tar: blocksize = 0; broken pipe?
    So it appears that the option you and Stephane came up with sadly also
    breaks on this FreeBSD Unix platform as well. WOW

    Phil


    Ted Nolan wrote:
    > In article <1130343646.404574.79430@g47g2000cwa.googlegroups.c om>,
    > wrote:
    > >
    > >
    > >See below.. thanx
    > >
    > >Dave Hinz wrote:
    > >> On 26 Oct 2005 08:31:51 -0700, phillip.s.powell@gmail.com

    > > wrote:
    > >> > I am not used to this interface, sorry! AUGH!
    > >>
    > >> If you subscribe to news.individual.net for 10 euro a year (13 bucks or
    > >> so), you can use a real newsreader and not have to suffer with google.
    > >>
    > >> > hasGunzip=`which gunzip | grep -E 'no gunzip'`
    > >>
    > >> All that proves is that it's not in your path. Ask your draconian
    > >> hosting company where gzip and whatever you need, is located. If they
    > >> don't know, or won't tell you, or it's not there and they won't fix
    > >> that, get a better hosting company.

    > >
    > >Thanx, but that is not quite my problem. The problem is that I get an
    > >error message when I'm trying to pipe a gunzip command on the file into
    > >a tar command.
    > >
    > >[BASH]
    > >gunzip -c $1/$3_$4.tar.gz | tar -xvf
    > >[/BASH]
    > >
    > >produces
    > >
    > >
    > >tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile]
    > >[blocksize] [[-C directory] file] ...
    > >
    > >
    > >Phil
    > >

    >
    > Explicitly specify stdin, never hurts to thrown in 'B' either:
    >
    > gunzip -c $1/$3_$4.tar.gz | tar xBvf -
    >
    >
    > Ted



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

    Following are the error messages the code generated:


    gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    directory
    tar: B: unknown option
    When using

    [BASH]
    gunzip -c "$1/$3_$4.tar.gz" | tar xBvf -

    Taking out the B option I then get this:


    gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    directory
    Tar: blocksize = 0; broken pipe?
    So it appears that the option you and Stephane came up with sadly also
    breaks on this FreeBSD Unix platform as well. WOW

    Phil
    Ted Nolan wrote:
    > In article <1130343646.404574.79430@g47g2000cwa.googlegroups.c om>,
    > wrote:
    > >
    > >
    > >See below.. thanx
    > >
    > >Dave Hinz wrote:
    > >> On 26 Oct 2005 08:31:51 -0700, phillip.s.powell@gmail.com

    > > wrote:
    > >> > I am not used to this interface, sorry! AUGH!
    > >>
    > >> If you subscribe to news.individual.net for 10 euro a year (13 bucks or
    > >> so), you can use a real newsreader and not have to suffer with google.
    > >>
    > >> > hasGunzip=`which gunzip | grep -E 'no gunzip'`
    > >>
    > >> All that proves is that it's not in your path. Ask your draconian
    > >> hosting company where gzip and whatever you need, is located. If they
    > >> don't know, or won't tell you, or it's not there and they won't fix
    > >> that, get a better hosting company.

    > >
    > >Thanx, but that is not quite my problem. The problem is that I get an
    > >error message when I'm trying to pipe a gunzip command on the file into
    > >a tar command.
    > >
    > >[BASH]
    > >gunzip -c $1/$3_$4.tar.gz | tar -xvf
    > >[/BASH]
    > >
    > >produces
    > >
    > >
    > >tar: usage tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile]
    > >[blocksize] [[-C directory] file] ...
    > >
    > >
    > >Phil
    > >

    >
    > Explicitly specify stdin, never hurts to thrown in 'B' either:
    >
    > gunzip -c $1/$3_$4.tar.gz | tar xBvf -
    >
    >
    > Ted



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

    In article <1130345891.394947.85660@o13g2000cwo.googlegroups.c om>,
    wrote:
    >
    >
    >Following are the error messages the code generated:
    >
    >
    >
    >gunzip: /home/adnetint/web/tools/adnet_10242005.tar.gz: No such file or
    >directory
    >tar: B: unknown option
    >
    >
    >
    >When using
    >
    >[BASH]
    >gunzip -c "$1/$3_$4.tar.gz" | tar xBvf -
    >
    >Taking out the B option I then get this:
    >
    >
    >
    >gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    >directory
    >Tar: blocksize = 0; broken pipe?
    >
    >
    >
    >So it appears that the option you and Stephane came up with sadly also
    >breaks on this FreeBSD Unix platform as well. WOW
    >
    >Phil
    >
    >


    OK, there is definitely an odd version of tar on that platform, as
    stock FreeBSD tar supports 'B'. However, that being said, your
    problme here:


    gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    directory
    Tar: blocksize = 0; broken pipe?
    is plain, as gunzip is telling you. For whatever reason, your transfer
    failed, it transferred to the wrong place, whatever, the file

    /home/me/web/tools/app_10242005.tar.gz

    does not exist and thus cannot be unzipped. The 'broken pipe' error
    from tar is logical in this case since there would have been no
    input in the pipe, since gunzip was unable to put any there.


    Ted

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

    On 26 Oct 2005 10:05:00 -0700, phillip.s.powell@gmail.com wrote:
    > Following are the error messages the code generated:
    >
    > [Quote]
    >
    > gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    > directory


    Sounds like that .gz file doesn't exist. Fix that.

    > tar: B: unknown option


    Sounds like you're using an option that tar doesn't know. That's why
    someone pointed you to the man page.

    > When using
    > [BASH]
    > gunzip -c "$1/$3_$4.tar.gz" | tar xBvf -


    Get rid of all the variables, and type it straight. You're
    overcomplicating your problem.

    > Taking out the B option I then get this:


    > gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or


    That's because app_10242005.tar.gz STILL doesn't exist in
    /home/me/web/tools.

    > directory
    > Tar: blocksize = 0; broken pipe?


    Yes, if the file doesn't exist, you can't extract anything from it.

    > So it appears that the option you and Stephane came up with sadly also
    > breaks on this FreeBSD Unix platform as well. WOW


    No, it appears that you're blaiming people who are trying to help you,
    for basic troubleshooting flaws and inability to read error messages on
    your part. Tell you what - go read this article and learn from it:
    http://www.catb.org/~esr/faqs/smart-questions.html
    If you read it with an open mind, you'll recognize more than a couple
    errors you're making in trying to get help. (not the least of which is
    top-posting).


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

    I'm sorry, but I cannot fully top-post this because I need to point out
    specific issues that you brought up, so my intention is not to offend
    but to be able to clearly illustrate the problem in the hopes that a
    solution would be provided.

    Dave Hinz wrote:
    > On 26 Oct 2005 10:05:00 -0700, phillip.s.powell@gmail.com wrote:
    > > Following are the error messages the code generated:
    > >
    > > [Quote]
    > >
    > > gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    > > directory

    >
    > Sounds like that .gz file doesn't exist. Fix that.
    >


    The .gz file does exist. "ls -l" confirmed just that.


    > > tar: B: unknown option

    >
    > Sounds like you're using an option that tar doesn't know. That's why
    > someone pointed you to the man page.
    >



    That's why I took of the "B" option because apparently the version of
    tar on the FreeBSD UNIX system I'm using remotely does not support that
    option, just like it doesn't support the "z" option

    > > When using
    > > [BASH]
    > > gunzip -c "$1/$3_$4.tar.gz" | tar xBvf -

    >
    > Get rid of all the variables, and type it straight. You're
    > overcomplicating your problem.
    >


    I did just that:

    [BASH]
    gunzip -c /home/me/web/tools/app_10242005.tar.gz | tar xvf -
    [/BASH]

    Produced the same error:

    Following are the error messages the code generated:


    gunzip: /home/adnetint/web/tools/adnet_10242005.tar.gz: No such file or
    directory
    tar: B: unknown option
    When using

    [BASH]
    gunzip -c "$1/$3_$4.tar.gz" | tar xBvf -

    Taking out the B option I then get this:



    ima_unpackager.sh: line 52: /home/me/web/tools/app_10242005.tar.gz: No
    such file or directory

    Phil

    > > Taking out the B option I then get this:

    >
    > > gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or

    >
    > That's because app_10242005.tar.gz STILL doesn't exist in
    > /home/me/web/tools.
    >
    > > directory
    > > Tar: blocksize = 0; broken pipe?

    >
    > Yes, if the file doesn't exist, you can't extract anything from it.
    >



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

    On 26 Oct 2005 11:03:35 -0700, phillip.s.powell@gmail.com wrote:
    > I'm sorry, but I cannot fully top-post this because I need to point out
    > specific issues that you brought up,


    Exactly. Glad to see you stopped top-posting.

    > so my intention is not to offend
    > but to be able to clearly illustrate the problem in the hopes that a
    > solution would be provided.


    > Dave Hinz wrote:
    >> On 26 Oct 2005 10:05:00 -0700, phillip.s.powell@gmail.com wrote:
    >> > Following are the error messages the code generated:
    >> >
    >> > [Quote]
    >> >
    >> > gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    >> > directory

    >>
    >> Sounds like that .gz file doesn't exist. Fix that.


    > The .gz file does exist. "ls -l" confirmed just that.


    So go into that directory and try to gunzip it. If you get a tar file,
    then try to untar that. You're trying to hold too many moving parts
    together at once. Once you break it down to the first failure, then
    troubleshoot _that_, not a shell scipt full of variables and pipes and
    conditionals.

    >> > tar: B: unknown option

    >>
    >> Sounds like you're using an option that tar doesn't know. That's why
    >> someone pointed you to the man page.

    >
    > That's why I took of the "B" option because apparently the version of
    > tar on the FreeBSD UNIX system I'm using remotely does not support that
    > option, just like it doesn't support the "z" option


    See above regarding doing too much at once.

    >> Get rid of all the variables, and type it straight. You're
    >> overcomplicating your problem.


    > I did just that:


    > gunzip -c /home/me/web/tools/app_10242005.tar.gz | tar xvf -


    Stop. Just gunzip the file. Lose the -c, lose the pipe, lose the tar.
    One step at a time. Script and pipe it later.


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

    2005-10-26, 09:58(-07), phillip.s.powell@gmail.com:
    [...]
    > gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    > directory
    > Tar: blocksize = 0; broken pipe?
    >
    > [/Quote]
    >
    > So it appears that the option you and Stephane came up with sadly also
    > breaks on this FreeBSD Unix platform as well. WOW

    [...]

    That's an error from gunzip, not tar.

    Had you done

    gunzip -c < "..." | tar xf -


    as I suggested, you'd have had the error from the shell without
    the need to start the gunzip command. gunzip tells you the file
    doesn't exist.

    --
    Stéphane

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

    phillip.s.powell@gmail.com wrote:

    >
    > That did not help me one bit.
    >
    > Phil


    A hint: what is tar going to untar in the command you have shown.
    --
    Tony

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

    On Wed, 26 Oct 2005 19:24:41 +0100, S. Anthony Sequeira wrote:
    > phillip.s.powell@gmail.com wrote:
    >
    >> That did not help me one bit.


    > A hint: what is tar going to untar in the command you have shown.


    I'll take "not one bit" for a dollar please.

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


    Dave Hinz wrote:
    > On 26 Oct 2005 11:03:35 -0700, phillip.s.powell@gmail.com wrote:
    > > I'm sorry, but I cannot fully top-post this because I need to point out
    > > specific issues that you brought up,

    >
    > Exactly. Glad to see you stopped top-posting.
    >
    > > so my intention is not to offend
    > > but to be able to clearly illustrate the problem in the hopes that a
    > > solution would be provided.

    >
    > > Dave Hinz wrote:
    > >> On 26 Oct 2005 10:05:00 -0700, phillip.s.powell@gmail.com wrote:
    > >> > Following are the error messages the code generated:
    > >> >
    > >> > [Quote]
    > >> >
    > >> > gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    > >> > directory
    > >>
    > >> Sounds like that .gz file doesn't exist. Fix that.

    >
    > > The .gz file does exist. "ls -l" confirmed just that.

    >
    > So go into that directory and try to gunzip it. If you get a tar file,
    > then try to untar that. You're trying to hold too many moving parts
    > together at once. Once you break it down to the first failure, then
    > troubleshoot _that_, not a shell scipt full of variables and pipes and
    > conditionals.



    I went to that file, and instead of a .tar.gz file, I see a .tar file,
    thus, it appears that the decompression was successful, however, at
    that point, gunzip then couldn't seem to find it, which makes no sense
    considering it had to have found it from the beginning to do so.

    I removed the pipe, the tar, everything, and the exact same error
    occurred:

    gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    directory

    Before I ran the script I verified the file existed:

    /home/me/web/tools/app_10242005.tar.gz

    But after I ran the command it became:

    command: gunzip -c /home/me/web/tools/app_10242005.tar.gz

    /home/me/web/tools/app_10242005.tar





    >
    > >> > tar: B: unknown option
    > >>
    > >> Sounds like you're using an option that tar doesn't know. That's why
    > >> someone pointed you to the man page.

    > >
    > > That's why I took of the "B" option because apparently the version of
    > > tar on the FreeBSD UNIX system I'm using remotely does not support that
    > > option, just like it doesn't support the "z" option

    >
    > See above regarding doing too much at once.
    >
    > >> Get rid of all the variables, and type it straight. You're
    > >> overcomplicating your problem.

    >
    > > I did just that:

    >
    > > gunzip -c /home/me/web/tools/app_10242005.tar.gz | tar xvf -

    >
    > Stop. Just gunzip the file. Lose the -c, lose the pipe, lose the tar.
    > One step at a time. Script and pipe it later.



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

    On 26 Oct 2005 11:41:50 -0700, phillip.s.powell@gmail.com wrote:
    >
    > Dave Hinz wrote:


    >> >> Sounds like that .gz file doesn't exist. Fix that.


    >> > The .gz file does exist. "ls -l" confirmed just that.

    >>
    >> So go into that directory and try to gunzip it.


    > I went to that file, and instead of a .tar.gz file, I see a .tar file,


    Do you know why?

    > thus, it appears that the decompression was successful, however, at
    > that point, gunzip then couldn't seem to find it, which makes no sense
    > considering it had to have found it from the beginning to do so.


    It worked at least once, after which time the .gz file no longer
    existed.

    > I removed the pipe, the tar, everything, and the exact same error
    > occurred:


    > gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    > directory


    YOU DON'T HAVE A .GZ FILE TO GUNZIP! You just showed yourself that.
    The gunzip has succeeded. Now do the tar.

    > Before I ran the script I verified the file existed:
    > /home/me/web/tools/app_10242005.tar.gz
    > But after I ran the command it became:
    > command: gunzip -c /home/me/web/tools/app_10242005.tar.gz
    > /home/me/web/tools/app_10242005.tar


    What exactly do you _expect_ that command to do? Hint: it's working
    right. You told it to uncompress the file, and it did. Now do the
    next step.

    Please go read that article.



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


    Dave Hinz wrote:
    > On 26 Oct 2005 11:41:50 -0700, phillip.s.powell@gmail.com wrote:
    > >
    > > Dave Hinz wrote:

    >
    > >> >> Sounds like that .gz file doesn't exist. Fix that.

    >
    > >> > The .gz file does exist. "ls -l" confirmed just that.
    > >>
    > >> So go into that directory and try to gunzip it.

    >
    > > I went to that file, and instead of a .tar.gz file, I see a .tar file,

    >
    > Do you know why?



    DO I know why when I do this:

    ls -l /home/me/web/tools/app_10242005.tar.gz
    /home/me/web/tools/app_10242005.tar.gz
    gunzip -c /home/me/web/tools/app_10242005.tar.gz
    gunzip: /home/adnetint/web/tools/adnet_10242005.tar.gz: No such file or
    directory
    ls -l /home/me/web/tools/app_10242005.tar*
    /home/me/web/tools/app_10242005.tar

    No, can you tell me why?

    Phil


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

    Dave Hinz wrote:
    > On 26 Oct 2005 11:41:50 -0700, phillip.s.pow...@gmail.com wrote:


    > > Dave Hinz wrote:


    > >> >> Sounds like that .gz file doesn't exist. Fix that.


    > >> > The .gz file does exist. "ls -l" confirmed just that.


    > >> So go into that directory and try to gunzip it.


    > > I went to that file, and instead of a .tar.gz file, I see a .tar file,


    > Do you know why?


    DO I know why when I do this:

    ls -l /home/me/web/tools/app_10242005.tar.gz
    /home/me/web/tools/app_10242005.tar.gz
    gunzip -c /home/me/web/tools/app_10242005.tar.gz
    gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    directory
    ls -l /home/me/web/tools/app_10242005.tar*
    /home/me/web/tools/app_10242005.tar

    No, can you tell me why?

    Phil


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

    On 26 Oct 2005 12:15:04 -0700, phillip.s.powell@gmail.com wrote:
    >
    > Dave Hinz wrote:
    >> >> >> Sounds like that .gz file doesn't exist. Fix that.

    >> Do you know why?


    > DO I know why when I do this:


    > ls -l /home/me/web/tools/app_10242005.tar.gz
    > /home/me/web/tools/app_10242005.tar.gz


    That file exists.

    > gunzip -c /home/me/web/tools/app_10242005.tar.gz


    You tell it to unzip /home/me/web/blah...

    > gunzip: /home/adnetint/web/tools/adnet_10242005.tar.gz: No such file or
    > directory


    and it can't find /home/adnetint/web/blah... 'me' and 'adnetint' are
    different.

    > ls -l /home/me/web/tools/app_10242005.tar*
    > /home/me/web/tools/app_10242005.tar


    ....and yet it uncompressed. Did you ever answer the question someone
    else asked about if you're in a chroot jail?



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

    phillip.s.powell@gmail.com wrote:
    >
    > Basically I have to set it up so that the source and destination may,
    > or may not, have "g[un]zip" capabilities since this is a portable web
    > application and thus, the packager has to be equally portable (note
    > that it's a UNIX-only packager for now, will have to create a Windows
    > version whenever I feel like it).
    >
    > An engineering co-worker helped stumble me onto this option:
    >
    > blah=`which gunzip | grep -E 'no gunzip'`
    > # LOOK FOR STRING CONTENT IN $blah - IF IT HAS CONTENT, NO GUNZIP,
    > ELSE, GUNZIP
    >
    > Phil


    You are having problems with compression. Screw it.
    Punt on doing the compression in the first place,
    don't have problems with compression later.

    Make your process simpler, have simpler results.
    "gunzip" the source file in the beginning, work
    with the uncompressed version from then on.


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

    Dave Hinz wrote:

    > On Wed, 26 Oct 2005 19:24:41 +0100, S. Anthony Sequeira
    > wrote:
    >> phillip.s.powell@gmail.com wrote:
    >>
    >>> That did not help me one bit.

    >
    >> A hint: what is tar going to untar in the command you have shown.

    >
    > I'll take "not one bit" for a dollar please.


    It's yours if you collect it I should have read the rest of the thread
    first.
    --
    Tony

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

    In article <1130354643.122771.60090@g14g2000cwa.googlegroups.c om>,
    wrote:
    >Dave Hinz wrote:
    >> On 26 Oct 2005 11:41:50 -0700, phillip.s.pow...@gmail.com wrote:

    >
    >> > Dave Hinz wrote:

    >
    >> >> >> Sounds like that .gz file doesn't exist. Fix that.

    >
    >> >> > The .gz file does exist. "ls -l" confirmed just that.

    >
    >> >> So go into that directory and try to gunzip it.

    >
    >> > I went to that file, and instead of a .tar.gz file, I see a .tar file,

    >
    >> Do you know why?

    >
    >DO I know why when I do this:
    >
    >ls -l /home/me/web/tools/app_10242005.tar.gz
    >/home/me/web/tools/app_10242005.tar.gz
    >gunzip -c /home/me/web/tools/app_10242005.tar.gz
    >gunzip: /home/me/web/tools/app_10242005.tar.gz: No such file or
    >directory
    >ls -l /home/me/web/tools/app_10242005.tar*
    >/home/me/web/tools/app_10242005.tar
    >
    >No, can you tell me why?


    gunzip is ignoring the -c option and just unzipping the file (-c would
    cause the unzipped contents to be printed to standard out but will leave
    the original file unchanged). This might happen if gunzip is a creative
    (read: stupid) alias to gzip or a bizarre shell script or something
    like that.

    What are the results of

    % which gunzip
    % gunzip --help
    % file **path printed by which gunzip**

    Usually gunzip is exactly the same as gzip (and gzcat) and changes its
    behavior based on the name by which you invoke it. You can try

    % gzip -d -c foo.tar.gz

    which specifies decompression (gzip -d should be the same as gunzip) and
    see if that gives you better luck.

    Alan
    --
    Defendit numerus

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

    Got it!!!!

    Turns out that I simply had to call the hosting provider ask him how he
    would do it. He uses the GNU version of tar called 'gtar' which works
    perfectly!

    [BASH]
    unpack()
    {
    cd "$1" || exit; # GO TO PATH OR DIE TRYING
    hasGtar=`which gtar | grep -E 'no gtar'`; # CHECK TO SEE IF gtar IS
    AVAILABLE HERE
    hasGunzip=`which gunzip | grep -E 'no gunzip'`; # CHECK TO SEE IF
    gunzip IS AVAILABLE HERE
    if [ -n $hasGtar ]; then
    gtar -zxvf "$1/${3}_${4}.tar.gz"
    elif [ -n $hasGunzip ]; then
    gunzip -c "$1/${3}_${4}.tar.gz" | tar -xvf -
    else
    echo 'Unable to unpack due to lack of gtar/gzip support, exiting
    now'
    exit
    fi
    cp -pr "$1$2/*" "$1"; # REMOVE TARRED-STRUCTURED SUBFOLDER STRUCTURE
    AND REPLACE INTO EXISTING PATH
    pathRootName=`echo "$2" | cut -d'/' -f2`; # YOU HAVE TO FIND "var" OR
    "home" OR WHATEVER IS THE ROOT PATH NAME OF $origPath
    rm -R "$1/$pathRootName"; # REMOVE TARRED-STRUCTURED SUBFOLDER
    RECURSIVELY
    }
    [/BASH]


+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast