Cris-Mac-Book-2:src cris$ man up
No manual entry for up

How can I remedy this situation?

I want to add an 'invented' manual entry for a non-existant command up so I can type man up when required. Suggestions of stuff to include are welcome additions to manual adding instructions.

Also, in case my workstation ever gets female users, I will be sure to ln woman :

Cris-Mac-Book-2:src cris$ sudo link /usr/bin/man /usr/bin/woman
Cris-Mac-Book-2:src cris$ woman
What manual page do you want?
Cris-Mac-Book-2:src cris$ 

Though I should probably change that to Which womanual page do you want? -- would that involve re-compile or is there a patch?


Here seem to be good instructions for adding a new manual page:

HowTo: Linux / UNIX Create a Manpage

In short, a manpage is simply a text file, with additional formatting information for troff

Its usually in the format

.\" Manpage for up.
.\" Contact cheer_up@havesomechocolate.com to correct errors or typos.
.TH man 8 "06 May 2010" "1.0" "name man page"
up \- into a higher position or level
up [anything you like]
up is a pretty good place to be
up does not take any options, though you can choose the speed of your acent 
yes(1), time cat (2) cal 3() 
No known bugs. Gravity is not a bug, "Its a feature"
Chris Stringfellow (cheer_up@havesomechocolate.com)

Save this as up

You can then view the manpage with man ./up from the same directory

Man pages are usually under /usr/local/man/man8/ and gzipped

You can copy over your manpage with cp up /usr/local/man/man8/up.1 then gzip it with gzip /usr/local/man/man8/name.1

You can then test it with man up - which should output something like this

  • 4
    Also, if writing raw *roff markup isn't your cup of tea, you could e.g. write the page in POD and use pod2man to convert it into a man page. – Ilmari Karonen Feb 26 '13 at 13:17

Though I should probably change that to Which womanual page do you want? -- would that involve re-compile or is there a patch?

Recompiling yields the best results, but this should do in the meantime:



man $ARG > /dev/null 2>&1

if [ $? -eq 0 ]; then
    man $ARG 2> /dev/null \
        | sed \
            -e 's/\(m[ae]n\)/wo\1/g' \
            -e 's/\(M[AE]N\)/WO\1/g' \
            -e 's/M\([ae]n\)/Wom\1/g' \
            -e 's/    //' \
            -e 's/\([^ ]\)  /\1 /g' \
        | less
    man $ARG 2>&1 | sed -e 's/\(m[ae]n\)/wo\1/'

Save as /usr/sbin/woman, set execution permissions and start testing:

woman down
woman woman
  • 2
    However I detected an error in my new woman. She keeps saying No wo0ual entry for down -- what did I say wrong? – Cris Stringfellow Feb 26 '13 at 17:27
  • woman sed only mentions \1 through \9 for s/regexp/replacewoment/, so \0 might not be available in all flavors and versions of sed. I've edited my answer. – Dennis Feb 26 '13 at 19:13
  • 2
    I'll be sure to check woman sed next time -- they are usually right! ;) BTW it works now. No womanual entry for sex is classic. Sed woman page is a deadset classic : A single comwomand may be specified as the first arguwoment to sed. – Cris Stringfellow Feb 26 '13 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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