This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: "rm -rf ./foo/" safe to use?


A few years ago, I came across a "rm -rf" problem with NFSv2 and NFSv3 clients. NFS clients on Solaris 8 and 9, AIX 4.3, and the Hummingbird on Windows all had a problem with "rm -rf", against a certain NFS server. 

The problem was an NFS protocol implementation short-cut.  When reported, one of the vendors fixed the problem, others did not. 

I do not know if the problem still exists (but can check to see if does).

I have never tested the cygwin NFS client against the above-mentioned NFS server.

-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Eric Blake
Sent: Wednesday, April 26, 2006 10:02 AM
To: cygwin@cygwin.com
Subject: Re: "rm -rf ./foo/" safe to use?

Tom Rodman <cygwin <at> trodman.com> writes:

>
> I think I had read something years back about cygwin's inode 
> simulation (sorry to munge up the terminology), being imperfect; so 
> that may have convinced me to not use "rm -rf DIRXXX".

And how would imperfect inode simulation mess up rm?  Seriously - I would like to know what gave you the impression that inode behavior could interfere with rm.

>
> So is "rm -rf ./foo/" safe to use?  Is there any danger that anything 
> other than ./foo/ will be deleted?

I use recursive rm all the time, both on FAT drives (where cygwin must do inode simulation) and on NTFS drives (where cygwin uses NTFS inodes).  The only danger in deleting more than you intended is if you type the command wrong, but that same danger holds true for 'cmd /c rmdir'.  IMO, if you are going to use cygwin, then use cygwin's rm (but maybe I'm biased, since I happen to be the rm maintainer).

--
Eric Blake
volunteer cygwin coreutils maintainer



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]