Wednesday, February 18, 2009

Tip of the Day: Keeping Web Directories Clean

Just a simple system admin tip of the day.

One issue that I tend to run into quite frequently, are linux directories that are full of crude from other people and their OS's. A perfect example of this, is a web server, where multiple people have access to the directory to upload new content, etc. Invariably you end up with backup files, systems files from VSS, Windows Thumbs.db files, Apple OSX .DS_Store files, etc.



So to help me clean house, I add 5 or 6 simple rules to the end of my mightly cron jobs:

cd /var/www/html
find . -name "*.bak" -exec rm -rf {} \;
find . -name "vssver.scc" -exec rm -rf {} \;
find . -name "Thumbs.db" -exec rm -rf {} \;
find . -name ".DS_Store" -exec rm -rf {} \;


This will seek out and all these files for me, on a nightly basis.


Labels: , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home