tar with ruby

Discussion in 'Ruby' started by Tomas Fischer, Feb 27, 2006.

  1. Hi,

    I have started using ruby.
    A current task is to get a tar.gz file from internet and extract it.
    I find the zlib class und so I can extract the downloaded file to
    a .tar one.

    How can I extract this file?
    I found old postings on groups.google which use
    Archive::Tar::Minitar. Is this still the way to handle tar file with
    ruby,
    or are there classes in standard lib?

    What is the ruby-way: Install the extra package or call external program
    tar (my ruby program is suggested to run only on Linux plattforms)?

    Thanks,
    Tomas

    --
    Posted via http://www.ruby-forum.com/.
     
    Tomas Fischer, Feb 27, 2006
    #1
    1. Advertising

  2. Tomas Fischer

    Eric Hodel Guest

    On Feb 27, 2006, at 2:44 PM, Tomas Fischer wrote:

    > Hi,
    >
    > I have started using ruby.
    > A current task is to get a tar.gz file from internet and extract it.
    > I find the zlib class und so I can extract the downloaded file to
    > a .tar one.
    >
    > How can I extract this file?
    > I found old postings on groups.google which use
    > Archive::Tar::Minitar. Is this still the way to handle tar file with
    > ruby,
    > or are there classes in standard lib?
    >
    > What is the ruby-way: Install the extra package or call external
    > program
    > tar (my ruby program is suggested to run only on Linux plattforms)?


    I tend to favor calling external programs when I know they'll be there.

    --
    Eric Hodel - - http://blog.segment7.net
    This implementation is HODEL-HASH-9600 compliant

    http://trackmap.robotcoop.com
     
    Eric Hodel, Feb 27, 2006
    #2
    1. Advertising

  3. T24gMi8yNy8wNiwgRXJpYyBIb2RlbCA8ZHJicmFpbkBzZWdtZW50Ny5uZXQ+IHdyb3RlOgo+IE9u
    IEZlYiAyNywgMjAwNiwgYXQgMjo0NCBQTSwgVG9tYXMgRmlzY2hlciB3cm90ZToKPiA+IEhvdyBj
    YW4gSSBleHRyYWN0IHRoaXMgZmlsZT8KPiA+IEkgZm91bmQgb2xkIHBvc3RpbmdzIG9uIGdyb3Vw
    cy5nb29nbGUgd2hpY2ggdXNlCj4gPiBBcmNoaXZlOjpUYXI6Ok1pbml0YXIuIElzIHRoaXMgc3Rp
    bGwgdGhlIHdheSB0byBoYW5kbGUgdGFyIGZpbGUgd2l0aAo+ID4gcnVieSwKPiA+IG9yIGFyZSB0
    aGVyZSBjbGFzc2VzIGluIHN0YW5kYXJkIGxpYj8KPiA+Cj4gPiBXaGF0IGlzIHRoZSBydWJ5LXdh
    eTogSW5zdGFsbCB0aGUgZXh0cmEgcGFja2FnZSBvciBjYWxsIGV4dGVybmFsCj4gPiBwcm9ncmFt
    Cj4gPiB0YXIgKG15IHJ1YnkgcHJvZ3JhbSBpcyBzdWdnZXN0ZWQgdG8gcnVuIG9ubHkgb24gTGlu
    dXggcGxhdHRmb3Jtcyk/Cj4KPiBJIHRlbmQgdG8gZmF2b3IgY2FsbGluZyBleHRlcm5hbCBwcm9n
    cmFtcyB3aGVuIEkga25vdyB0aGV5J2xsIGJlIHRoZXJlLgoKLi4ud2hlcmVhcyBJIHRlbmQgdG8g
    cHJlZmVyIGEgcHVyZSBSdWJ5IGFwcHJvYWNoLiBJIHBsYW4gb24gaW1wcm92aW5nCkFyY2hpdmU6
    OlRhcjo6TWluaXRhciBpbiB0aGUgbmVhciBmdXR1cmUgYW55d2F5IGFuZCBoYXZlIGJlZW4gZ2l2
    ZW4Kc29tZSBwYXJ0aWFsIHN1cHBvcnQgZm9yIHN5bWJvbGljIGxpbmtzLgoKLWF1c3RpbgotLQpB
    dXN0aW4gWmllZ2xlciAqIGhhbG9zdGF0dWVAZ21haWwuY29tCiAgICAgICAgICAgICAgICogQWx0
    ZXJuYXRlOiBhdXN0aW5AaGFsb3N0YXR1ZS5jYQo=
     
    Austin Ziegler, Feb 28, 2006
    #3
    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:
    583
    Claudio Grondi
    Aug 20, 2005
  2. Replies:
    2
    Views:
    444
    Michael Hoffman
    Apr 24, 2007
  3. Ray Van Dolson
    Replies:
    0
    Views:
    340
    Ray Van Dolson
    Sep 23, 2009
  4. Ray Van Dolson
    Replies:
    0
    Views:
    847
    Ray Van Dolson
    Sep 25, 2009
  5. benoit Guyon
    Replies:
    2
    Views:
    232
    benoit Guyon
    Jul 26, 2005
Loading...

Share This Page