homepage Welcome to WebmasterWorld Guest from 54.204.178.31
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
gzip, find and ownership
ianevans

10+ Year Member



 
Msg#: 3722331 posted 7:31 pm on Aug 13, 2008 (gmt 0)

I'm looking for a way to create preprocessed .gz files of static pages to serve up to those who can accept them.

I know I can use:
gzip -c --best index.html > index.html.gz

to create the .gz file _and_ keep the original.

What's the proper command line way to run that on each index.html file in all the subdirectories? There's a way via find, right? Can it be done from the command line, or do I need a script?

Also, if I run the cron as a user other than root (i.e. my apache user) will the resulting gzip be owned by apache or do I have to chown it?

Thanks for any advice!

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved