How many times did I want to watch a directory waiting for a file to appear in it?
For this sort of thing I use a simple perl script called atchange. I could do:
atchange . ls
And I'd see list output whenever a new file appeared in the directory. The hacky thing I usually use it for: atchange my_source_file make
to make things rebuild when I save my_source_file in my editor.The script is here: http://www.ccrnp.ncifcrf.gov/~toms/ftp/atchange The webpage about it is here: http://www-lmmb.ncifcrf.gov/~toms/atchange.html
I first learnt about it years ago while reading the entertaining ``Work'' Columns by Jeffreys Copeland & Haemer: http://alumnus.caltech.edu/~copeland/work/