On Fri, 26 Apr 2013, Eitan Adler wrote:
> On 26 April 2013 18:34, Stuart Henderson <[email protected]> wrote:
> > On 2013/04/26 14:30, Eitan Adler wrote:
> >> The attached patch adds an "x" option to rm(1) to avoid cross
> >> filesystem boundaries.
> >
> > Isn't it better to just use find(1)'s -x option for this? It would be 
> > silly to add an option like this to all the places where it might be 
> > useful (besides rm this type of operation is definitely useful for 
> > chmod and chown, and I'm sure there are others..)
> 
> The entirety of rm's functionality can be replicated with find(1).

Really?  Without executing 'rm'?  Or perhaps you were just talking about 
the -R option.  Oh, I see, freebsd added -delete to their find too.  
Hahaha.

Regardless, I don't see how your response addresses Stuart's concerns.  
The threshold for adding new stuff is greater than for the existing 
functionality.

How is this going to be used?  In practice, I would suspect that someone 
will use it by creating an alias rm='rm -x', as you need it exactly when 
you don't remember that there's another mount present...and the person 
that creates an alias can just as well use a script or shell function to 
be their paranoia.


> We had a similar conversion on -hackers:
> http://freebsd.1045724.n5.nabble.com/Some-improvements-to-rm-1-td5806672.html#none

Note that OpenBSD doesn't have cp -x either.


Philip

Reply via email to