Deleted file still working, can it be resurrected?
Bo Berglund
bo.berglund at gmail.com
Sun Jun 5 08:32:38 UTC 2022
On Sun, 5 Jun 2022 08:36:23 +0100, Colin Law <clanlaw at gmail.com> wrote:
>On Sun, 5 Jun 2022 at 07:12, Bo Berglund <bo.berglund at gmail.com> wrote:
>>
>> I was editing a 1GB mp4 video file residing on an Ubuntu 20.04.4 LTS server.
>> After defining the clips for one section I ran the terminal command that creates
>> the clip and then moved on to the next clip in the video editor.
>> However, by accident I also removed the video source in the terminal using rm
>> videofilename.mp4 when executing the clip paste command...
>> (Normally the source contains only one video, but this had two after each
>> other.)
>>
>> Notwithstanding the removal the video editor allowed me to walk through the
>> second half of the 4 hour source video file and define the 10 clips to create
>> the second output video command! So I was able to use the source video still
>> even though it had been removed....
>
>When you delete a file in Linux it does not actually fully delete it
>until all users of the file have finished with it. When you deleted
>it the video editor still had it open so the editor was able to
>continue using it until the editor closed the file. Any other app
>trying to open it will fail however, as the file is in the process of
>being deleted. If you still have the editor open then perhaps it has
>the ability to save the complete video as a new file.
OK, that explains it then!
My editor (programmed it myself) does not have the ability to save anything, it
just shows the video with a few navigation buttons and manages clip points set
by the user. Then it composes a command line for using ffmpeg to extract video
sections into a final clip video.
This is put on the clipboard and pasted using PuTTY into the terminal for
execution.
>>
>> I am doing the rm error now and then and if there is a way to restore the
>> removed yet seemingly existing file I would like to know how that could be done.
>
>If you deleted it using rm and no applications still have it open then
>it is gone, unless you immediately stop using the disc and run some
>disc recovery s/w. If you deleted it using a file manager then
>possibly it has been moved to Trash rather than being deleted.
No GUI on the Ubuntu box, it is a server installation...
Thanks for explaining how it works.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list