ディレクトリに書き込まれた新しいcsvファイルのディレクトリを監視しようとしています。
作成時の新しい csv ファイルには、データが追加されます。ファイルが書き込まれ、閉じられたら。ファイルを新しいディレクトリに移動する必要があります。
Monitor dir: /tmp/test/test/
destination dir for copy : /tmp/test/test1/
次のスクリプトを作成しましたが、実行するとファイルではなくディレクトリ全体が移動します。助けてください
#!/bin/bash
inotifywait -m --format '%w%f' /tmp/test/test/ -e close | while read file;
do
mv "$file" "/tmp/test/test1/"
done