3
votes
4answers
371 views

Is there a linux command that lets me color-code the result of another command?

I'm running a watch on a command to monitor the number of open connections for a service we're diagnosing. I need to keep an eye on it while doing other work, to help other developers identify when ...
1
vote
1answer
244 views

How can I get gnu watch to run in the background?

If I start a watch command in the background, it stops. Bringing the job to the foreground makes it run again, but I want this to run in the background. $ watch ./do-something.sh & [1] 97673 [1]+ ...
10
votes
5answers
8k views

Store the output of date and watch command to a file

I am a newbie to linux and I am trying to watch a command and try to log it into a file. I tried watch -t -n 10 "(date '+TIME:%H:%M:%S' ; ps aux | grep "pattern" | wc -l)" >> logfile and am ...
3
votes
1answer
171 views

Command-line tool to measure how fast a file is growing?

Is there a command-line tool to measure how fast a text file is growing, in units of lines/second? For small-ish files, I can do something with watch and wc -l, but that measures the file anew each ...