If you have inotify in your kernel, check out inotify-tools.
There's an example on that page:
#!/bin/sh # A slightly complex but actually useful example inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %f' \ -e close_write /home/billy | while read date time file; do rsync /home/billy/$ rsync://billy@example.com/backup/$ && \ echo "At $ on $, file $ was backed up via rsync" done