1832896 Members
2481 Online
110048 Solutions
New Discussion

Unable to remove files

 
SOLVED
Go to solution
Jeff Picton
Regular Advisor

Unable to remove files

Hi

I am getting the following messages when trying to remove program files :-

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

Can anyone explain these messages ?

Cheers

Jeff

these
5 REPLIES 5
Stefan Farrelly
Honored Contributor
Solution

Re: Unable to remove files

Some running processes are using these files, you cannot remove them while someone is using them! You can mv (rename) them though.

To find out who is using these files;

fuser

This will list the pid numbers you can then display with; ps -lfp
Im from Palmerston North, New Zealand, but somehow ended up in London...
Mark Greene_1
Honored Contributor

Re: Unable to remove files

Some process has a lock on the files. You can find out which by with fuser:

fuser bbd
fuser bbrun

you may need to be root, depending on the permissions on fuser. This will return a process number which you can grep out of a ps -ef listing.

mark
the future will be a lot like now, only later
Steven E. Protter
Exalted Contributor

Re: Unable to remove files

You might be able to use a utiiity like lsof to identify the processes blocking these files. If kill the individual process, you will then be able to delete the file.

As a practial matter, in most cases I've been forced to reboot the system and clear the files after the fact.

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
Mark Grant
Honored Contributor

Re: Unable to remove files

Actually, you only get these messages on executable files so it is very simple to know which applications have them open. In your case, the command "bbd" has the first one open and "bbrun" has the second :)

You can not remove a running program. Stop the programs and then remove them.
Never preceed any demonstration with anything more predictive than "watch this"
Jeff Picton
Regular Advisor

Re: Unable to remove files

Hi

Thanks for all these answers - I was attempting to run a trial version of big brother but needed to abort.

Jeff