watch -n 1 'ls -l'
Where:
'-n 1' - time (in seconds) to refresh command output
'ls -l' - command to execute in interval above
When we add '-d' option (help: highlight changes between updates), watch inform Us what was changed between command executions.
Example for 'ls' command below:
watch --color -n 10 -d 'ls -la'
Output:
After change in directory structure watch informs us about changes:
1 comment:
I have used watch command to find out how many rows are inserting in mysql database per second its good command but avoid using it on production box.
Thanks
Javin
10 tips how to work fast , efficient and quick in unix
Post a Comment