Linux命令搜索命令whereis与which
来源:互联网 发布:防范电信网络诈骗视频 编辑:程序博客网 时间:2024/06/08 14:29
一 whereis
1、语法
whereis 命令名
搜索命令所在的路径以及帮助文档所在的位置
选项:
-b:只查找可执行文件
-m:只查找帮助文件
2、实战
[root@localhost ~]# whereis ls
ls:/usr/bin/ls /usr/share/man/man1/ls.1.gz/usr/share/man/man1p/ls.1p.gz
[root@localhost ~]# whoami
root
[root@localhost ~]# whatis
whatis what?
[root@localhost ~]# whatis ls
ls (1)- list directory contents
ls (1p)- list directory contents
[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
二 which
1、语法
which 命令名
搜索命令所在路径及别名
2、实战
[root@localhost ~]# which ls
alias ls='ls --color=auto'
/usr/bin/ls
[root@localhost ~]# which pwd
/usr/bin/pwd
[root@localhost ~]# whereis cd
cd:/usr/bin/cd /usr/share/man/man1/cd.1.gz/usr/share/man/man1p/cd.1p.gz
[root@localhost ~]# which cd
/usr/bin/cd
三 PATH环境变量
定义的是系统搜索命令的路径
[root@localhost ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
阅读全文
0 0
- Linux命令搜索命令whereis与which
- 【Linux学习笔记】7:命令搜索命令whereis与which
- Linux命令搜索命令 whereis which
- 命令搜索命令whereis与which
- Linux命令-whereis与which(查找文件)
- Centos之命令搜索命令whereis与which
- Linux 搜索命令(locate/find/whereis/which/grep)
- linux中文件搜索命令(whereis,locate,which,find)
- Linux 搜索命令:find,locate,whereis,which,type
- linux命令:文件搜索(locate、whereis、which、find、grep)
- Linxu命令与文件的搜索 - which, whereis, locate, find
- 搜索命令之locate,whereis,which
- 文件搜索命令 locate、find、whereis、which
- linux命令which whereis locate 命令
- Linux学习之文件搜索命令(二)其他搜索命令 locate |which|whereis|grep
- linux常见命令(which,whereis,locate,find)
- linux 命令 which whereis find locate
- Linux命令简介—which、whereis、locate
- NAT地址转换常用命令详解
- 当云计算大神们聚在一起,他们在聊什么?
- locate命令
- 时间字段是否适合建立索引
- Eclipse 快捷键
- Linux命令搜索命令whereis与which
- 干货|如何构建高可用的分布系统
- Linux中的find命令
- 单链表基本操作的实现--创建、插入、查找、删除
- Linux中的grep命令
- VariantChangeType
- Linux中 帮助命令
- Linux中的gz格式压缩
- Linux中的其他命令帮助