Unable to delete an open file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Unable to delete an open file
# 1  
Old 03-17-2009
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
# 2  
Old 03-17-2009
What is your system?..
# 3  
Old 03-17-2009
I am working on HP-UX machine
# 4  
Old 03-17-2009
Quote:
Originally Posted by vikasrout
I am working on HP-UX machine
You should try fuser(1M) command
# 5  
Old 03-18-2009
Is there some other solution...???
# 6  
Old 03-18-2009
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
# 7  
Old 03-18-2009
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Unable to open input kickstart file curl#37

Hi, Getting the below error while installing from ks.cfg unable to open input kickstart file curl#37 Couldn't open file /tmp/swappart Here am trying to include /tmp/swappart file from pre section under disks and partition section. Dont know where exactly am doing wrong My kickstart file... (3 Replies)
Discussion started by: Sumanthsv
3 Replies

2. Shell Programming and Scripting

Unable to open a file in perl

Not able to open a file using this code why not? use strict; use warnings; my $file = "verInfo.txt"; unless(open FILE, $file) { # Die with error message # if we can't open it. die "\nUnable to open $file\n"; } my $line = <FILE>; print $line; close FILE; (7 Replies)
Discussion started by: srijith
7 Replies

3. Red Hat

unable to open / create any file in vi

Hi, I am unable to create/open any file in vi editor for normal user, though using root I am able to create/open any file, using redhat 5.5, example vi test it showing nothing after entering command (9 Replies)
Discussion started by: manoj.solaris
9 Replies

4. Shell Programming and Scripting

PCC-F-NOERRFILE, unable to open error message file

Hi, I was compiling few C programs in the unix server and getting the following error message rm: /home/a0xxx28/AVT/SEEDLIBRARYDB/LIB/*.a non-existent proc MODE=ANSI CODE=ANSI_C INCLUDE=/home/a0xxx28/PVT/SEEDLIBRARYDB/INCLUDE INCLUDE=/home/a0xxx28/PVT/SEEDLIBRARY/INCLUDE ... (1 Reply)
Discussion started by: kavithakuttyk
1 Replies

5. UNIX for Dummies Questions & Answers

delete open file

hi, I have a little problem. I deleted a file, which was opened in vim editor. it was bad idea... now "df" still display same space. I kill process vim, but maybe file was controlled or opened by another application. Is any eventuallity to find which process has lock file? Command "ps -ax"... (2 Replies)
Discussion started by: delonism
2 Replies

6. Windows & DOS: Issues & Discussions

Unable to delete a file through SAMBA

We have AIX box with a share. We have a Windows 2000 server with a mapped drive to this share. We were able to create and delete files inside the mapped drive. I removed the map. Changed it to a test share. Removed that map. Added it back to teh original share. However, now we can... (3 Replies)
Discussion started by: mcubitt
3 Replies

7. Solaris

unable to open a .log(4MB) file in vi

am unable to open a .log file which is 4MB size. (18 Replies)
Discussion started by: venkatramana
18 Replies

8. UNIX for Dummies Questions & Answers

Unable to open .sql file

Hi , I am running Oracle 8.1.7 on HP-UX B.11.00. Recently I have upgraded Oracle from 8.0.6. to 8.1.7. Almost all the shell script has the Sqlplus as sqlplus -s @/apps/prod/sql/xxxx.sql > /apps/prod/log/xxxx.out . However I receive the error SP2-0310: unable to open file... (2 Replies)
Discussion started by: Ananth.p
2 Replies

9. UNIX for Dummies Questions & Answers

SP2-0310 unable to open file

Hi , We are running Oracle 8.1.7 on HP-UX B.11.00. Recently we have upgraded Oracle from 8.0.6. to 8.1.7. Almost all the shell script we use has the Sqlplus as sqlplus -s @/apps/prod/sql/xxxx.sql > /apps/prod/log/xxxx.out . However we receive the error SP2-0310: unable to open file... (2 Replies)
Discussion started by: guru_2007
2 Replies

10. UNIX for Dummies Questions & Answers

unable to delete a file

Hi .. I am trying to deleta a file but i cant do the error i get is rm: hs_pdref_custom_dict_PG1_out_76_out non-existent but when i do ls it is listing the in the directory ... please find the filed below.... -rw-r----- 1 tsta107 users 118011030 Dec 1 04:07... (13 Replies)
Discussion started by: arunkumar_mca
13 Replies
Login or Register to Ask a Question