Ubuntu 查詢此一檔案屬於哪個套件所有

要查詢某個執行檔是屬於哪個套件所有的,可以用dpkg-query用法如下:


說明

       dpkg-query actions
              See dpkg-query(1) for more information about the following actions.

              -l, --list package-name-pattern...
                  List packages matching given pattern.
              -s, --status package-name...
                  Report status of specified package.
              -L, --listfiles package-name...
                  List files installed to your system from package-name.
              -S, --search filename-search-pattern...
                  Search for a filename from installed packages.
              -p, --print-avail package-name...
                  Display details about package-name, as found in
                  /var/lib/dpkg/available. Users of APT-based frontends
                  should use apt-cache show package-name instead.

操作

jerry@jerry-virtual-machine:~$ dpkg-query -S isql
freetds-bin: /usr/share/man/man1/fisql.1.gz
freetds-bin: /usr/bin/fisql
bash-completion: /etc/bash_completion.d/isql
unixodbc: /usr/share/man/man1/isql.1.gz
unixodbc: /usr/bin/isql

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s