Linux – poll/monitor a linux command’s output

command-line-interfacelinux

Is there a way to monitor the output of a linux command without having to type it over and over.

I want to do something like:

tail -f file.txt

But for a command like:

ps aux | grep httpd | wc

Thanks!

Best Answer

watch 'ps aux | grep httpd | wc'