File moved while being written to, write continues, how is that possible?
Bo Berglund
bo.berglund at gmail.com
Wed Mar 24 11:27:09 UTC 2021
On Wed, 24 Mar 2021 12:20:01 +0100, Bo Berglund <bo.berglund at gmail.com> wrote:
>On Wed, 24 Mar 2021 09:18:35 +0000, Colin Law <clanlaw at gmail.com> wrote:
>
>>It won't have been saved anywhere on the original machine, it is just
>>that it hasn't yet been removed from the disc so the download can
>>continue. Can you not wait till it has completed and then upload it
>>again?
>
>In this case it does not matter but I realized that considering the discussion
>earlier in this thread where I moved a file under download and the download
>completed at the new locaton there was mention that rm worked the same way.
>
>So I was curious to know if there could be a "rescue plan" for such mistakes.
>
>Regarding the downloads, I am using at jobs to *download* sections of a stream
>at particular times. The at job uses youtube-dl, which creates the xxx.mp4.part
>file during the actual download and then cleans up and renames to mp4.
>
>And the at job continues to run after the rm has been done as was explained
>earlier in the thread concerning mv.
UPDATE:
-------
I just got home and responded as above *before* I checked my download
directory....
Lo-and-behold!
The target file xxx.mp4 for the download is now present, even though I removed
the xxx.mp4.part file by mistake!!!
So it seems like youtube-dl does not care that I deleted its work file
xxx.mp4.part from the directory, it just chugged along with the download and
then cleaned up by finishing the work file and finally naming it xxx.mp4 in the
correct directory!
No loss really happened!
Amazing! Cheers for Linux!
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list