2

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)
    `----
0

5 Answers 5

3

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
2

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.

1

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.

0

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!

0

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
1
  • 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, 2009 at 11:51

You must log in to answer this question.