Posts tagged ‘windex’

Indexing your man pages

Its not as boring as you think, but you’ll HAVE to do it when you don’t have a windex file and want to search using man -k :

anton@opensolaris:/$ man -k grub
/usr/share/man/windex: No such file or directory

To get round this, we simply go ahead and create the index with catman:

anton@opensolaris:/$ pfexec time catman -w

real        2.9
user        1.8
sys         0.1

Its pretty quick, and you get left with a little index in /usr/share/man/windex. Its just an ascii version of all the names of your manpages, plus a one line summary of what each one does:

1        1 (3openssl)    - OpenSSL configuration functions
1        1 (3openssl)    - OpenSSL configuration functions
1394        ieee1394 (7d)    - Solaris IEEE-1394 Architecture
2        2 (3openssl)    - \& OpenSSL configuration cleanup functions
2        2 (3openssl)    - \& OpenSSL configuration cleanup functions
2        2 (3openssl)    - \& OpenSSL configuration cleanup functions
2.1        EasyTAG (1)    - Tag editor for MP3 and Ogg Vorbis files
2_F32_Sat    mlib_SignalConvertShift_U8_S8_Sat (3mlib)   – data type convert
with shifting
5.0        MySQL (1)    - MySQL RDBMS version 5.0 for Solaris
6to4        tun (7m)    - tunneling STREAMS module
6to4relay    6to4relay (1m)    - administer configuration for 6to4 relay router
communication
6to4tun     tun (7m)    - tunneling STREAMS module
7-Zip        7-Zip (1)    - A file archiver with highest compression ratio

So now when you do your man -k , you’ll get something useful!:

anton@opensolaris:/$ man -k grub
bootadm     bootadm (1m)    - manage bootability of GRUB-enabled operating system
grub        grub (5)    - GRand Unified Bootloader software on Solaris
installgrub    installgrub (1m)    – install GRUB in a disk partition or a floppy

Crucially you only want to do catman -w , otherwise you’ll be reformatting all your manpages!

From the man page of catman:

-w                  Only create the windex database that  is
used  by whatis(1) and the man(1) -f and
-k options.  No manual  reformatting  is
done.