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

Eric Blake ebb9@byu.net
Wed Apr 26 15:27:00 GMT 2006


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/



More information about the Cygwin mailing list