Unable to delete an open file

I am working on a unix server.
I killed all the processes with my id on the machine.
After that I tried to delete a file, I got an error:-
file not removed.Text File busy.

Deletion of directory prompted:-
Directory not empty.

Can anyone help me regarding this...???

Thanks,
Vikas

What is your system?..

I am working on HP-UX machine

You should try fuser(1M) command

Is there some other solution...???

vikasrout,

If you use fuser with the -u option it will tell you the id of the process locking the file, and the user who owns the process -

fuser -u filename

Regards,
davf

Note that if the file is being accessed via nfs or smb from another machine, that the fuser command may not show the user, as it looks for processes on the local machine that have the file handle open.

The fuser option doesn't work on my HP-UX box, so could you kindly suggest me something else.

Thanks,
Vikas

What do you mean "doesn't working"?.. Please, provide the output of the command

fuser -fu <yourfile>

Are you root when executing fuser?

No I was not 'root' while using this command.

But I found out the reason the command works fine.

Will let you know if I face any other issues.

Thanks a lot...!!!

Vikas

I tried using:-

fuser -u file_name

It gave me the parent process which was using the file.

It worked.

Thanks a lot for your help.