Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read a .man file not on manpath?

Tags:

unix

manpage

How do I read a .man file that's not on my manpath? I know I had a command for this, but now I don't remember, and I can't find the right switch in the man pages for man.

like image 625
Nagel Avatar asked Dec 01 '11 02:12

Nagel


People also ask

How do I read a .man file?

You can try to read your file by doing man path_to_file , as man will treat the given argument as a file if it finds a slash / in it. For instance man ./my_test will open the my_test file, while man my_test will look in the standard manual for the given command. Awesome, @IceCoder!

What are .man files?

what is a . man file? The MAN file extension is used for a Unix Manual that is implemented by Unix Systems Programming. It is actually an introduction to the use of Unix with focus on techniques and principles. Users should have basic knowledge with C program and familiarity with Linux or Unix operating systems.


2 Answers

You can try to read your file by doing

man path_to_file 

as man will treat the given argument as a file if it finds a slash / in it. For instance

man ./my_test 

will open the my_test file, while

man my_test 

will look in the standard manual for the given command.

like image 51
moongoal Avatar answered Oct 02 '22 11:10

moongoal


If your man page is in a non-standard directory location, you can use:

man -M <path to man directory> mymanpage 

You can also use the MANPATH environment variable:

MANPATH=<path to man directory> man mymanpage 

If you are looking to format a standalone man page, use nroff:

nroff -man mymanpage.1 
like image 20
David K. Hess Avatar answered Oct 02 '22 11:10

David K. Hess