Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

gzip, find and ownership

7:31 pm on Aug 13, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Aug 5, 2003
posts: 246
votes: 6

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!


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members