I have a bash script that watches a folder, if something is added to the folder, the script will move all contents withing the monitored folder to the defined destination.
I have a few of these scripts that all have the same code, however, the monitored folder and destination folder are going to vary.
THE ISSUE: - The script fails to move the files in the monitored folder to the destination folder through FileZilla (FTP). Only one of the many scripts has this issue. The script does work if you move the file to the monitored folder manually through a shell prompt. FTP is the only format not working properly.
Any Ideas what the issue may be?
Here is the script:
inotifywait -m ~/Downloads/zzzfiles -e moved_to | while read path action file; do #echo "The file '$file' appeared in directory '$path' via '$action'" # do something with the file mv ~/Downloads/zzzfiles/* "/media/mynewdrive" done