Watching files grow to see when a process that's writing to them ends is a little like watching grass grow. But there are easier ways than ls -alF followed by arrow up, return, followed by arrow up, return, followed by arrow up, return... This is really neat -- if you add a -d for the first option (differences), you can get the changes in the command highlighted in realish time too, which is awesome.

http://stackoverflow.com/questions/18645759/tail-like-continuous-ls-file-list/18645991#18645991

You can use the very handy command watch

watch -n 10 "ls -ltr"

And you will get a ls every 10 seconds.

And if you add a tail -10 you will only get the 10 newest.

watch -n 10 "ls -ltr|tail -10"

So watch -d -n 10 "ls -ltr|tail -10" ftw.

Also neat was to learn a bit more about tail and how it is less "tail end of the file" as much as it is, "Put a tail on that file and tell me where it goes." Every time the file updates, bam, you get the lines that were appended. That's cool.

http://unix.stackexchange.com/a/45628/87389

You can use tail command with -f :

tail -f /var/log/syslog

It's good solution for real time show.

Labels: , , ,