तेज़ खोज के लिए (लेकिन निश्चित नहीं):
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(as root) locate।
ls, तो आप लगभग निश्चित रूप से इसे गलत तरीके से कर रहे हैं ।