I am using inotifywait to monitor a large file transfer using 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
but it always prints out the filename with .filepart at the end. Under the target directory, after the transfer is done, it has the correct file name without the .filepart though. And I am not sure why the event moved_to was not in the output.
/root/p/file.filepart CLOSE_WRITE,CLOSE 2015-12-08 14:56:16
Can someone please let me know what event I should watch for so that the .filepart is not part of the filename in the inotifywait output ? Thanks.