Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th January 2009, 05:10 PM
php1ic Offline
Registered User
 
Join Date: Oct 2008
Location: London - England
Posts: 137
Cannot delete directory 'foo': File exists

Dear all,

I was transferring some files from my laptop (running FC6) to a server at my work (don't know what kind) with "scp -rpC" and it stalled, don't know why.
Now when I try to delete the files from the server so I can start again I get the following error message

Code:
rm -r Single_injections/
rm: cannot remove directory `Single_injections/195320/400mA/010': File exists
rm: cannot remove directory `Single_injections/195320/400mA': File exists
rm: cannot remove directory `Single_injections/195320': File exists
rm: cannot remove directory `Single_injections': File exists
looking in the deepest directory I see one hidden file which seems to be regenerated if I try to delete it
Code:
ls -al 400mA/010/
total 716
drwxr-xr-x    2 php1ic   phpg         4096 Jan 17 16:36 ./
drwxr-xr-x    3 php1ic   phpg         4096 Jan 17 16:34 ../
-rwxr-xr-x    1 php1ic   phpg       720896 Jan 17 16:12 .nfsD1236*
rm -f 400mA/010/.nfsD1236 
ls -al 400mA/010/
total 716
drwxr-xr-x    2 php1ic   phpg         4096 Jan 17 16:39 ./
drwxr-xr-x    3 php1ic   phpg         4096 Jan 17 16:34 ../
-rwxr-xr-x    1 php1ic   phpg       720896 Jan 17 16:12 .nfsE1236*
I don't have root access as it is a work server, any ideas what has happened or how to solve the problem?

Thanks
Reply With Quote
  #2  
Old 17th January 2009, 05:27 PM
creeping death's Avatar
creeping death Offline
Registered User
 
Join Date: Feb 2008
Posts: 655
i dont think you can, since you are not the owner...

i think that maybe there is some sort of backup file...you should rm -rf the file and its backup too...

and you may also try rm -rf on the directory...

Last edited by creeping death; 17th January 2009 at 05:36 PM.
Reply With Quote
  #3  
Old 17th January 2009, 05:58 PM
php1ic Offline
Registered User
 
Join Date: Oct 2008
Location: London - England
Posts: 137
Thanks for the quick response creeping death.

rm -rf on the 'top' directory unfortunately gives me the same error message, and I am the owner of all of the directories and the hidden file.

Is there some other option I should use with ls to look for a backup? I thought ls -al showed all files in a directory.

Is there a directory used by scp as a temporary place to store a files while the entire thing is transfered?
Reply With Quote
  #4  
Old 17th January 2009, 07:37 PM
creeping death's Avatar
creeping death Offline
Registered User
 
Join Date: Feb 2008
Posts: 655
hmm...i myself m just beginning to learn unix commands...i will see if i can find out...
Reply With Quote
  #5  
Old 17th January 2009, 08:11 PM
php1ic Offline
Registered User
 
Join Date: Oct 2008
Location: London - England
Posts: 137
Don't worry about it creeping death, I was about to try the advice on this forum:

http://www.unix.com/unix-dummies-que...le-exists.html

but had been kicked of the server after the connection timed out (this is in itself strange as sometimes I'm logged on for days). Logged backed on and rm -r worked on the main directory?!

A total stab in the dark would be either the machines had been through some sort of cycle (ie if you ask for something to be changed by the administrator it always takes time to take affect, that kind of cycle), or perhaps work was being done that went slightly wrong.

Don't know, and probably never will, but such is life.

Thanks for your help.
Reply With Quote
  #6  
Old 18th January 2009, 05:52 PM
creeping death's Avatar
creeping death Offline
Registered User
 
Join Date: Feb 2008
Posts: 655
Quote:
Originally Posted by php1ic View Post
Don't worry about it creeping death, I was about to try the advice on this forum:

http://www.unix.com/unix-dummies-que...le-exists.html

but had been kicked of the server after the connection timed out (this is in itself strange as sometimes I'm logged on for days). Logged backed on and rm -r worked on the main directory?!

A total stab in the dark would be either the machines had been through some sort of cycle (ie if you ask for something to be changed by the administrator it always takes time to take affect, that kind of cycle), or perhaps work was being done that went slightly wrong.

Don't know, and probably never will, but such is life.

Thanks for your help.

i thought it was strange...you should get an exorcist next time your workstation gets possessed like this...
Reply With Quote
  #7  
Old 23rd January 2009, 10:42 AM
php1ic Offline
Registered User
 
Join Date: Oct 2008
Location: London - England
Posts: 137
Guess what? It has happened again. This time I followed the advice at the previously posted link and it worked perfectly.

I had to use /usr/sbin/fuser rather than simply fuser but apart from that the steps were exactly as laid out in the link.
Reply With Quote
Reply

Tags
delete, directory, exists, file, foo

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount fails "reason by server: No such file or directory" , but dir exists! thrombomodulin Servers & Networking 7 26th January 2010 06:33 AM
nmb dead but pid file exists - a problem at shutdown? umop_apisdn Servers & Networking 1 19th March 2009 05:36 PM
loadkeys: cannot open file, gdm says my homedir doesn't exists mildred Using Fedora 0 20th November 2007 06:21 PM
Winbindd dead but pid file exists aha_tom Servers & Networking 3 8th December 2006 09:31 PM
smbd dead but pid file exists.. Z4ndX Servers & Networking 2 18th September 2006 02:18 PM


Current GMT-time: 04:43 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat