Originally Posted by abolishtheun
i use pgrep... never even heard of pidof til now. anyone care to compare/contrast these two?
As far as I know, pgrep
come with kill
, and should therefore be preferred for something like this. You need to watch out with pkill
, though, because it will match a partial name, e.g. use pkill '^program$'
instead of pkill program
to prevent from killing myprogram