GNU bug report logs - #29568
Bug in find, or my mistake ?

Previous Next

Package: coreutils;

Reported by: f0rhum <f0rhum <at> free.fr>

Date: Mon, 4 Dec 2017 21:35:02 UTC

Severity: normal

Tags: notabug

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: f0rhum <f0rhum <at> free.fr>
To: bug-coreutils <at> gnu.org
Subject: Bug in find, or my mistake ?
Date: Mon, 4 Dec 2017 22:34:39 +0100
[Message part 1 (text/plain, inline)]
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
//
[Message part 2 (text/html, inline)]

This bug report was last modified 7 years and 172 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.