Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 514  / 2 Years ago, fri, august 5, 2022, 5:54:51

I have an install script for a little program (script) that comes with man pages.


How can I find the location (full path) of the main man page directory?


As manpath gives me a list of directories, I would like a command to get a single directory and in best case the main one in order to copy man-files there.


More From » bash

 Answers
3

Filesystem Hierarchy Standard stated that Manual pages are stored in <mandir>/<locale>/man<section>/<arch>
With <mandir> usually be /usr/share/man, and the man<section> that fits best with your case is man1:
man1: User programs Manual pages that describe publicly accessible commands are contained in this chapter. Most program documentation that a user will need to use is located here.
Other attributes in the path can be found in the standard.


So yes, you can save your man files straight in /usr/share/man/man1, but try to save it in a more specific path to comply with the standard and to, quote from above standard link, "support manual pages which are written in different (or multiple) languages. These provisions must take into account the storage and reference of these manual pages. Relevant factors include language (including geographical-based differences), and character code set".


[#1121] Saturday, August 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eeperant

Total Points: 39
Total Questions: 106
Total Answers: 117

Location: Finland
Member since Sat, Dec 5, 2020
4 Years ago
;