Thursday, November 29, 2007

How To Detect Mobile Devices on Your Site

This is not an easy task if you don't know what kind of headers were sent from various mobile browsers and how to detect them. But this php script on Andy Moore's sites shows you how you can detect them effectively. You can easily modify the script to work on any other language you prefer.

Sunday, November 18, 2007

Powerful Linux Find Command

If you want to find files in a certain directory modified sometime ago, you could use these commands to find out easily:

* Example: find everything in current directory modified in the last 24 hours:
  • find . -mtime 0

* Example: find everything in current directory modified in the last 7 days:
  • find . -mtime -7

* Example: find everything in current directory that have NOT been modified in the last year:
  • find . -mtime -365

* Example: find everything in current directory that had been modified more recently than "abc.txt":
  • find . -newer abc.txt