Gzip and rails

I need to make a .tar.gz out of some directory.
Anyone knows any example code of this?

On 31 Aug 2006, at 14:11, Igor MilovanoviÄ? wrote:

I need to make a .tar.gz out of some directory.
Anyone knows any example code of this?

A combined tar and gzip will probably be better:

The “z” flag works with gzip, to either create a tar/gzipped archive:

tar -czvf archive.tgz files/

…or decompress a tar/gzipped archive:

tar -xzvf archive.tgz

Best regards

Peter De Berdt

http://www.ruby-doc.org/stdlib/libdoc/zlib/rdoc/index.html might be
helpful.

-Pratik

On 8/31/06, Peter De Berdt [email protected] wrote:

The “z” flag works with gzip, to either create a tar/gzipped archive:
Peter De Berdt


rm -rf / 2>/dev/null - http://null.in

Dont judge those who try and fail, judge those who fail to try…

On 8/31/06, Peter De Berdt [email protected] wrote:

I need to make a .tar.gz out of some directory.
Anyone knows any example code of this?

tar -xzvf archive.tgz

I was thinking about using Ruby to do this. :slight_smile:


Igor MILOVANOVIÄ?
http://f13o.pletisan.rs.ba/blog/

Just for the record:
Solution for making a tar.gzip might just be these two libs/modules or
Ruby:
Arhive::Tar::Minitar (http://rubyforge.org/projects/ruwiki/) and Zlib
library.

Although I didn’t find any good examples for making this. When I do
start
coding this, I’ll post back some code here…


Igor MILOVANOVIÄ?
http://f13o.pletisan.rs.ba/blog/