Operating System - HP-UX
1823920 Members
3275 Online
109667 Solutions
New Discussion юеВ

not able to remove file - Text file busy

 
SOLVED
Go to solution
Prasanth V Aravind
Trusted Contributor

not able to remove file - Text file busy

We are not able to remove this file and getting the error. I have checked with fuser -u for any process. but i did't see any process. Also we are not having lsof installed on this server.


> rm -rf /oracle/D01/102_64

rm: libclntsh.so.10.1 not removed. Text file busy

rm: libnnz10.so not removed. Text file busy

rm: directory lib not removed. Directory not empty

rm: directory /oracle/D01/102_64 not removed. Directory not empty

THanks Regards
Prasanth
14 REPLIES 14
whiteknight
Honored Contributor

Re: not able to remove file - Text file busy


Prasanth,

What about mv command to move the files.
WK
Problem never ends, you must know how to fix it
Prasanth V Aravind
Trusted Contributor

Re: not able to remove file - Text file busy

mv command also got failed
Aneesh Mohan
Honored Contributor

Re: not able to remove file - Text file busy

Hi Prasanth ,

Sorry to say this :) I think you may need to bring down the database for removing those files ,it may be using by the database/application.


Thanks,
Aneesh
Prasanth V Aravind
Trusted Contributor

Re: not able to remove file - Text file busy

Both the database and sap application are down !!
Aneesh Mohan
Honored Contributor

Re: not able to remove file - Text file busy

Can u post the output of

#fuser -uc /oracle



Aneesh
J. Bravo
Respected Contributor

Re: not able to remove file - Text file busy

Hello:

Do you have checked if there are processes running in that directory?

fuser -cu /oracle/D01/102_64

If the answer is yes, try to kill the processes:

fuser -k /oracle/D01/102_64

And try to remove the directory again.

Regards;

J. Bravo.
Prasanth V Aravind
Trusted Contributor

Re: not able to remove file - Text file busy

I tried with fuser -uc.
Not showing any process id / user which is using this direcory
Dennis Handly
Acclaimed Contributor

Re: not able to remove file - Text file busy

>WK: What about mv command to move the files.

The correct command is ln then rm.
You can only link the file up to the top of the mount point or above where you want to remove.

You can of course rename lib to libfoo and then leave that directory there. And install around it.
John Waller
Esteemed Contributor

Re: not able to remove file - Text file busy


Hi

If you are still having problem knowing what process is using these files try installing and running lsof.

You can get the utility from here:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.78/

Once installed run lsof /oracle/D01/102_64/libnnz10.so this will tell you what is using the file
lawrenzo_1
Super Advisor

Re: not able to remove file - Text file busy

I have had issues in the past also with some oracle libraries.

I solved the issue by renaming the file by moving it in the same DIR and then this should then remove.

maybe not the best solution but has worked for me

:-)

hello
Aneesh Mohan
Honored Contributor
Solution

Re: not able to remove file - Text file busy

Hi Prasanth ,

If nothing working ,can u try to umount and do remount the filesystem (as you told database/application is down )


Thanks,
Aneesh
Sp4admin
Trusted Contributor

Re: not able to remove file - Text file busy


rm: directory /oracle/D01/102_64 not removed. Directory not empty

Can you cd into the directory and remove files one directory at at time?

Double check oracle/Sp proesses are stopped
ps -ef | grep -i oracle

sp,

V. Nyga
Honored Contributor

Re: not able to remove file - Text file busy

Hi,

if possible (not productiv?) go to single user mode: 'init 1' (or maybe 'init 2' is enough).
Then try again to remove.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Prasanth V Aravind
Trusted Contributor

Re: not able to remove file - Text file busy

one of our application was using these files