[Discuss] recover contents of deleted but still open file on a Linux system.

Bill Bogstad bogstad at pobox.com
Tue Jul 7 19:44:37 EDT 2020


On Tue, Jul 7, 2020 at 11:12 AM Rich Pieri <richard.pieri at gmail.com> wrote:
>
> Something along these lines should work on probably any UNIX or
> UNIX-like system. Unlinking a file removes the directory entry but the
> storage blocks are not released for reuse until all file handles are
> closed. This ends up being more of an annoyance than a benefit when
> long-running jobs put big files on scratch storage which is
> periodically pruned.

But not all UNIX-like systems have a /proc/PID/fd directory that makes
it easy to access the contents of
such an unlinked file.   I don't know if the *BSDs do or not.

Bill Bogstad


More information about the Discuss mailing list