如何在快速定位Debian系统软件的安装路径信息。


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

[plain]  view plain copy print ?
  1. dpkg  is  a tool to install, build, remove and manage Debian packages.  
主要使用以下这两个功能:

[html]  view plain copy print ?
  1. -L|--listfiles <package> ...     List files `owned' by package(s).  
  2. -l|--list [<pattern> ...]        List packages concisely.  

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

[html]  view plain copy print ?
  1. androidyue@ubuntu:~/myscript$ dpkg -l | grep chrome  
  2. ii  google-chrome-stable                   22.0.1229.94-r161065                                The web browser from Google  
  3. ii  xserver-xorg-video-openchrome          1:0.2.904+svn1050-1ubuntu0.1                        X.Org X server -- VIA display driver  

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

[html]  view plain copy print ?
  1. androidyue@ubuntu:~/myscript$ dpkg -L google-chrome-stable  
  2. /.  
  3. /usr  
  4. /usr/bin  
  5. /usr/share  
  6. /usr/share/applications  
  7. /usr/share/menu  
  8. /usr/share/menu/google-chrome.menu  
  9. /usr/share/gnome-control-center  
  10. /usr/share/gnome-control-center/default-apps  
  11. /usr/share/gnome-control-center/default-apps/google-chrome.xml  
  12. /usr/share/man  
  13. /usr/share/man/man1  
  14. /usr/share/man/man1/google-chrome.1  
  15. /usr/share/doc  
  16. /usr/share/doc/google-chrome  
  17. /usr/share/doc/google-chrome/changelog.gz  
  18. /etc  
  19. /etc/cron.daily  
  20. /etc/cron.daily/google-chrome  
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值