Mukesh Chauhan

Just another WordPress.com weblog

Watch out


Ever been in the situation where you want to run the command continuously without writing a shell script for it.

Watch is used to run a command to run at regular intervals. The basic syntax of the command is

watch [options] command

For example –

watch -n 10 ls -l will execute ls -l command every 10 seconds.

watch -d ls -l home will watch for content changes in the directory home.

Looks pretty interesting. See man pages for more options.

Happy watching.

July 1, 2011 - Posted by | Uncategorized

No comments yet.

Leave a comment