在 shell 脚本中,我想等待某个文件出现
inotifywait -m -r -q -e close_write -e moved_to --format '%w/%f' $ARCHIVE_ROOT | while read FILE; do
# Call other programs which process the file like stat or sha1sum
done
我会假设文件在处理代码中是有效的。可悲的是,文件似乎消失了,例如在被sha1sum
. 我是否错过了一些明显的东西,这是使文件最后所必需的?