我正在使用 inotifywait 来监视使用 WinScp 的大型文件传输:
inotifywait --event close_write --event moved_to --format '%w%f %e %T'
--timefmt '%F %T' $watchFolder | while read eventOutputInfo do
echo "eventOutputInfo is:" $eventOutputInfo
但它总是在最后打印出带有 .filepart 的文件名。在目标目录下,传输完成后,它具有正确的文件名,但没有 .filepart。而且我不确定为什么事件moved_to不在输出中。
/root/p/file.filepart CLOSE_WRITE,CLOSE 2015-12-08 14:56:16
有人可以让我知道我应该注意什么事件,以便 .filepart 不是 inotifywait 输出中文件名的一部分吗?谢谢。