Mac vs PC vs Linux – South Park Style

Filed Under (Crazyness) by jc on 09-03-2008

Tagged Under : , ,

Watched this video on You Tube today could not stop laughing.

Enjoy!

Using find with mtime

Filed Under (Commands, Scripting) by jc on 02-03-2008

Tagged Under : , ,

The ‘find’ command is a very powerful search tool in UNIX systems. The mtime option comes in very handy when I am trying to troubleshoot a problem, automate tasks or do forensics. Below are some examples:

Finding all files owned by apache modified in the last 3 days within /var/www/html:

find /var/www/html -type f -user apache -mtime -3


Finding all files that were modified 3 days ago or before in the current directory:

find . -type f -mtime +3


Deleting all files in the current directory older than (modified before) 100 days:

find . -type f -mtime +100 -exec rm -f '{}' \;

My favorite xkcd strip

Filed Under (Crazyness, Databases) by jc on 01-03-2008

Tagged Under :

xkcd

Check them out. They are awesome!
http://xkcd.com/327/

Caching with mod_file_cache

Filed Under (Web) by jc on 01-03-2008

One of my co-workers today was working with mod_file_cache, and I thought I would put it in my blog. Customer had a lot of static files that were called a lot and wanted to reduce I/O wait without paying for a CDN. We thought mod_file_cache was the best solution.

The process is pretty straight forward and documented on apache docs so I will not post instructions, but let me know if you run into any problems. In a couple of weeks I will write a detailed post on how to use memcached for caching dynamic content. Below is the link from apache for mod_file_cache:

http://httpd.apache.org/docs/2.2/mod/mod_file_cache.html

–JC