| apt-get | yum | cpan
|
|---|
| install a package
| apt-get install <pkg>
| yum install <pkg>
| cpan <pkg>
|
|---|
| list packages
| installed
| dpkg -l
| yum list installed
| cpan -l
|
|---|
| all
| apt-cache pkgnames
| yum list
| gzip -dc ~/.cpan/sources/modules/02packages.details.txt.gz | awk '/^$/,0 {print $1}'
|
|---|
| search available packages
| apt-cache search <keyword>
| yum search <keyword>
| echo "i /<keyword>/" | cpan
|
|---|
| show summary info for package
| any
| apt-cache show <pkg>
| yum info <pkg>
|
|
|---|
| installed
| dpkg -s <pkg>
|
| perldoc <module>
|
|---|
| list files in package
| installed
| dpkg -L <pkg>
| rpm -ql <pkg>
| locate .packlist | grep <pkg> | xargs cat
perl -MExtUtils::Installed -le'$,=$/;print ExtUtils::Installed->files(shift)' <module>
|
|---|
| any
| apt-file list <pkg>
| repoquery -q -l <pkg>
|
|
|---|
| list packages that own a file
| all
| apt-file search <filename>
| repoquery -q --file <filename>
|
|
|---|
| installed
| dpkg -S $(readlink -m <filename>)
| yum whatprovides $(readlink -m <filename>)
|
|
|---|