Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I want to basically continuously update the file list of a directory similar to how tail does with the -f flag on a file.

is there any reasonable way to do this?

share|improve this question
up vote 6 down vote accepted

Try using the watch command with ls:

$ watch ls -l

watch will repeatedly execute the given command at regular (2 second) intervals, which can be configured through command-line options.

share|improve this answer

On Linux, use inotify-tools:

inotifywait -qme create,attrib,move,delete mydir |
while read -r; do
    ls -l mydir

Somewhat different:

inotifywait -qme create,attrib,move,delete --format '%w%f' mydir |
while read -r file; do
    ls -ld "$file"
share|improve this answer

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.