The command man -k
queries against a pre-compiled database and not the manual pages themselves.
I suspect that entries may have been made in the database (see man mandb
for details) for pages that don't actually exist. I am not familiar enough with the RPM mechanisms to know how this could have happened.
In a similar vein, there is considerable flexibility in what section a given manual page may claim to live. For example, on my system man Carp
claims to be in section "3perl" where the underlying file is stored in .../man3/Carp.3perl.gz
. The commands
man Carp
man -s 3 Carp
man -s 3perl Carp
all yield the same page while man -s 3junk Carp
complains that there is no such entry.
You might find mlocate
(a.k.a. locate
) to be useful for hunting files by name. I presume it is available for RedHat since redacted@redhat.com is credited as the author.
Named pipes (fifo) have four three advantages I can think of:
(Updated, thanks to feedback from Stephane Chazelas)
So one immediately obvious task you cannot achieve with an unnamed pipe is a conventional client/server application.
The last (stricken) point above about unidirectional pipes is relevant on Linux, POSIX (see popen()
) says that a pipe need only be readable or writeable, on Linux they are unidirectional. See Understanding The Linux Kernel (3rd Ed. O'Reilly) for Linux-specific details (p787). Other OS's offer bidirectional (unnamed) pipes.
As an example, Nagios uses a fifo for its command file. Various external processes (CGI scripts, external checks, NRPE etc) write commands/updates to this fifo and these are processed by the persistent Nagios process.
Named pipes have features not unlike TCP connections, but there are important differences. Because a fifo has a persistent filesystem name you can write to it even when there is no reader, admittedly the writes will block (without async or non-blocking I/O), though you won't loose data if the receiver isn't started (or is being restarted).
For reference, see also Unix domain sockets, and the answer to this Stackoverflow question which summarises the main IPC methods, and this one which talks about popen()
Best Answer
That option would not be useful when
rpm
is called from a shell.But when called from some other program it would simplify passing non-static arguments to
rpm
if those arguments are constructed from some form of user input (provided the calling program is written in a language that does not forcefully call a shell to execute other programs anyway):rpm
andCMD
separately.sh -c ´rpm Argument1 Argument2 ...´ | CMD
, it needs an additional level of quoting around arguments to prevent them from being split into words or interpreted by the shell if those arguments could contain spaces or shell metacharacters:If some argument to
rpm
is user input to the calling program, it could possibly beTom and Alice´s dog
and the programmer would have to translate that toTom\ and\ Alice\´s\ dog
when building the argument list for the shell. (And any arguments toCMD
would have to be quoted the same way.)This is slower, error prone and may raise security concerns.
--pipe
option, the calling program needs none of these.(But any arguments to
CMD
would have to be quoted like before because CMD is interpreted by a shell which is called fromrpm
becauseCMD
is a single word from a single argument torpm
.)