Pages

Sunday, September 2, 2012

News: Tips and tricks: watch and cat.

Sometimes it is necessary to find solutions.
Today's example involves two Linux commands:
watch and cat
Here is a simple method by creating a script that returns an output:
while [ 1 ]; do cat /proc/meminfo; date; echo; sleep 1; done
Make this script executable and name it: meminfo.
The output is then processed by the command:
$ watch -d ./meminfo 
This simple method can be applied to other files ...