สำหรับการค้นหาที่รวดเร็ว (แต่ไม่ชัดเจน):
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คุณจะเกือบแน่นอนทำมันผิดวิธี