Linux中whereis与which的区别是什么
发表于:2024-10-19 作者:千家信息网编辑
千家信息网最后更新 2024年10月19日,Linux中whereis与which的区别是什么?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。Linux命令搜索命令whereis
千家信息网最后更新 2024年10月19日Linux中whereis与which的区别是什么
Linux中whereis与which的区别是什么?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。
Linux命令搜索命令whereis与which的区别
一 whereis
1、语法
whereis 命令名
搜索命令所在的路径以及帮助文档所在的位置
选项:
-b:只查找可执行文件
-m:只查找帮助文件
2、实战
[root@localhost ~]# whereis lsls:/usr/bin/ls /usr/share/man/man1/ls.1.gz/usr/share/man/man1p/ls.1p.gz[root@localhost ~]# whoamiroot[root@localhost ~]# whatiswhatis what?[root@localhost ~]# whatis lsls (1)- list directory contentsls (1p)- list directory contents[root@localhost ~]# whereis -b lsls:/usr/bin/ls[root@localhost ~]# whereis -m lsls:/usr/share/man/man1/ls.1.gz/usr/share/man/man1p/ls.1p.gz
二 which
1、语法
which 命令名
搜索命令所在路径及别名
2、实战
[root@localhost ~]# which lsalias ls='ls --color=auto'/usr/bin/ls[root@localhost ~]# which pwd/usr/bin/pwd[root@localhost ~]# whereis cdcd:/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
关于Linux中whereis与which的区别是什么问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注行业资讯频道了解更多相关知识。
命令
帮助
搜索
所在
路径
问题
命令名
实战
文件
更多
语法
解答
易行
简单易行
位置
内容
别名
变量
小伙
小伙伴
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
数据库基础课程设计报告
歌尔eea事业部软件开发
深圳前端软件开发大概多少钱
数据库控制中心在哪
5g网络安全保障法
计算机网络技术主要有什么
国有企业网络安全自查情况报告
信息网络安全基础建设方案要求
通化网络安全知识竞赛答案
家族企业数据库
少年网络安全弊大于利的资料
凌晨无法访问腾讯服务器
网络安全法是基础性法律
软件开发要学C语言嘛
c 数据库连接加密
厦门股票配资软件开发
软件工程中软件开发的步骤
互联网科技保险行业
信息化主数据库
数据库索引使用的算法
数据库 gbk utf8
部署到本地服务器
安播和网络安全周报
剑网3怎么上传服务器
软件开发属于哪类职业
综合管理软件开发平台哪个好
数据库和数据表能不能同名
数据库和区块链的关系
新一代计算机网络技术 前景
数据库中间件处理比较大的查询