Author Archives: adam

Whatsmyip from the Command Line

Nice little one liner to obtain your WAN IP address.   curl http://www.whatismyip.com/automation/n09230945.asp ; echo Then alias that badboy E.g.:   alias whatsmyip='curl http://www.whatismyip.com/automation/n09230945.asp ; echo' Happy day.
Posted in programming | 1 Comment

cp a symlink to multiple directories

Today I wanted to copy a symlink to many different directories. So I tried the following: for f in `find . -regex ''.*cp.*snippets''` ; do cp bbb.html $f/ ; done Which returned: cp: cannot stat `bbb.html': No such file or directory bbb.html is a symlink and the default behavior of cp (I think) is to [...]
Posted in tips | Tagged | Leave a comment

Repairing your MySQL database

Today one of our computer’s /usr partition filled up and caused data corruption in the database. After space was freed up on the partition, we (Moises and I) ran some commands to repair the database. Here is what we did: cd into your directory where your db files are stored. In our case it was [...]
Posted in programming, sysadmin | Tagged , , | 1 Comment