I need to listen a directory, I can listen if a file is created in this directory and it works
inotifywait -m -r -e moved_to -e create "$DIR" --format "%f" | while read f
do
if [[ $f = *.csv ]] ; then
do something
fi
done
But, if this file not created, I need to send emails at 12:00 and 19:00 (at 19:00) I need to kill the process.
So, how can I monitor file and system time using inotifywait? I tried using double conditions in while, but doesn't work