2008. június 10., kedd

Forcing awstats to ignore directories

Awstats is a pretty basic web statistics package, it displays nice graphs of the usage of your website.

However, sometimes you want to exclude certain parts of the site (for example, the awstats directory itself..) Here is how you do it.

Search for the respective config file of awstats in the /etc folder, and append this line at the end of the file:

SkipFiles="REGEX[^\\/awstats]"

This will make awstats skip every request starting with /awstats.

2008. június 2., hétfő

Batch conversion of image files

Many times, I need to batch convert some files from one format into another. Usually this can be done with a nice one liner:

for i in `ls *.jpg|awk -F. '{print $1}'`; do convert $i.jpg $i.bmp; done

(converts all .jpg files into .bmp files in the current directory)

Note: you'll need imagemagick for this to work