Vedi dove un pacchetto è installato su Ubuntu

Vedi dove un pacchetto è installato su Ubuntu
Vedi dove un pacchetto è installato su Ubuntu

Video: Vedi dove un pacchetto è installato su Ubuntu

Video: Vedi dove un pacchetto è installato su Ubuntu
Video: 🐧 10 COMANDI LINUX MODERNI CHE DEVI CONOSCERE (nel 2022) - YouTube 2024, Aprile
Anonim

Una volta che si utilizza l'utilità apt-get per installare un pacchetto, a volte sembra scomparire nel nulla. Sai che è installato, non hai idea di dove.

Se si conosce il nome dell'eseguibile, è possibile utilizzare il comando which per trovare la posizione del file binario, ma ciò non fornisce informazioni su dove si possono trovare i file di supporto.

C'è un modo semplice per vedere le posizioni di tutti i file installati come parte del pacchetto, usando l'utility dpkg.

dpkg -L

Esempio: avevo installato davfs2, ma non ero sicuro di dove fosse il file di configurazione, quindi ho eseguito questo comando:

geek@ubuntuServ:~$ dpkg -L davfs2

davfs2: /usr/share/lintian/overrides/davfs2 davfs2: /usr/share/davfs2/GPL davfs2: /usr/share/doc/davfs2/BUGS davfs2: /usr/share/doc/davfs2/copyright davfs2: /usr/share/davfs2/NEWS davfs2: /usr/share/doc/davfs2/THANKS davfs2: /usr/share/doc/davfs2/NEWS.gz davfs2: /usr/share/doc/davfs2/README.gz davfs2: /usr/share/doc/davfs2 davfs2: /usr/share/doc/davfs2/TODO davfs2: /etc/davfs2/secrets davfs2: /usr/share/davfs2/THANKS davfs2: /usr/share/doc/davfs2/README.Debian davfs2: /usr/share/davfs2/BUGS davfs2: /etc/davfs2/davfs2.conf davfs2: /usr/share/davfs2/ChangeLog davfs2: /usr/share/davfs2/FAQ davfs2: /etc/davfs2 davfs2: /usr/share/doc/davfs2/changelog.Debian.gz davfs2: /usr/share/davfs2/secrets.template davfs2: /usr/share/doc/davfs2/changelog.gz davfs2: /usr/share/davfs2/TODO davfs2: /usr/share/davfs2/davfs2.conf.template davfs2: /usr/share/davfs2/README davfs2: /usr/share/davfs2 davfs2: /usr/share/doc/davfs2/FAQ

Bene, ora non devo più chiedermelo. Il file conf è chiaramente /etc/davfs2/davfs2.conf. Se volessi vedere solo quali file sono stati installati in / etc, potresti sempre annullare l'output in questo modo:

geek@ubuntuServ:~$ dpkg -L davfs2 | grep etc

davfs2: /etc/davfs2/secrets davfs2: /etc/davfs2/davfs2.conf davfs2: /etc/davfs2

Ancora più facile da leggere.

Aggiornamento: modificato da -S a -L grazie a un suggerimento da parte di sebest.

Consigliato: