If you anytime need to execute a command once and again and again, you can use watch and tell it to execute the Linux command in a give interval.
The syntax of the command is:
watch [option(s)] command
The default interval of execution of the given command is two (2) seconds, but you define a different interval using the option -n.
Here are two useful uses of watch.
watch -n 5 free -m
Which will show you the use of memory each five seconds.
watch -n 30 vnstat -h
Which will show you the bandwidth used hourly, read more about vnstat.
You can also make watch to highlight any change it detect between two screens of output.
watch -n 30 -d vnstat -h
And if you want to maintain the highlight on, add =cummulative to the -d option, like this:
watch -n 30 -d=cummulative vnstat -h
[Ref: http://www.go2linux.org/repeat-command-continously-at-regular-interval-linux]
The syntax of the command is:
watch [option(s)] command
The default interval of execution of the given command is two (2) seconds, but you define a different interval using the option -n.
Here are two useful uses of watch.
watch -n 5 free -m
Which will show you the use of memory each five seconds.
watch -n 30 vnstat -h
Which will show you the bandwidth used hourly, read more about vnstat.
You can also make watch to highlight any change it detect between two screens of output.
watch -n 30 -d vnstat -h
And if you want to maintain the highlight on, add =cummulative to the -d option, like this:
watch -n 30 -d=cummulative vnstat -h
[Ref: http://www.go2linux.org/repeat-command-continously-at-regular-interval-linux]
Free, facebook, tips, Links, blogging, Downloads, Google, facebookTips, money, news, apps, Social, Media, Website, Tricks, games, Android, software, PIctures, Internet, Security, Web, codes, Review, bloggers, SAMSUNG, Worldwide, Contest, Exitic, Phones, facebookTricks, hacking, London, Olympics, SEO, Youtube, iOS, Adsense, gadgets, iPHONE, widgets, Doodle, twitter, video, Deals, technology, Aircel, Airtel, iPAD, Angry, Birds, BSNL, TechLife, GMAIL, Idea, Microsoft, SmartPhones, Stress, Buster, Windows, Yahoo, Infolinks, Nokia, Scam, Uninor, browsers, Amazon, Euro, CUP, Chat, IDM, JOBS, Modem, Music, Reliance, Results, SSC, Tata, Docomo, bing, freebie, mobile, placements, AIEEE, AlertPay, Chrome, College, Competetive, Exam, Dehradun, Extension, FireFox, GPRS, HTC, IMPACT, Info, MTS, Mark, Zukerberg, Paypal, Promotional, Post, Torrent, UTU, Unlocking, VodaFone, Wall, Paper, apple, books, engineering, iCAR, iTunes, pinterest, rovio, AVG, Admit, Card, Adobe, Affiliate, Marketing, Akhilesh, Amul, Girl, BlackBerry, ChromeBook, Clixsense, Coupon, Digitallife, Discovery, Emoticons, Festival, GATE, GIMP, Income, Tax, International, JSS, JailBreaking, Kindle, Linux, Local, MAX, PAYNE, Mac, Mango, Memory, Speed, Nexus, Online, Shopping, Raakhi, Report, Rising, Stars, Sample, Science, Sony, Syllabus, TabletBooK, Teamviewer, Templates, Dark, Knight, Rises, USA, UPMT, Virgin, Xperia, ZTE, challan, counselling, course, btech, funny, iMOVE, registration
source:http://linuxpoison.blogspot.com/2009/01/135781757119423.html