Loading...
 

inotifywait

inotifywait


Use inotify to get your script run when a file was created in a directory:

inotifywait -qr -m my_directory -e close_write --format '%w/%f' | while read x ; do my_job "$x" & done


This line will fork my_job immediately after a file in my_directory has been written and closed.

Inotify-toolsQuestion

Created by redflo. Last Modification: Tuesday 26 of January, 2016 22:17:56 UTC by redflo.

Flattr me!