Uncompress tar.gz

Discussion in 'Ruby' started by Kless, Oct 18, 2008.

  1. Kless

    Kless Guest

    Which is the best way to uncompress a 'tar.gz' file since Ruby?
    Kless, Oct 18, 2008
    #1
    1. Advertising

  2. Kless

    Adam Penny Guest

    Kless wrote:
    > Which is the best way to uncompress a 'tar.gz' file since Ruby?


    I'm not sure if I'm misunderstanding you, but wouldn't that be

    tar xvzf [filename]?
    --
    Posted via http://www.ruby-forum.com/.
    Adam Penny, Oct 18, 2008
    #2
    1. Advertising

  3. Kless

    Adam Penny Guest

    Adam Penny, Oct 18, 2008
    #3
  4. Kless

    Kless Guest

    On 18 oct, 19:13, Adam Penny <> wrote:
    > Kless wrote:
    > > Which is the best way to uncompress a 'tar.gz' file since Ruby?

    >
    > I'm not sure if I'm misunderstanding you, but wouldn't that be
    >
    > tar xvzf [filename]?


    Better using Ruby:
    ----------------
    tgz_file = Zlib::GzipReader.new( File.open(file, 'rb') )
    Minitar.unpack(tgz_file, 'tgz_file')
    ----------------
    Kless, Oct 18, 2008
    #4
  5. Kless

    Kless Guest

    Kless, Oct 19, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Claudio Grondi
    Replies:
    4
    Views:
    553
    Claudio Grondi
    Aug 20, 2005
  2. Replies:
    2
    Views:
    424
    Michael Hoffman
    Apr 24, 2007
  3. Ray Van Dolson
    Replies:
    0
    Views:
    321
    Ray Van Dolson
    Sep 23, 2009
  4. Ray Van Dolson
    Replies:
    0
    Views:
    824
    Ray Van Dolson
    Sep 25, 2009
  5. benoit Guyon
    Replies:
    2
    Views:
    218
    benoit Guyon
    Jul 26, 2005
Loading...

Share This Page