On Debian Squeeze, I'd like for ctorrent to automatically open in a screen session if a new torrent file is placed in a particular folder (/home/torrent
). Is there an easy way to, in a script, watch for new files being added to a folder and react to this change?
Answer
You should check out inotify-wait, that’s exactly what you need:
https://github.com/rvoicilas/inotify-tools/wiki
No comments:
Post a Comment