Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When we man std::vector,how/where does it search for corresponding documents internally?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

From the man(1) man page:

SEARCH PATH FOR MANUAL PAGES
   man uses a sophisticated method of finding manual page files, based  on
   the  invocation  options and environment variables, the /etc/man.config
   configuration file, and some built in conventions and heuristics.

   First of all, when the name argument to man contains a slash  (/),  man
   assumes  it  is  a file specification itself, and there is no searching
   involved.

   But in the normal case where name doesn’t contain a slash, man searches
   a variety of directories for a file that could be a manual page for the
   topic named.

There's a lot more text in there though. I'll let you read it at your leisure.

share|improve this answer
    
@Ignacio Vazquez-Abrams,can you guide me how to install the libc++ docs manually ? gcc.gnu.org/pub/gcc/libstdc++/doxygen/… –  xpbug Jun 1 '11 at 12:43
    
yum install libstdc++-docs this doesn't work for me(No package libstdc++-docs available.),so I assume that c++ man docs aren't available in my repository:( –  xpbug Jun 1 '11 at 12:45
    
Copy all the .<n> files to the man<n>/ directories, usually in /usr/share/man. –  Ignacio Vazquez-Abrams Jun 1 '11 at 12:45
    
@Ignacio Vazquez-Abrams,files under /usr/share/man/man are all zipped,i.e. ldap_abandon_ext.3.gz,but the docs I downloaded are only tared,not zipped. And I tried to unzip it,still fails... Can you be more specific on the steps? –  xpbug Jun 1 '11 at 12:50
    
Extract the files from the archive. Move or copy them. It doesn't matter that the individual man pages aren't compressed; man doesn't care. –  Ignacio Vazquez-Abrams Jun 1 '11 at 12:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.