View Full Version : gzwrite
08-15-2004, 01:29 AM
OK, let's say I want to compress all of /thefolder/, and save it at / as backup.gz, how could I go about doing this?
08-15-2004, 04:06 AM
you would first need to make a tarball of the content of that folder then compress that tar file , I think PEAR has a tar class , or perhaps in PECL .
else exec() , e.g.
exec('tar -cf thefolder.tar thefolder');
of course if you are exec()ing anyway you can also compress at the same time
exec('tar -czf thefolder.tgz thefolder');
08-15-2004, 12:18 PM
OK, thanks, time to try it out...
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.