Often I start processes in the background, but most of the time, I can not hang around until they are done due to other pressing sysad matters. For security reasons, I have to log off the computer when unattended and that event normally terminates the children of a process.
Here's an example of how I ensure my process(es) will continue regardless of log on status:
#nohup sort esofthub.dat > esofthub.sorted &
OR I can even mail the results to myself.
#nohup sort esofthub.dat > esofthub.sorted | nohup mailx -s "esofthub's sorted file" &
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
1 comment:
While the techniques you've described here are very useful, I've found the "screen" utility to be really handy for a long running task. Screen is immune to SIGHUP, but it also provides a mechanism to pick up a task where you left off if you need to log out. I've been able to go to dinner and finish up from home by using screen. It deserves a nook in the toolbox!
Post a Comment