应用程序通常由3种不同的文件类型组成:
Linux (例如,CentOS、RHEL)在哪里存储给定应用程序的二进制文件?我如何才能为一个应用程序找到它?
发布于 2019-02-26 10:41:27
您可以在此任务中使用whereis
。
$ whereis python3
python3: /usr/bin/python3.5m /usr/bin/python3 /usr/bin/python3.5 /usr/lib/python3 /usr/lib/python3.5 /etc/python3 /usr/local/lib/python3.5 /usr/share/python3 /usr/share/man/man1/python3.1.gz
发布于 2022-07-20 15:12:18
通常,请参阅文件系统-继承(FSH):
https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html
对你的问题的直接(简化)回答是:
/usr/bin
/usr/lib
(库)/etc
/var
/usr/share
-独立的只读数据(如图像)如果您使用的是基于debian的系统,您可以找到使用dpkg -L
的特定应用程序(包)部署了哪些文件:
$ dpkg-query -L xclip
/usr/bin/xclip
/usr/share/doc/xclip/README
/usr/share/doc/xclip/changelog.Debian.gz
/usr/share/doc/xclip/changelog.gz
/usr/share/doc/xclip/copyright
/usr/share/man/man1/xclip.1.gz
在这个(缩写)的例子中,我们看到包xclip
在/usr/bin
中有一个二进制文件,在/usr/share/doc/xclip
中有一些变更和版权内容,在/usr/share/man/man1
中有一个手册页。
其他发行版也有用于同一件事的其他工具。
https://unix.stackexchange.com/questions/503099
复制相似问题