Google Search
Wednesday, October 31, 2007
 

Automatic paging of nohup results


Recently, I've been remotely running (over ssh) a large number of long-running processes, and I have found the need to "detach" these processes from my ssh session. (So that I could power down my terminal, etc.) This can easily be done using the

UNIX nohup command, and the output is helpfully redirected to the file nohup.out


Perfect!


Well, not really. I don't always know how long a command will take to execute, and I really would like to be notified by a SMS message or email when the results are available. The following command does exactly that:


nohup time [LONG RUNNING COMMAND] | mail -s "nohup.out" [EMAIL ADDRESS] &

Labels: , ,

Archives

08/01/2007 - 09/01/2007  09/01/2007 - 10/01/2007  10/01/2007 - 11/01/2007  

This page is powered by Blogger. Isn't yours?

Copyright © 2007, Adam Fourney