watch command
watch is used to run any designated command at regular intervals. It displays its output on a console (i.e., all-text mode display) or terminal window (i.e., a window in a GUI that emulates a console) that is temporarily cleared of all other content (i.e., prompts, commands and results of commands).
This makes it easy to observe the changing output of a command over time.
Example :
watch -d free -m
watch command will observe the free command and it will highlight the difference for each 2 seconds.
Output:
Every 2.0s: free -m Sun Dec 19 01:24:29 2010
total used free shared buffers cached
Mem: 1498 1038 459 0 48 644
-/+ buffers/cache: 345 1152
Swap: 1398 0 1398
Recent Comments