1 需求
2 语法
> locate --help
Usage: locate [OPTION]... [PATTERN]...
Search for entries in a mlocate database.-A, --all only print entries that match all patterns-b, --basename match only the base name of path names-c, --count only print number of found entries-d, --database DBPATH use DBPATH instead of default database (which is/var/lib/mlocate/mlocate.db)-e, --existing only print entries for currently existing files-L, --follow follow trailing symbolic links when checking fileexistence (default)-h, --help print this help-i, --ignore-case ignore case distinctions when matching patterns-p, --ignore-spaces ignore punctuation and spaces when matching patterns-t, --transliterate ignore accents using iconv transliteration whenmatching patterns-l, --limit, -n LIMIT limit output (or counting) to LIMIT entries-m, --mmap ignored, for backward compatibility-P, --nofollow, -H don't follow trailing symbolic links when checking fileexistence-0, --null separate entries with NUL on output-S, --statistics don't search for entries, print statistics about eachused database-q, --quiet report no error messages about reading databases-r, --regexp REGEXP search for basic regexp REGEXP instead of patterns--regex patterns are extended regexps-s, --stdio ignored, for backward compatibility-V, --version print version information-w, --wholename match whole path name (default)Report bugs to https://pagure.io/mlocate.
3 示例
4 参考资料