[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Uncompress tar.gz

Kless

10/18/2008 6:01:00 PM

Which is the best way to uncompress a 'tar.gz' file since Ruby?
4 Answers

Adam Penny

10/18/2008 6:13:00 PM

0

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-....

Adam Penny

10/18/2008 6:35:00 PM

0

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

The more I look at your message the more I suspect that you meant using
Ruby.

Check out this recipe at
http://my.safaribooksonline.com/0596523696/rubyckbk-CHP-... and
see if that helps.
--
Posted via http://www.ruby-....

Kless

10/18/2008 9:33:00 PM

0

On 18 oct, 19:13, Adam Penny <adam_pe...@hotmail.com> 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

10/19/2008 12:02:00 AM

0

There is a great library, Facets [1], with many usefull methods and
that lets too compress/uncompress easily [2].


[1] http://facets.ruby...
[2] http://facets.ruby...quick/rdoc/more/classes/ZipUtils.html