I'm currently tying to kill all the process with the name /ebook-convert/
in them that are running over an hour.
When I try this command, I get that the process don't exist.
kill $(ps -eo pid,etimes,args | awk '/ebook-convert/ { if ($2 > 3600) print $2 }')
I'm unsure if either my awk is wrong or if the regex to find the ebook-convert
command is wrong.
I figured it out, on my print column
print $2
, I was printing the time, not the process id, so by changing that toprint $1
it works. ie,