Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried using rm -f on these files, and I am running as root, so I should be able to delete them. So why does this program leave behind these files and how can I remove them. Here is what the files look like:

-rwxr-xr-x 1 root sys 6180112 Apr 2 23:28 ##libprog.so.4.5.1
-rwxr-xr-x 1 root sys 427384 Apr 2 23:28 ##libprogn.so.1.0.0
-rwxr-xr-x 1 root sys 578912 Apr 2 23:28 ##libprogcacheipc.so.1.0.0
-rwxr-xr-x 1 root sys 225976 Apr 2 23:28 ##libvtsmartcache.so.1.0.0
-rwxr-xr-x 1 root sys 1338920 Apr 2 23:28 ##libprogil.so.1.0.0
-rwxr-xr-x 1 root sys 6180112 Apr 2 23:28 #libprog4.so.4.5.1

Here is the error I get when trying to remove a file:
rm -f /opt/prog/lib/hpux64/##libprog.so.4.5.1 rm: /opt/prog/lib/hpux64/##libprog.so.4.5.1 not removed. Text file busy

share|improve this question
After doing some googling, I found I can use fuser -fu on the file to find out who is using the file. root is still using it, but I can't see it when running ps -ef. Any ideas why these files are left behind? – user6502 Apr 11 '11 at 16:13

Besides fuser, another helpful tool for getting information about open files and the processes using them is lsof.

As a linux user I don't know much about hpux, but does ps -ef on that platform show defunct processes? Is there an option to show hidden processes? Are you running ps as root? It sounds like something got borked on your system and perhaps a process died or was killed while it still had disk io calls queued up? Do these files still show as in use after restarting the system?

share|improve this answer
yes, ps -ef does show defunct processes and there is one on the machine. I am running ps as root. The man page says ps -e should show all processes. Looks like I should talk to the makers of the program to see why the process is going defunct. This was informative. Thanks! – user6502 Apr 11 '11 at 17:15
@user6502: Make sure you read the last posting there. Your problem is not from a defunct process, it's from a live process that's linked with these libraries (they aren't executables, they're shared libraries, so ps won't help). lsof should tell you what these processes are. – Gilles Apr 11 '11 at 19:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.