Getting information about packages

Package information

If you simply want to get to know the installed version of a package or see its description, issue an info command:

$ pear info PEAR
About pear.php.net/PEAR-1.7.1
.. more info follows ..

Package files

You often don't know which files belong to a certain installed package. list-files is helping you here. It shows you the file's role and its full path:

$ pear list-files log
Installed Files For log
=======================
Type Install Path
doc  /usr/share/pear/docs/Log/docs/guide.txt
...
php  /usr/share/pear/Log/composite.php
php  /usr/share/pear/Log/console.php
...
data /usr/share/pear/data/Log/misc/log.sql
test /usr/share/pear/tests/Log/tests/composite.phpt
...
php  /usr/share/pear/Log.php

Package examples

While we try to document each package in the manual, many packages - with or without a manual entry - come with examples. They have the file role "doc" and can be located with list-files, too:

$ pear list-files log | grep ^doc
doc  /usr/share/pear/docs/Log/docs/guide.txt
doc  /usr/share/pear/docs/Log/examples/composite.php
doc  /usr/share/pear/docs/Log/examples/console.php
doc  /usr/share/pear/docs/Log/examples/display.php
doc  /usr/share/pear/docs/Log/examples/error_log.php
doc  /usr/share/pear/docs/Log/examples/file.php
doc  /usr/share/pear/docs/Log/examples/firebug.php
...

List all packages

list shows you all installed packages with their version and stability:

$ pear list
Installed packages, channel pear.php.net:
=========================================
Package                   Version   State
Archive_Tar               1.3.2     stable
Auth                      1.5.4     stable
Cache                     1.5.4     stable
Console_Getargs           1.3.4     stable
Console_Getopt            1.2.3     stable
...

To see all available packages on the channel server, use remote-list:

$ pear remote-list
... output follows ...

This command takes some time if there are many packages on the server

Search remote packages

Instead of going to the PEAR website, you can use the pear installer to search for package names.

$ pear search w3c
Retrieving data...0%.
Matched packages, channel pear.php.net:
=======================================
Package                    Stable/(Latest) Local
Services_W3C_CSSValidator  0.1.0 (alpha)         An Object Oriented Interface ...

The result list shows name, remote version and stability and the package description. Alternatively, you can use the package browser on pear.php.net.

    Поддержать сайт на родительском проекте КГБ