|
From: | admin4 |
Subject: | Re: [bug #61774] Docs for find -delete out of sync |
Date: | Tue, 1 Feb 2022 23:15:49 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 |
hello, first of thanks all for the hard work:get the point, left to right processing of arguments, okay but, when someone reads or writes this one-liner:
find . -delete -name "*f25020672.avi*" nobody would have guessed that it will delete everything (send this one liner to 10x friends and ask them (without trying it out! so maybe in person or in a videocall) what this one-liner will do... will bet ahttps://ko-fi.com/ that 90% will say "it will delete this file f25020672.avi and all files that are similar like ABCf25020672.aviABC cu On 1/31/22 22:35, Bernhard Voelker wrote:
find(1) was asked to - start a search in the current directory ".", - and to delete all files and directories (implicitly using -depth), - and then to apply the filter for -name '*.avi'. As the whole command line has already an action (-delete), find does not implicitly add the default action (-print), and therefore nothing happens after -name.
[Prev in Thread] | Current Thread | [Next in Thread] |