//View Tip #183
Similar Tips
» Kill matching processes without unnecessary greps and extra sh p
» Top ten running processes
» Hierarchic list of processes
» Grepping for processes

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
This checks if a daemon is running, if not it starts the daemon. Great for daemons that need to always be running. Can be used with cron

ps -C someprogram || { someprogram & }

// sil at infiltrated dot net


View Comments »




Comments 

Add your comment

Comments are currently disabled
colbert
Also can use

pidof program
Posted 2009-03-21 21:49:54

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit