7

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!

16
watch 'ps aux | grep httpd | wc'
  • 1
    -n 0.1 switch to watch can be really useful for fast-changing data – Hubert Kario Oct 19 '10 at 7:27
1
while true
do
  ps aux | grep httpd | wc
  sleep 10
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.