Kudithipudi.Org

August 6, 2010

HOW TO : Run commands at regular intervals in Linux

Filed under: HOWTO,Linux,Technology — Vinay @ 9:07 pm

There are several ways to run commands repetively in Linux.. (cron, while loop etc). Here is a simple trick. Say you want to check the size of a directory using “du” every 5 seconds, you can use the following command

watch -n 5 du -ch

Check out all the options available in watch by running “man watch” :) .

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress