Archive for July 20th, 2008

Want to get notified when a long action on remote server completes?

Sunday, July 20th, 2008

Sometimes you might want to run a long action on a remote server, like dump a few gigs DB, or rsync a few thousands of files between two not very fast computers.

You want to take next action as soon as that long operation completes but don't want to baby sit your servers.

How about getting email notification to your.. say.. iPhone.. when the action completes? It's pretty easy! Have a look!

mysqldump -u user -p mydatabase && echo "Dump finished!" | mail -s "Wake up!" mike@example.com

Once the command mysqldump finishes executing,  you'll get mail with subject "Wake up!" and body "Dump finished!"

You can chain more commands, of course, by adding && between them ( && executes next chained command only if the previous one completed without errors)

Pretty cool to have such a simple but useful trick under your belt, isn't it? :)

Yeah! My iPhone can now ssh into things!

Sunday, July 20th, 2008

Thanks to the great guys at iphone-dev and their Pwnage 2.0 package, I can now finally ssh into the server I have to manage (as well as perform other tasty tasks in command line!)

 Now, I only need one application to make iPhone 100% usable for me - some utility running on background and reminding me about missed calls and messages (vibrating, making sounds.. anything!).