红联Linux门户
Linux帮助

Ubuntu下查找程序的相关路径

发布时间:2014-06-30 21:46:50来源:红联作者:velcbo
下面将介绍如何在快速定位Debian系统软件的安装路径信息。

dpkg同样被用于安装、卸载和供给和.deb软件包相关的信息。

dpkg is a tool to install, build, remove and manage Debian packages.

主要使用以下这两个功能:

-L|--listfiles ... List files `owned' by package(s).

-l|--list [ ...] List packages concisely.

例子:比如我们想查找chrome浏览器的路径

www @Ubuntu:~/myscript$ dpkg -l | grep chrome

ii google-chrome-stable 22.0.1229.94-r161065 The web browser from Google

ii xserver-xorg-video-openchrome 1:0.2.904+svn1050-1ubuntu0.1 X.Org X server -- VIA display driver

这样我们就能找到具体的正确的包名了,然后就是利用包名查找地址:

www @ubuntu:~/myscript$ dpkg -L google-chrome-stable
/.
/usr
/usr/bin
/usr/share
/usr/share/applications
/usr/share/menu
/usr/share/menu/google-chrome.menu
/usr/share/gnome-control-center
/usr/share/gnome-control-center/default-apps
/usr/share/gnome-control-center/default-apps/google-chrome.xml
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/google-chrome.1
/usr/share/doc
/usr/share/doc/google-chrome
/usr/share/doc/google-chrome/changelog.gz
/etc
/etc/cron.daily
/etc/cron.daily/google-chrome
/opt
以下省略部分结果。

作者:bossdarcy
文章评论

共有 0 条评论