URL:
<http://savannah.gnu.org/bugs/?20688>
Summary: 'find / -nowarn -maxdepth 0 -name /' still warns
Project: findutils
Submitted by: ericb
Submitted on: Saturday 08/04/2007 at 15:29
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: Eric Blake
Originator Email: [EMAIL PROTECTED]
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.21
Fixed Release: None
_______________________________________________________
Details:
The warning issued by -name when the pattern includes '/' is not mentioned in
find.texi, either as a suppressable warning or as a severe warning. I think
it should be suppressable, because as the following command line shows, it is
only a warning and not a hard fact that -name / usually results in no
matches:
$ find / -nowarn -maxdepth 0 -name /
find: warning: Unix filenames usually don't contain slashes (though pathnames
do). That means that '-name `/'' will probably evaluate to false all the time
on this system. You might find the '-wholename' test more useful, or perhaps
'-samefile'. Alternatively, if you are using GNU grep, you could use 'find
... -print0 | grep -FzZ `/''.
/
Either way, whether we change parser.c to let -nowarn suppress this warning
or not, we also need to document this warning in find.texi.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?20688>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils