Reputation: 2841
What's the best way to trigger a bash script automatically when a file is moved in a folder ? (I'm working in a Linux environment)
I don't want to use a cron job that checks every minutes my folder.
Upvotes: 1
Views: 977
Reputation: 3483
Try inotify-tools or fileschanged. These programs can be used to monitor and act upon filesystem events.
https://github.com/rvoicilas/inotify-tools/wiki
http://fileschanged.sourceforge.net/
Upvotes: 1