Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I am extracting a huge file or slowly building up a huge file. Is there a way to have ls -lh "on" much like tail -f, so that I can constantly see the size of the file grow until I decide to terminate it?

share|improve this question
up vote 10 down vote accepted

ls(1) doesn't have any feature built in to do that, but you can probably get what you want with the more generic watch(1) command.

watch ls -lh will run that ls command every two seconds (by default; see the manual page for details) and show the output nicely.

share|improve this answer
while [ true ]; do clear; ls -lah /path/to/dir; sleep 30; done
share|improve this answer
The watch(1) command already does this, don't reinvent the wheel. – MikeyB Feb 3 '12 at 18:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.