[PATCH] /bin/rm Add "all" interactive option

Jason Smethers jason at smethers.net
Sun Dec 19 21:24:06 PST 2004


Devon H. O'Dell wrote:
This was discussed in great detail on FreeBSD and DragonFly newsgroups 
several months ago.


<http://docs.freebsd.org/cgi/getmsg.cgi?fetch=285649+0+archive/2004/freebsd-hackers/20041003.freebsd-hackers>
<http://leaf.dragonflybsd.org/mailarchive/users/2004-10/msg00027.html>
<http://leaf.dragonflybsd.org/mailarchive/submit/2004-10/msg00007.html>
Beyond making sure the rm utility tells the user whether they are being 
asked to remove a file or directory, as in the following patch, I don't 
see the connection between a user not knowing what they are doing when 
using "rm -rf" and a user using "rm -i".

So no, it was not discussed.

The -i option exists. It is part of POSIX. It probably will not go away 
no matter how much someone screams they think the rm utility should be 
simpler, what they think is UNIX zen, or how it rubs them the wrong way 
because it was not their first love.

Most of the anxiety from the usage of -i comes from having to answeer 
yes or no to every file and directory. Adding an "all" option eliminates 
this. It is one of the first things that annoys new users whom have used 
interactive removal utilities with an "all" option.

Besides this, the rm utility in its current form does not give the user 
the list of options that are available when it prompts them.

Is there a reason against my patch besides the user should not be stupid 
enough to use -i in the first place?

Thanks
- Jason
<http://www.smethers.net/~jason/patches/rm.c.diff2>





More information about the Submit mailing list