Linux搜索命令
1.which
which返回命令是否存在及其位置。
例:
#which ls
2.whereis
whereis命令只能用于搜索程序名,而且只搜索二进制文件(参数-b)、man说明文件(参数-m)和源代码文件(参数-s)。如果省略参数,则返回所有信息。
whereis命令的使用实例:
#whereis vim
3、grep
grep -r "xxx" /路/径/名
在路径名中搜索内部包含字符串xxx的文件
4、find
find path -name file 搜索文件名
find path -name file* 模糊搜索文件名
find path -mmin -20 修改时间条件查询 参数: -mmin 分钟计时, -mctime 天计时