Difference between revisions of "Watch"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 4: Line 4:
 
* [[open a console]]
 
* [[open a console]]
 
* enter
 
* enter
  watch --interval=1 "du -h ''test''"
+
  watch --interval=1 "[[du]] -h ''test''"
  
 
Stop watch using the key combination CTRL_C
 
Stop watch using the key combination CTRL_C

Revision as of 11:15, 10 September 2011

watch is a command that allows you to execute another command in a specified interval and display the results.

As an example, to watch the size of a file test in 1 second intervals:

watch --interval=1 "du -h test"

Stop watch using the key combination CTRL_C

See also