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

Index of Classes & Methods in zlib: Ruby Standard Library Documentation (Ruby 3.1.2) 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…