I wrote this perl script to monitor a directory for changes in files such as ,
A directory is given on the command-line and the script continuously checks for changes until it is halted (ctrl+c).
$ ./directory_monitor.pl /tmp/
Monitoring directory: /tmp/
(ctrl+c to halt)
20080209.145857 : test.txt Created. [0b]
20080209.145904 : test.txt Size changed to 375b (up 375b)
I was having issues with MythTV prematurely deleting recorded shows, and this script proved its worth in determining when they were deleted.
directory_monitor.pl (4.6 KiB, 5,242 hits)