Qual`e` la differenza fra i comandi dpkg -l e apt-cache pkgnames?
Pongo questa domanda in quanto ho notato che il primo comando non trova alcuni pacchetti che invece trova il secondo.
Come mai?
grazie
ciao
Per favore, aggiungi TurboLab.it alle eccezioni del tuo Ad Blocker. Siamo un progetto no-profit, e la pubblicità è indispensabile per pagare le spese.
In alternativa, puoi sostenerci con una donazione.
Rispetteremo ogni tua scelta, e potrai sempre utilizzare il sito senza limitazioni.
Cerca e inserisci il collegamento a un articolo pubblicato da TurboLab.it

Per favore, aggiungi TurboLab.it alle eccezioni del tuo Ad Blocker. Siamo un progetto no-profit, e la pubblicità è indispensabile per pagare le spese.
In alternativa, puoi sostenerci con una donazione.
Rispetteremo ogni tua scelta, e potrai sempre utilizzare il sito senza limitazioni.

Codice: Seleziona tutto
NAME
dpkg - package manager for Debian
SYNOPSIS
dpkg [option...] action
...
...
DESCRIPTION
dpkg is a tool to install, build, remove and manage Debian packages.
The primary and more user-friendly front-end for dpkg is aptitude(1).
dpkg itself is controlled entirely via command line parameters, which
consist of exactly one action and zero or more options. The action-
parameter tells dpkg what to do and options control the behavior of the
action in some way.
dpkg can also be used as a front-end to dpkg-deb(1) and dpkg-query(1).
The list of supported actions can be found later on in the ACTIONS sec‐
tion. If any such action is encountered dpkg just runs dpkg-deb or
dpkg-query with the parameters given to it, but no specific options are
currently passed to them, to use any such option the back-ends need to
be called directly.
...
...
dpkg-query actions
See dpkg-query(1) for more information about the follow‐
ing 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.
...
...
EXAMPLES
To list packages related to the editor vi(1):
dpkg -l '*vi*'
...
Codice: Seleziona tutto
NAME
apt-cache - query the APT cache
SYNOPSIS
apt-cache [-hvsn] [-o=config string] [-c=file] {[gencaches] |
[showpkg pkg...] | [showsrc pkg...] | [stats] | [dump] |
[dumpavail] | [unmet] | [search regex] | [show pkg...] |
[depends pkg...] | [rdepends pkg...] | [pkgnames prefix] |
[dotty pkg...] | [xvcg pkg...] | [policy pkgs...] |
[madison pkgs...]}
DESCRIPTION
apt-cache performs a variety of operations on APT's package cache.
apt-cache does not manipulate the state of the system but does provide
operations to search and generate interesting output from the package
metadata.
...
...
pkgnames [ prefix ]
This command prints the name of each package APT knows. The
optional argument is a prefix match to filter the name list. The
output is suitable for use in a shell tab complete function and the
output is generated extremely quickly. This command is best used
with the --generate option.
Note that a package which APT knows of is not necessarily available
to download, installable or installed, e.g. virtual packages are
also listed in the generated list.
...
...
Per favore, aggiungi TurboLab.it alle eccezioni del tuo Ad Blocker. Siamo un progetto no-profit, e la pubblicità è indispensabile per pagare le spese.
In alternativa, puoi sostenerci con una donazione.
Rispetteremo ogni tua scelta, e potrai sempre utilizzare il sito senza limitazioni.