Tuesday, December 16, 2014

watch command

I just came across this command where I wanted to look at the size of my file which I was expecting to go to many GBs, and was curious to look at the progress. It is very easy to use:

watch --interval=1 du allFiles.txt











this command can be used with any Linux Command e.g. "watch ls" will show you if new contents are arriving in the directory for which you are running the ls command. Default interval is 2 sec but you can tailor it to suit your needs.

No comments:

Post a Comment