Filter top using process name in Linux

To display statistics only for a process name that match a string using top, you could use the following:

top -c -p $(pgrep -d',' -f firefox)

Here is a screenshot which only shows stats for firefox:

top filtered output screenshot in Linux

Hope this helps! Cheers!

 

Source/Credits/Reference: StackOverflow

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: