1

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.

Vincent Roye
  • 2,751
  • 7
  • 33
  • 53

1 Answers1

1

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/
Tharanga Abeyseela
  • 3,255
  • 4
  • 33
  • 45