利用 apt-file 來搜尋檔案/套件名稱

最近因為某些需求,開始回頭用 Ubuntu/Debian

最近有人問我,有沒有辦法找出某個已安裝的套件名稱,或者找出某個檔案屬於哪個套件

前者可以用 dpkg 或 dlocate -S 來達到目的

不過後者我當時回答不上來

找了一下資料,apt-file 似乎是個不錯的 tool

安裝 apt-file
sudo apt-get install apt-file
更新 apt-file 的資料
sudo apt-file update
利用 apt-file 找出套件
sudo apt-file search gcc-3.4

還有許多有趣的玩法及組合,就慢慢參考 man manual 吧:p

歷史上的今天..

Pages:
  1. dpkg -S  應該可以找哪個檔案屬於套件 :)

Leave a Comment


*


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <font color="" face="" size=""> <span style="">