LinuxStudyNote(25)-Linux常用命令(4)-文件搜索命令(3)which、whereis命令搜索、grep文件内容查找
2017-09-26 23:19
881 查看
1、which 命令搜索命令
# | # |
---|---|
命名名称 | which |
命名所在路径 | /usr/bin/which |
执行权限 | 所有用户 |
语法 | which 命令 |
功能描述 | 搜索命令所在目录及别名信息 |
范例 | |
which ls | 查找ls命令所在目录及别名信息 |
2、whereis 命令搜索命令
# | # |
---|---|
命名名称 | whereis |
命名所在路径 | /usr/bin/whereis |
执行权限 | 所有用户 |
语法 | whichis 命令 |
功能描述 | 搜索命令所在目录及帮助文档路径 |
范例 | |
whereis ls | 查找ls命令所在目录及帮助文档路径 |
3、grep 文件内容搜索命令
# | # |
---|---|
命名名称 | grep |
命名英文原意 | Global Regular Expression Print |
命名所在路径 | /bin/grep |
执行权限 | 所有用户 |
语法 | grep [-iv][指定字串][文件] |
-i | ignore-case 忽略大小写 |
-v | invert-match 排除指定字串 |
功能描述 | 在文件中进行关键字搜索,并输出关键字所在行 |
范例 | |
grep release /etc/issue | 查找issue文件中存在release关键字的行 |
grep -i RELEASE /etc/issue | 忽略大小写 |
grep -v release /etc/issue | 输出issue文件中的内容,除了包含release的那一行 |
grep -v ^# /etc/inittab /etc/issue | 取出inittab文件中除了以#开头的行 |
相关文章推荐
- LinuxStudyNote(25)-Linux常用命令(4)-文件搜索命令(2)locate文件快速查找
- linux常用命令-文件搜索命令-locate,which,whereis,grep
- LinuxStudyNote(18)-Linux常用命令(2)-文件处理命令(13)-文件显示(4)-less分页显示文件内容往前翻页以及内容查找
- 五、Linux常用命令之文件搜索篇(which、whereis、find、locate、grep、man、info、whatis、--help、apropos、help)
- Linux常用命令002之搜索命令locate、whereis、which、find、grep
- LinuxStudyNote(15)-Linux常用命令(2)-文件处理命令(10)-cat显示文件内容命令(1)
- Linux常用命令——搜索which,whereis,slocate,find,grep
- LinuxStudyNote(16)-Linux常用命令(2)-文件处理命令(11)-tac反向显示文件内容命令(2)
- Linux常用命令002之搜索命令locate、whereis、which、find、grep
- Linux学习之文件搜索命令(二)其他搜索命令 locate |which|whereis|grep
- LinuxStudyNote(24)-Linux常用命令(4)-文件搜索命令(1)find文件搜索命令
- linux-which,loacate,whereis,type:查找[文件|文件内容|命令]
- Linux下的五个查找命令:grep、find、locate、whereis、which
- Linux下which、whereis、locate、find 命令查找文件
- Linux下which、whereis、locate、find 命令查找文件
- linux中Find、whereis、locate、which查找文件命令详解
- Linux下which、whereis、locate、find 命令查找文件
- Linux下的五个查找命令:grep、find、locate、whereis、which
- Linux五个文件查找命令--which、whereis、find、locate和type
- Linux下which、whereis、locate、find 命令查找文件