[dicey@entropy watcher]$ ls -lR
.:
total 8
drwxrwxr-x. 6 dicey dicey 4096 Dec 14 18:23 test
-rwxrwxr-x. 1 dicey dicey 774 Dec 14 18:33 watcher.pl
./test:
total 16
drwxrwxr-x. 2 dicey dicey 4096 Dec 14 17:43 1
drwxrwxr-x. 2 dicey dicey 4096 Dec 14 18:23 2
drwxrwxr-x. 2 dicey dicey 4096 Dec 14 17:43 3
drwxrwxr-x. 2 dicey dicey 4096 Dec 14 18:30 4
./test/1:
total 0
./test/2:
total 0
./test/3:
total 0
./test/4:
total 0
[dicey@entropy watcher]$ ./watcher.pl &
[1] 32145
[dicey@entropy watcher]$ cd test
[dicey@entropy test]$ mkdir 5
./test/5 was created
[dicey@entropy test]$ cd 5
[dicey@entropy 5]$ touch foo
./test/5/foo was created
[dicey@entropy 5]$ rm foo
./test/5/foo was deleted
[dicey@entropy 5]$ cd ..
[dicey@entropy test]$ rmdir 5
./test/5 was deleted
[dicey@entropy test]$ cd 3
[dicey@entropy 3]$ touch bar
./test/3/bar was created