How do I open a tgz file?

Discussion in 'Mac Applications and Mac App Store' started by kavi, Apr 3, 2008.

  1. macrumors member

    kavi

    Joined:
    Oct 17, 2007
    #1
    I downloaded something and it came in a tgz file. I have absolutely no idea how to unpack or open or whatever this file and the only information I can find from google is that I have to download some $80 stuffit program.

    So is there any other program out there that is free that I can use to open this? I have unarchiver and it doesn't seem to be working.

    Thanks for any help.
     
  2. Retired

    psychofreak

    Joined:
    May 16, 2006
    Location:
    London
    #2
    You need the free Stuffit Expander (just sign up here)...

    This functionality really should come with OSX
     
  3. macrumors 65816

    Joined:
    Aug 20, 2006
    Location:
    Carlisle, PA
    #3
    I thought OS X could open .tgz's... or have I always had stuffit installed?
     
  4. macrumors 6502

    Joined:
    Nov 1, 2006
    #4
    Download the Unarchiver, its free, and better than Stuffit. Or you could use the gunzip command in the terminal and then the tar command, if youre proficient with the command line.
     
  5. Retired

    psychofreak

    Joined:
    May 16, 2006
    Location:
    London
    #5
    The Unarchiver is much more prone to failing, especially with password protected files.
     
  6. thread starter macrumors member

    kavi

    Joined:
    Oct 17, 2007
    #6
    Way for them to hide that free version of the program. I looked all over their site and could only find a 30 day trial that still wanted my credit card number.

    Thanks for that.
     
  7. thread starter macrumors member

    kavi

    Joined:
    Oct 17, 2007
    #7
    And apparently stuffit doesn't work.

    Could someone give me those terminal instructions? I've never used terminal before so you have to treat me like an idiot when explaining what to do, thanks.
     
  8. Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    Whakatane, New Zealand
    #8
    Something is screwed up if you can't just double-click the file. OS X (Leopard, at least) can open them directly without any additional software.
     
  9. macrumors regular

    Joined:
    Sep 3, 2007
    #9
    Bah, why wasn't this the FIRST reply to this thread? Mac OS X is based on UNIX, ever UNIX-like system comes with the "tar" command. tgz is short for tar.gz, a gzipped tarball, the main compression format on Unix systems other than Mac OS X.

    Open the Terminal in /Applications/Utilities, "tar -xzf <file>" will do it. The x option says eXtract(as opposed to making a new tar), z says pass it to the "gzip" command first, f says to Force it(many stupid problems that don't mean anything practical are avoided with this).

    If you ever encounter a tar.bz2 or tbz/tbz2 file, you would just replace z with j(they ran out of letters), which passes it to bzip2 instead of gzip.
     
  10. thread starter macrumors member

    kavi

    Joined:
    Oct 17, 2007
    #10
    so all I do is open terminal and type:

    tar -xzf filename.tgz

    I've tried that and I can't say it worked...

     
  11. macrumors regular

    Joined:
    Sep 3, 2007
    #11
    Well, ok, you need to be in the directory that the file is in. Or you need to type the full filepath.

    CD <relative directory OR absolute path changes you to that directory, and then all commands will executive relative to your location unless an absolute path is specified. But you can always specify an absolute path.

    Example: if the file is in your home folder..

    tar -xzf /Users/(username)/file.tgz

    or
    cd /Users/(username)
    then
    tar -xzf file.tgz

    or

    cd /Users
    cd (username)
    tar -xzf file.tgz

    Hopefully you get the picture, there are an infinite number of ways to do this.
     
  12. thread starter macrumors member

    kavi

    Joined:
    Oct 17, 2007
    #12
    so I guess I'm doing this right and the file itself is screwed up somehow then?
     
  13. macrumors 68020

    northy124

    Joined:
    Nov 18, 2007
    #13
    Kavi It Would Already be Extracted If You Had Used Stuffit Expander
     
  14. thread starter macrumors member

    kavi

    Joined:
    Oct 17, 2007
    #14
    stuffit didn't work, it gave me some kind of error message.
     
  15. macrumors regular

    Joined:
    Sep 3, 2007
    #15
    alright, this is different...

    Try renaming it to (file).tar.gz instead of (file).tgz. That might be throwing it off. Otherwise the file may be screwed up, in which case I don't know.
     
  16. macrumors 6502

    Joined:
    Nov 27, 2007
    Location:
    Crestview, Fl
    #16
    Try this

    tar -xvzf file.tgz

    if that doesn't work, then do it one at a time.

    unzip file.tgz
    then
    tar -xvf file.tar
     

Share This Page