cross-posted from: https://lemmy.ml/post/35169329
Using a shell script, can I watch a folder and block program execution until a file in a certain folder changes?
cross-posted from: https://lemmy.ml/post/35169329
Using a shell script, can I watch a folder and block program execution until a file in a certain folder changes?
2 Comments
sin_free_for_00_days@sopuli.xyz · 8 pts · 1y
inotifywait /path/to/fileExample:
Then in another terminal do something like
touch test.filehelloworld@lemmy.ml · 9 pts · 1y
Thanks for your hint! After some experimentation and man page reading, this was what I was interested in:
I was interested in both file modification and file creation events.