Re: [bug #61774] Docs for find -delete out of sync

Bernhard Voelker <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
On 2/2/22 16:28, admin4 wrote:
> but the UNIX philosophy is to simplify, simplify, simplify,and pretty 
> much follow that principle and it works wonders :)
> 
> what about simplifying the usability & build in fail safes?

You have a point that simplicity is good and nice.

Often the GNU command line projects like coreutils, findutils, grep, etc.
are receiving begging requests to add yet another option for a certain
use case (even although there exists another way to do it).
Most often we can reject those requests; new options or functions add
complexity to the code which decreases maintainability.
But once an option or a feature is added, it is very hard to remove it
again - for decades.

> so everyone here says it is intended behavior that find -delete -name 
> "*searchforthis*" just deletes everything under the current dir .

In case of 'find -delete', I don't see that we could or should aim to remove it:
it is a useful feature, and - although it's a GNU extension - many admins
and scripts are using it.

Many command line tools (rm, dd, find, cp, mv, ...) are very powerful and
therefore potentially dangerous if one uses them carelessly.
I could think about many ways to cripple a system, e.g. the typical `rm -rf /*`
which you mention on your web page.

This is like using a Japanese kitchen knife: it may be a bloody experience in the
beginning, but using it carefully more and more each day, one will be happy to have
that powerful and good tool.

> ok, guess there will have to be a find2 then

well, this is open source: just feel free to clone the source repo and keep patches to
remove the -delete option for your installations if you like.

> try it out as root in / and have phun restoring!
> [...] 
> so cu in 2025

Bad things like this can always happen, and I feel with you, but hey,
we're in 2022, so having a good backup doesn't seem to be that outlandish.
I mean, there are many every-day threats/risks for one's data and disks,
including hardware failure.

Have a nice day,
Berny
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.