The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unable to remove file using rm: Disk space is full Pankajakshan Linux 8 4 Weeks Ago 09:40 PM
Problem when test to see if directory exists trivektor Shell Programming and Scripting 3 08-11-2008 10:48 PM
Unable to chmod a file/directory lyonsd SUN Solaris 11 11-15-2007 10:46 PM
test if a filename exists with specified string (ksh) bob122480 Shell Programming and Scripting 6 01-21-2007 11:47 AM
rm: Unable to remove directory xxxx/xxxx: File exists deejay UNIX for Dummies Questions & Answers 1 11-06-2005 08:17 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2008
Registered User
 

Join Date: Jun 2008
Posts: 5
Stumble this Post!
rm: Unable to remove directory /mnt/users/test/logs/: File exists

rm: Unable to remove directory /mnt/users/test/logs/: File exists

ls -latr

total 191208
drwxrwxrwx 6 test echo 4096 Jul 3 22:36 ..
-rwxrwxrwx 1 test echo 97692804 Jul 3 22:36 .nfsDFA4
drwxrwxr-x 2 test echo 4096 Jul 3 23:00 .


M not able to delete ".nfsDFA4" file.


Please suggest.

Thanks,
Solitare123
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-03-2008
Registered User
 

Join Date: Apr 2008
Posts: 56
Stumble this Post!
If it is a mount point , log into the machine where the file is present physically and delete it..
Reply With Quote
  #3 (permalink)  
Old 07-04-2008
Registered User
 

Join Date: Sep 2007
Location: Koblenz, Germany
Posts: 660
Stumble this Post!
If you have lsof, try to grep the filename on it's output and see which process has it opened.

EDIT: Maybe use "fuser -u <filename>" too

Last edited by zaxxon; 07-04-2008 at 12:21 AM.
Reply With Quote
  #4 (permalink)  
Old 07-04-2008
Registered User
 

Join Date: May 2008
Location: s'pore
Posts: 672
Stumble this Post!
If its on a NFS mount point, you must delete it from the NFS server itself. Could be perssion issues. And you can't delete a directory staright away if it consists of files in it, unless you perform a rm -rf (use with care!)
Reply With Quote
  #5 (permalink)  
Old 08-12-2008
Registered User
 

Join Date: Jul 2008
Posts: 3
Stumble this Post!
Had the same problem. Thanks zaxxon, Your Solution Worked For Me!

Had a directory called "play". Looked empty.
But had a .nfs<xxxx> file that would not go away.
From the parent directory, I executed:

fuser -u play/.*

The result included:

play/.:
play/.nfsC54A: 5794o(esmith)


I then executed:

kill -9 5940
rmdir play


Voila!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0