ubuntuとWindowsの間で作成した共有フォルダーを監視するスクリプトが必要です。このスクリプトは、ubuntuの共有フォルダーで新しい.exeファイルが検出されると、別のスクリプトをトリガーします。
このようなシェルスクリプトのアイデアがあれば、ここで共有してください。早急に必要です。よろしくお願いします。
私はアイデアが大好きdnotify
ですが、手っ取り早い解決策も提案したいと思います。
while true
do
ls /dir/*.exe > current-list
if diff current-list old-list
then
# do something with new files
diff current-list old-list | grep '^<' | while read x file
do
# make an operation with new file $file
done && mv current-list old-list
fi
sleep 1
done
単なる「概念実証」であるため、スクリプトを少し調整する必要があることに注意してください (ファイル名、ディレクトリ、エラー処理など)。
dnotify ( http://linux.die.net/man/1/dnotify )を見てください。