cancel
Showing results for 
Search instead for 
Did you mean: 

File is not getting deleted

SOLVED
Go to solution
Kavita Poonia
Regular Advisor

File is not getting deleted

Hello techies,

There is one pdf file located under one of the directory on one of my HP-UX server but I am not able to perform any operation on that pdf file. I think it has got corrupted.
Whenever I go to that directory and do ls -lrt, it gets hanged but ls is working fine. I have issued rm command on that pdf file but its not getting executed and I am not able to move that file also to some other location. Further, I am not able to kill these rm, ls -lrt and mv processes performed on that pdf file with kill -9.

So, any suggestions how to remove that file and kill those processes ?

Thanks * regards,
Kavita
5 REPLIES
Steven E. Protter
Exalted Contributor
Solution

Re: File is not getting deleted

Shalom,

fuser -cuk will blow away all open file handles on a file system.

fuser -uk can let you identify the process id that has an open file handle and let you kill the process. Then the file can be made to go away.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: File is not getting deleted

Hi Kavita:

From you description, it sounds as if your file is part of an NFS mount that has gone stale. If so, depending on your NFS version, you many need to reboot to resolve this.

Regards!

...JRF...
Kavita Poonia
Regular Advisor

Re: File is not getting deleted

Thanks SEP....So according to you I need to execute fuser -cuk and after that it will be fine.

Thanks James.....Yes it is a NFS mounted filesystem. So cant we login to that server from which it is getting nfs mounted and remove that pdf file from there and it will automatically go away from client server on which we are facing issues ???
Dennis Handly
Acclaimed Contributor

Re: File is not getting deleted

>I need to execute fuser -cuk and after that it will be fine.

If kill -9 won't work, I doubt fuser -k will either. You probably have to reboot.

>So can't we login to that server from which it is getting NFS mounted and remove that PDF file from there and it will automatically go away from client server

Yes, that should remove it. But your problem is more than just this one file.
Kavita Poonia
Regular Advisor

Re: File is not getting deleted

Thanks Dennis. The problem got resolved as that directory was NFS mounted from NAS server and was mounted on other two servers where so I have deleted that file on other server where it is NAS mounted and it had gone from that server also on which I was not able to.


Thank you all for helping on this issue.