Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


share|improve this question
up vote 11 down vote accepted
watch 'ps aux | grep httpd | wc'
share|improve this answer
-n 0.1 switch to watch can be really useful for fast-changing data – Hubert Kario Oct 19 '10 at 7:27
while true
  ps aux | grep httpd | wc
  sleep 10
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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