1.which
[root@cs70-moban ~]# which cat
/usr/bin/cat
2.whereis -b
[root@cs70-moban ~]# whereis -b ls
ls: /usr/bin/ls
3.locate
[root@cs70-moban ~]# locate cat
/usr/share/mime/application/vnd.ms-word.template.macroEnabled.12.xml
/usr/share/mime/application/vnd.ms-works.xml
/usr/share/mime/application/vnd.ms-wpl.xml
/usr/share/mime/application/vnd.oasis.opendocument.chart-template.xml
/usr/share/mime/application/vnd.oasis.opendocument.chart.xml
/usr/share/mime/application/vnd.oasis.opendocument.database.xml
/usr/share/mime/application/vnd.oasis.opendocument.formula-template.xml
/usr/share/mime/application/vnd.oasis.opendocument.formula.xml
/usr/share/mime/application/vnd.oasis.opendocument.graphics-flat-xml.xml
/usr/share/mime/application/vnd.oasis.opendocument.graphics-template.xml
/usr/share/mime/application/vnd.oasis.opendocument.graphics.xml
/usr/share/mime/application/vnd.oasis.opendocument.image.xml
/usr/share/mime/application/vnd.oasis.opendocument.presentation-flat-xml.xml
4.find(遍历每个角落,所以比较慢)
[root@cs70-moban ~]# find / -name cp
/usr/bin/cp