From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 04 16:34:56 2017 Received: (at submit) by debbugs.gnu.org; 4 Dec 2017 21:34:57 +0000 Received: from localhost ([127.0.0.1]:46037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLyO8-0007o0-OD for submit@debbugs.gnu.org; Mon, 04 Dec 2017 16:34:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLyO6-0007ni-Kh for submit@debbugs.gnu.org; Mon, 04 Dec 2017 16:34:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLyO0-0004Cj-Jf for submit@debbugs.gnu.org; Mon, 04 Dec 2017 16:34:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_05,FREEMAIL_FROM, HTML_MESSAGE,RECEIVED_FROM_WINDOWS_HOST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59433) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eLyO0-0004Cf-Gh for submit@debbugs.gnu.org; Mon, 04 Dec 2017 16:34:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLyNz-0005L2-Hj for bug-coreutils@gnu.org; Mon, 04 Dec 2017 16:34:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLyNw-0004AQ-DA for bug-coreutils@gnu.org; Mon, 04 Dec 2017 16:34:47 -0500 Received: from smtp6-g21.free.fr ([212.27.42.6]:62738) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eLyNw-00049W-70 for bug-coreutils@gnu.org; Mon, 04 Dec 2017 16:34:44 -0500 Received: from [192.168.22.29] (unknown [88.170.160.103]) (Authenticated sender: f0rhum) by smtp6-g21.free.fr (Postfix) with ESMTPSA id 39FE77802B2 for ; Mon, 4 Dec 2017 21:34:41 +0000 (UTC) Subject: Bug in find, or my mistake ? To: bug-coreutils@gnu.org References: From: f0rhum Message-ID: <20945513-3a36-94d3-58ac-d4e7455d9b3b@free.fr> Date: Mon, 4 Dec 2017 22:34:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------362585CABACDDDC6D727E766" Content-Language: fr X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------362585CABACDDDC6D727E766 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi find -version find (GNU findutils) 4.4.2 I issued this command to remove all files "*_original" from parent tree : /find .. iname "*_original" -delete/ as you see I forgot the minus sign before /iname/. The result was all regular files were deleted, just leaving behind empty directories (I don't really know why dirs remained, maybe because it is a synchronised folder with some exclusions that prevented remote deletion and the local were created back). Is it because /iname/ and /"*_original"/ are both seen as EXPRESSIONS that always return true so that -delete applies to .. and content as a whole ? Thanks // --------------362585CABACDDDC6D727E766 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hi
find -version
find (GNU findutils) 4.4.2

I issued this command to remove all files "*_original" from parent tree :
find .. iname "*_original" -delete
as you see I forgot the minus sign before iname.
The result was all regular files were deleted, just leaving behind empty directories (I don't really know why dirs remained, maybe because it is a synchronised folder with some exclusions that prevented remote deletion and the local were created back).
Is it because iname and "*_original" are both seen as EXPRESSIONS that always return true so that -delete applies to .. and content as a whole ?

Thanks
--------------362585CABACDDDC6D727E766-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 05 04:30:38 2017 Received: (at 29568) by debbugs.gnu.org; 5 Dec 2017 09:30:39 +0000 Received: from localhost ([127.0.0.1]:46388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eM9Yk-0006s5-IP for submit@debbugs.gnu.org; Tue, 05 Dec 2017 04:30:38 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:55955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eM9Yi-0006rn-GA; Tue, 05 Dec 2017 04:30:37 -0500 Received: from [10.0.2.15] ([62.153.148.194]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MY6a0-1eZGa51s6i-00Ur5R; Tue, 05 Dec 2017 10:30:29 +0100 Subject: Re: bug#29568: Bug in find, or my mistake ? To: f0rhum , 29568@debbugs.gnu.org, "bug-findutils@gnu.org" References: <20945513-3a36-94d3-58ac-d4e7455d9b3b@free.fr> From: Bernhard Voelker Message-ID: <5246bea4-b368-502a-be7c-f1dda0e1cb70@bernhard-voelker.de> Date: Tue, 5 Dec 2017 10:30:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20945513-3a36-94d3-58ac-d4e7455d9b3b@free.fr> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE-1901 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:GH9W+3lkf4UZxCQ9gG24BDZEfsz8YQg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envelope-To: 29568 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) tag 29568 notabug close 29568 thanks On 12/04/2017 10:34 PM, f0rhum wrote: > Hi > find -version > find (GNU findutils) 4.4.2 First of all, find(1) belongs to the "GNU findutils" rather than "GNU coreutils". ==> CCing bug-findutils@gnu.org > I issued this command to remove all files "*_original" from parent tree : > /find .. iname "*_original" -delete/ > as you see I forgot the minus sign before /iname/. outch. > The result was all regular files were deleted, just leaving behind empty > directories (I don't really know why dirs remained, maybe because it is > a synchronised folder with some exclusions that prevented remote > deletion and the local were created back). > Is it because /iname/ and /"*_original"/ are both seen as EXPRESSIONS > that always return true so that -delete applies to .. and content as a > whole ? I'm sorry for you, but actually find exactly did what you told it to do. The tool takes all command line arguments until the first expression as file argument: $ find --help | sed 4q Usage: find [-H] [-L] [-P] [-Olevel] [-D debugopts] [path...] [expression] default path is the current directory; default expression is -print expression may consist of: operators, options, tests, and actions: ... Therefore, you passed "..", "iname", and "*_original" as path arguments. As the two latter probably do not exist literally, you probably got these error messages: find: cannot delete ‘..’: Directory not empty find: ‘iname’: No such file or directory find: ‘*_original’: No such file or directory The -delete action is a delicate one, so I usually run find without that action first to see what files would get deleted. There's nothing we can do here at GNU coreutils, and I'm quite sure the findutils folks (which I am part of, too) can't do either. Anyway, I'm closing this as not-a-bug in the coreutils bugtracker. Have a nice day, Berny From unknown Sat Aug 09 13:15:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 02 Jan 2018 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator