gzip and rails

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

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

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…