For whatever reason this command is quitting out after creating a single file in the folder. Not sure why when it is in monitor mode
$ inotifywait -m /TDPROXY/NET_DISCONNECT/INCOMING/ -e create | echo "new file"
Thanks
For whatever reason this command is quitting out after creating a single file in the folder. Not sure why when it is in monitor mode
$ inotifywait -m /TDPROXY/NET_DISCONNECT/INCOMING/ -e create | echo "new file"
Thanks
I was having this problem and figured it out using chepner's comment. If you just run
$ inotifywait -m /TDPROXY/NET_DISCONNECT/INCOMING/ -e create
You'll see a stdout line printed everytime the event fires. So you just need a way to run echo
whenever that happens.
I found a way from this question.
$ inotifywait -m /TDPROXY/NET_DISCONNECT/INCOMING/ -e create |
while read -r line; do echo "new file: ${line}"; done