Для швидкого пошуку (але не остаточного):
locate -br '^settings.xml$'
Від man locate:
locate reads one or more databases prepared by updatedb(8) and writes
file names matching at least one of the PATTERNs to standard output,
one per line.
-b, --basename
Match only the base name against the specified patterns. This
is the opposite of --wholename.
-r, --regexp REGEXP
Search for a basic regexp REGEXP. No PATTERNs are allowed if
this option is used, but this option can be specified multiple
times.
^І $гарантує , що тільки файли, ім'я settings.xmlі не файли, імена яких містять settings.xml будуть надруковані.
Вам може знадобитися вперше запустити: updatedb(як root) для оновлення / створення бази даних locate.
ls, ви майже напевно робите це неправильно .