[Localization] finding/counting man pages in diff languages?

Adam Holt holt at laptop.org
Thu Jan 7 14:08:52 EST 2016


Is it possible to generate a list of all commands that have man pages on a
given Linux machine?  (Or at least a decent approximation of how many in
each language?)

Are these all under /usr/share/man on Fedora-derived systems?  e.g. on this
sample system I see 8 language-specific subdirectories below that {de, es,
en, fr, pl, pt_BR, pt_PT, zh} and also 22 subdirectories that begin with
"man" {such as man1, man1x, man1p, mann}.  The "man?x" directories are
empty, and there are few "man?p" directories, but the "man?" directories
seems quite full.

The following suggests 3581 man pages:

   ls /usr/share/man | grep .gz | sort | uniq

But many commands appears 3 times (e.g. chmod.1p.gz, chmod.2.gz,
chmod.3p.gz) whereas others appear twice (e.g. encrypt.3.gz, encrypt.3p.gz)
and yet others only once (e.g. cd.1p.gz).  So the following suggests 2544
man pages, if the above duplicate are not meaningful (or are they??)

   ls /usr/share/man | sed 's/\..*//' | sort | uniq

Finally, the following shows only 56 man pages in foreign languages:

   ls /usr/share/man/??/* /usr/share/man/??_??/* | | sed 's/\..*//' | sort
| uniq

Meager indeed, ah well.  Still, how do I display these man pages in other
languages, anyone know?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/localization/attachments/20160107/e9c30b10/attachment.html>


More information about the Localization mailing list