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.

If I do
# man cp

on an ubuntu linux workstation, I get something like the quoted text below. Does anyone know of a way to restore the full man pages? I just do not like this hierarchical 'info' cr*p.

    ,----
    | CP(1)                            User Commands                           CP(1)
    |
    |
    |
    | NAME
    |        cp - copy files and directories
    |
    | SYNOPSIS
    |        cp [OPTION]... [-T] SOURCE DEST
    |        cp [OPTION]... SOURCE... DIRECTORY
    |        cp [OPTION]... -t DIRECTORY SOURCE...
    |
    |                      [. . . D E L E T I A . . .]
    |
--> | SEE ALSO
--> |        The  full  documentation  for cp is maintained as a Texinfo manual.  If
--> |        the info and cp programs are properly installed at your site, the  com‐
--> |        mand
--> |
--> |               info coreutils 'cp invocation'
--> |
--> |        should give you access to the complete manual.
    |
    |
    |
    | GNU coreutils 6.10                April 2008                             CP(1)
    `----
share|improve this question

migrated from stackoverflow.com Aug 11 '09 at 8:51

This question came from our site for professional and enthusiast programmers.

add comment

5 Answers

You could try the info2man tool, which you can get from the repos:

sudo apt-get install info2man

It takes an .info file (you can find info files in /usr/share/info) and outputs a troff file, the format that man uses.

Unfortunately, since cp is documented in coreutils, you are stuck converting everything in the coreutils info package into a single giant man page, unless you hand-edit info2man's output to include only the sections about cp.

I didn't go as far as actually updating my man database, but I did try it out to see what the output from info2man looks like:

mspross@vostro:~$ sudo apt-get install info2man #install info2man
mspross@vostro:~$ sudo gunzip /usr/share/info/coreutils.info.gz #info2man doesn't like .gz files
mspross@vostro:~$ sudo info2man /usr/share/info/coreutils.info > coreutils.txt
mspross@vostro:~$ nroff -e -mandoc coreutils.txt | less -s #preview the file to see how it will look in man
mspross@vostro:~$ sudo gzip /usr/share/info/coreutils.info #undo what we did earlier
share|improve this answer
add comment

Probably you need to install the "manpages" packages. Try something like that :

$apt-cache search manpages
...
// it gives you a list of manpages packages you could be interested in,
// as manpages, manpages-dev, manpages-posix, manpages-posix-dev, etc.
...
$apt-get install manpages
share|improve this answer
    
The problem is that cp is part of the GNU landscape, and they simply do not provide full man pages. "info" is the preferred documentation system for GNU utils sadly. –  GodEater Aug 11 '09 at 11:51
add comment

The correct answer is, volunteer for the GNU project to more fully populate the man pages from the info pages. This is not a happy answer, since it not only puts all the work on you, it is also unlikely that they will care enough about man to accept your labors.

share|improve this answer
add comment

Not actually answering your question, but you might find a related utility useful: info2html. Unfortunately there doesn't seem to be a package for it in the standard Ubuntu repositories.

The project page contains sample output that you can judge it by:

Of course this requires that you be running a local web server, which may be a problem for you. Though for the core stuff that everyone has installed you can always use the same site linked above.

share|improve this answer
add comment

It sounds like your shell is trying to give you information for its own version of cp, instead of the one in /bin.

First, you want to see if your man page is even installed; try locate cp.1 The man pages tend to be stored somewhere like /usr/local/man, and have the extension (at least on my Fedora system) .1.gz. If the file exists, hurrah! you're saved. Just pass the full path of the gzipped file to man, or try using a different shell, to see if it's intercepting the documentation request. If the files don't exist, you're going to have to figure out how to install them from the Ubuntu repositories.

Best of luck!

share|improve this answer
add comment

Your Answer

 
discard

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