Re: Need to remove a ghost file, but can't because it doesn't exist



On Thu, Nov 16, 2006 at 10:14:00AM +0000, J.A. de Vries wrote:
On 2006-11-15 @ 22:27:03 (week 46) Mike McCarty wrote:

OTOH, something is there. Try using

# lsof

Ah, hadn't thought of lsof or fuser yet. Good reminder, thanks!

I tried both but lsof didn't list the file as being used and fuser
couldn't find the file at all ("No such file or directory").

He probably has a file which has been deleted, but which
some process still has open. This causes the directory
entry to be marked "for deletion", but for the allocation
not to be released to free space until the last process
has closed the file.

I thought that a deleted file that was still being read *was* unlinked
from the directory, just not removed from the disk until it was closed.

-- hendrik


That's exactly what I thought when you mentioned lsof, but that doesn't
seem to be the case here.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Need to remove a ghost file, but cant because it doesnt exist
    ... hadn't thought of lsof or fuser yet. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)
  • Re: /etc/nfs stop stopping more than NFS
    ... Mount a filesystem from a different Linux client; ... >> Now run the `fuser` command, saving its output in a file. ... > file on the nfs filesystem. ... lsof does not accept the host:file syntax. ...
    (comp.unix.sco.misc)
  • Re: /etc/nfs stop stopping more than NFS
    ... >> file on the nfs filesystem. ... > use `lsof` on the NFS mount point, instead of `fuser` on the host:dir. ... >> erroneously attributing any open streams/network files it finds. ...
    (comp.unix.sco.misc)
  • Device busy, but lsof doesnt help
    ... The standard trick, of course, is to run lsof and grep it's output. ... Googling found reference to fuser, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: /etc/nfs stop stopping more than NFS
    ... >> numountall calls fuser to generate the list of processes then invokes ... Unmount the problem filesystem, ... Test `fuser` on any other NFS client mount you currently have mounted ... Running lsof on the ...
    (comp.unix.sco.misc)