1752577 Members
3734 Online
108788 Solutions
New Discussion юеВ

Text file busy

 
SOLVED
Go to solution

Text file busy

Can some one please tell me how to find out the proccess ID that is holding up a file.

I am attempting to remove a file and I am getting a message stating that it is busy.

i.e

rm filename
filename: 777 mode ? (y/n) y
rm: filename not removed. Text file busy

Thanks in advance.
3 REPLIES 3
Peter Godron
Honored Contributor
Solution

Re: Text file busy

Hi,
you could try the fuser command to see what processes are using the disk.
ps -ef | grep filename may also show something.

But the real solution is to install lsof
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.77/

Re: Text file busy

A lot of Thanks ...
Dennis Handly
Acclaimed Contributor

Re: Text file busy

You can always rename the file even if it is busy:
$ cp .../filename filename.new
$ ln filename filename.old
$ ln -f filename.new filename