File moved while being written to, write continues, how is that possible?
Bo Berglund
bo.berglund at gmail.com
Wed Mar 10 05:59:14 UTC 2021
I have a script that runs ffmpeg to download streaming video hourly.
It is executed as an at job at scheduled times.
Today I accidentally moved the resulting file to another folder before it was
completely written, about 10 minutes remained to write.
When I realized what I had done I figured that I have lost the download, but
strangely it continued to grow in size at the new location!
So I moved it back and the download completed and I could find no errors in the
resulting video file.
This is really strange to me and something that would never happen on Windows...
So now I wonder if this is a built-in feature of Linux generally or is it caused
by the fact that the location of the file is on an NFS share on an Ubuntu 18
file server?
The computer writing the file is an Ubuntu 20.04 notebook, if that matters.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list