Linux 查找特定程序 whereis
Linux 查找特定程序 whereis
whereis 命令主要用于查找程序文件,并提供这个文件的二进制可执行文件、源代码文件和使用手册存放位置。
1、查找命令程序
例如,查找 touch 命令
[root@node1 /]# whereis touch
touch: /usr/bin/touch /usr/share/man/man1/touch..gz
执行效果如下:

如果只需要查找 touch 命令的二进制文件,可以使用 -b 选项实现:
[root@node1 /]# whereis -b touch
touch: /usr/bin/touch
效果如下:

2、查找应用程序
例如,查找 nginx 服务
[root@node1 /]# whereis nginx
nginx: /usr/sbin/nginx /usr/lib64/nginx /etc/nginx /usr/share/nginx /usr/share/man/man8/nginx..gz
例如,查找 java
[root@node1 /]# whereis java
java: /usr/java/jdk1..0_191/bin/java /usr/local/jdk1..0_191/bin/java
如果查询的程序不存在,则返回一个空字符串。
例如,查找 hello 程序
[root@node1 /]# whereis hello
hello:
Linux 查找特定程序 whereis的更多相关文章
- Linux查找运行程序主目录
1.查看程序所在PID netstat -lntup 2.根据PID查找程序所在目录 ll /proc/PID/exe 3.查找程序配置路径 /proc/PID/exe -t
- linux 查找java程序、杀死、重启
查看java进程 ps -ef|grep java杀死进程 kill -9 4834 (进程号)启动 java -jar xxx.jar & (后台会一直运行)
- 大量示例彻底搞懂Linux查找,which,whereis,locate,find
前言 Linux常用命令中,有些命令可以帮助我们查找二进制文件,帮助手册或源文件的位置,也有的命令可以帮助我们查找磁盘上的任意文件,今天我们就来看看这些命令如何使用. which which命令会在P ...
- Linux查找命令对比(find、locate、whereis、which、type、grep)
//太长不看版find查找磁盘空间,相较于locate和whereis速度较慢.find和locate的查找单位为文件或者目录,locate其实是find -name的另一种写法.locate和whe ...
- Linux 查找文件命令 find whereis locate
Linux 有三个查找文件的命令:find, whereis, locate 其中find 不常用,whereis与locate经常使用,因为find命令速度较慢,因为whereis与locate是利 ...
- linux的查找命令 find whereis locate
Linux 有三个查找文件的命令:find, whereis, locate 其中find 不常用,whereis与locate经常使用,因为find命令速度较慢,因为whereis与locate是利 ...
- linux 文件查找,which,whereis,locate,find
linux 文件查找,which,whereis,locate,find 一:which 主要用于查找可执行命令的所在位置: 如图,查找命令 ls的目录: 二:whereis 主要用于查找命令的帮助文 ...
- linux根据进程号PID查找启动程序的全路径
linux根据进程号PID查找启动程序的全路径 2014-01-25 11:09 18629人阅读 评论(0) 收藏 举报 分类: Linux系统管理(29) 版权声明:本文为博主原创文章,未经博 ...
- Linux查找含有特定字符串的文件
Linux查找含有特定字符串的文件命令为grep.以下为详细的使用方法 grep [OPTIONS] PATTERN [FILE...] #实例:递归查找当前文件夹下所有含有test的文件,并显示行号 ...
随机推荐
- MHA原理
MHA工作原理 主库挂了,但是主库的binlog都被全部从库接收,此时会选中应用binlog最全的一台从库作为新的主库,其他从主只需要重新指定一下主库即可(因为此时,所有从库都是一致的,所以只需要重新 ...
- codeforces Educational Codeforces Round 65 (补完)
C News Distribution 并查集水题 D Bicolored RBS 括号匹配问题,如果给出的括号序列nesting depth为n,那么最终可以分成两个nesting depth为n ...
- D - Yet Another Problem On a Subsequence CodeForces - 1000D (DP,组合数学)
D - Yet Another Problem On a Subsequence CodeForces - 1000D The sequence of integers a1,a2,-,aka1,a2 ...
- Summer training #9
A:树形DP 给出一棵树,但是它的边是有向边,选择一个城市,问最少调整多少条边的方向能使一个选中城市可以到达所有的点,输出最小的调整的边数,和对应的点 要改变的边的权值为1,不需要改变的边的权值为0, ...
- UVa156 Ananagrams(映射map)
Ananagrams 题目 Most crossword puzzle fans are used to anagrams--groups of words with the same letters ...
- .NET Core 3来了!如何使用DevExpress WPF创建.NET Core 3应用
DevExpress广泛应用于ECM企业内容管理. 成本管控.进程监督.生产调度,在企业/政务信息化管理中占据一席重要之地.通过DevExpress WPF Controls,您能创建有着强大互动功能 ...
- 报表开发神器!DevExpress Reporting v19.1:WinForms平台新功能
行业领先的.NET界面控件DevExpress Reporting全新发布了v19.1版本,本文主要为大家介绍WinForms.ASP.Net Core平台.Visual Studio报表设计器中发布 ...
- 用脚本来运行scrapy crawl ...
启动爬虫的命令为: scrapy crawl spidername(爬虫名) 方案(一)name.py #!/usr/bin/env python # -*- coding:utf-8 -*- fro ...
- Luogu P3804 【模板】后缀自动机
注意空间开两倍 #include <bits/stdc++.h> using namespace std; typedef long long LL; template<class ...
- vscode安装eslint插件,代码统一自动修复
ESlint:是用来统一JavaScript代码风格的工具,不包含css.html等. 方法和步骤: 通常情况下vue项目都会添加eslint组件,我们可以查看webpack的配置文件package. ...