BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] recover contents of deleted but still open file on a Linux system.
- Subject: [Discuss] recover contents of deleted but still open file on a Linux system.
- From: invalid at pizzashack.org (Derek Martin)
- Date: Thu, 23 Jul 2020 00:08:18 -0500
- In-reply-to: <5f04906a.1c69fb81.4e25f.a491@mx.google.com>
- References: <CAJFsZ=r=sHG84R1XAjjou=KNbYf_9Psc0s+rpVRps_A57pW3MA@mail.gmail.com> <5f04906a.1c69fb81.4e25f.a491@mx.google.com>
On Tue, Jul 07, 2020 at 11:10:33AM -0400, Rich Pieri 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. Or when some well-meaning junior admin deletes large log files to free up space, while the process writing to them still has them open... FWIW for much the same reason, you can also use lsof to find open-but-deleted files... its output will identify them as deleted. This will tell you what process has the file open so you can kill it (which closes the file, enabling its used disk blocks to be reclaimed, assuming there are not other processes that also have it open). -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
- References:
- [Discuss] recover contents of deleted but still open file on a Linux system.
- From: bogstad at pobox.com (Bill Bogstad)
- [Discuss] recover contents of deleted but still open file on a Linux system.
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] recover contents of deleted but still open file on a Linux system.
- Prev by Date: [Discuss] OT - Increased WiFi Speeds After DNS Change
- Next by Date: [Discuss] Dealing with Windows 10 after 15 years away
- Previous by thread: [Discuss] recover contents of deleted but still open file on a Linux system.
- Next by thread: [Discuss] recover contents of deleted but still open file on a Linux system.
- Index(es):