[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62227] Incorrect warning for -name /
From: |
anonymous |
Subject: |
[bug #62227] Incorrect warning for -name / |
Date: |
Mon, 28 Mar 2022 02:37:14 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62227>
Summary: Incorrect warning for -name /
Project: findutils
Submitted by: None
Submitted on: Mon 28 Mar 2022 06:37:13 AM UTC
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 4.9.0
Discussion Lock: Any
Fixed Release: None
_______________________________________________________
Details:
$ find / -prune -name /
find/find: warning: ‘-name’ matches against basenames only, but the given
pattern contains a directory separator (‘/’), thus the expression will
evaluate to false all the time. Did you mean ‘-wholename’?
/
The warning says -name / will evaluate to false all the time, but as the test
demonstrates by printing /, in this case it is not correct. The warning makes
sense for -name options where the argument to -name is multiple characters and
one of them is /, but when the full argument is /, there should probably be no
warning at all, or if you do feel it should still warn, the warning text
should be changed to something that is more accurate.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62227>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62227] Incorrect warning for -name /,
anonymous <=