Deleted file still working, can it be resurrected?

Colin Law clanlaw at gmail.com
Sun Jun 5 07:36:23 UTC 2022


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.

>
> 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.

Colin




More information about the ubuntu-users mailing list