For the system using RPM (yum) package manager, for instance (here) CentOS, use yum provides
or yum whatprovides
:
provides or whatprovides
Is used to find out which package provides some feature or
file. Just use a specific name or a file-glob-syntax wildcards
to list the packages available or installed that provide that
feature or file.
For pcresyntax
, you can try:
yum whatprovides "*/pcresyntax"
From RHL documentation,
yum provides "*/file_name"
is a useful way to find the packages that contain file_name.
Also visit How do I find which rpm package supplies a file I'm looking for?
For Debian/Ubuntu based system which use APT as default package-manager, there is apt-file
(thanks @Gilles for pointing out) command which can do a job what you're looking for.
DESCRIPTION
apt-file is a command line tool for searching files in packages for the APT package management system.
search Search in which package a file is included. A list of all packages containing the pattern pattern is returned.
So, use apt-file search
to find a package that includes a file you're looking for.
In another words, manpage is provided by files (usually from /usr/share/man) and possible duplicate of How to find out which (not installed) package a file belongs to?!
man
has an option to read a local file: -l
-l, --local-file
Activate `local' mode. Format and display local manual files instead of searching through the system's manual
collection.
Each manual page argument will be interpreted as an nroff source file in the correct format. No cat file is produced.
If
'-' is listed as one of the arguments, input will be taken from stdin. When this option is not used, and man fails to find
the page required, before displaying the error message, it attempts to act as if this option was supplied, using the name as
a filename and looking for an exact match.
So you can preview your work in progress with:
man -l /path/to/manfile.1
Best Answer
If you want to easily print a man doc I usually do it the graphical way:
Then you can print certain pages in your web browser. This isn't as powerful as doing it through the command line but it's a lot easier to get right since you can actually see what you're printing ahead of time. This may be important if you want to print a landscape document or something of that sort.