1.which command(在path中找第一个)
[root@localhost /]# which ls
alias ls='ls --color=auto'
/usr/bin/ls
2.whereis [option]name
[root@localhost /]# whereis ls
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.gz
[root@localhost /]# whereis -b ls
ls: /usr/bin/ls
[root@localhost /]# whereis -m ls
ls: /usr/share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.gz
[root@localhost /]# whereis -s ls
ls:[root@localhost /]#
3.find path -name [文件名]
[root@localhost 桌面]# ls m*
my mylove mysql
[root@localhost /]# find /home/260254/桌面 -name my*
/home/260254/桌面/my
/home/260254/桌面/mylove
/home/260254/桌面/mysql
[root@localhost /]# find /home/260254/桌面 -name my?
[root@localhost /]# find /home/260254/桌面 -name my???
/home/260254/桌面/mysql
[root@localhost /]# find /home/260254/桌面 -name my[ls]
[root@localhost /]# find /home/260254/桌面 -name my[ls]ove
/home/260254/桌面/mylove
[root@localhost /]# find /home/260254/桌面 -name my[ls]q
[root@localhost /]# find /home/260254/桌面 -name my[ls]ql
/home/260254/桌面/mysql
更多详细内容请参考find的用法
4.locate name
[root@localhost 桌面]# ls 国家
国家
[root@localhost 桌面]# locate 国
/home/260254/桌面/国家
更多详细内容请参考locate的用法