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


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 »


Add your comment

Comments are currently disabled
Also can use

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

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit