Ubuntu – How filter top output by the COMMAND column

performanceprocesstopUbuntu

I want get the same result when pressing u to filter by USER, but instead using the column COMMAND and of course, I need this live (I mean, updating constantly) 😉

I'm on Ubuntu.

Best Answer

How do you like this?

watch -n 1 "ps auxw | head -n 1; ps auxw | awk '\$11 ~ /bash/ { print \$0 }' | sort -k 3 -r -n"

Replace bash with the command you want to filter for.