Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I best use a manpage tar ball? (untar + search + read)

During an offiline C programming exam, we only have access to a tarball of the latest man pages (https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/).

The man pages installed on the system itself are outdated.

Is there a way to replace the systems current man pages with the given tar ball or make them more accessible, such that I can search through them and use less to read them?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can just untar them and then point man at specific files. E.g:

$ cd man-pages-6.00
$ man man3/printf.3

This will open the man page in your pager.

You can also set the MANPATH environment variable to point to this location; then man will use it by default:

$ cd man-pages-6.00
$ export MANPATH=$PWD
$ man printf

This will replace the system man pages, so that running man for a command not included in the tar archive will fail:

$ man ls
No manual entry for ls

You can get the best of both worlds by telling man to search the unpacked tar archive first, and then search the system man pages:

$ cd man-pages-6.00
$ export MANPATH=$PWD:
$ man ls

That trailng : in MANPATH=$PWD: means "use the default path".

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading