I can't even do the simple - inotify. please help
I'm not good at this. I've been banging my head against a wall for two nights and this tiny, simple script is not working. My goal is to copy a download and paste it to a different folder, leaving the original
#!/bin/bash
source_d="~/data/downloads/data/downloads"
destination_d="~/data/library/ingest"
inotifywait -m -r -e close_write "$source_d" |
while read -r path; do
cp -r "$path" "$destination_d"
done
I've made it as far as having the watch initiated in from the source directory, but it doesn't move anything. Please help, and if it makes you feel good you can call me an idiot.