centos6.3剛初始化安裝完畢银伟,有個(gè)配置文件不知道存在什么地方,想用locate命令來查找下绘搞,發(fā)現(xiàn)系統(tǒng)提示彤避,找不到該命令。以前經(jīng)常用的命令為什么找不到了呢夯辖?琉预??原來現(xiàn)在的6.3的已經(jīng)將原來的locate命令因?yàn)樾实拖碌膯栴}蒿褂,已經(jīng)棄用了圆米。用現(xiàn)在最新的mlocate中的locate來代替原來的locate命令了卒暂。
所以大家想繼續(xù)使用locate命令的話,就先安裝一下吧娄帖。
運(yùn)行完畢上面的兩條命令之后也祠,就可以使用自己久違的locate命令了。
附locate的參數(shù).
-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 file
existence (default)
-h, –help print this help
-i, –ignore-case ignore case distinctions when matching 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 file
existence
-0, –null separate entries with NUL on output
-S, –statistics don’t search for entries, print statistics about each
used 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)
轉(zhuǎn)自http://www.yuweixian.com/linux/centos-install-locate.html