bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Bernhard Voelker
Subject: Re: [bug #61774] Docs for find -delete out of sync
Date: Wed, 2 Feb 2022 23:36:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]