A man page for fork
, for example, is in the System Calls section that has number 2:
man 2 fork
How do you see what else is section 2 without resorting to Google?
manshell
A man page for fork
, for example, is in the System Calls section that has number 2:
man 2 fork
How do you see what else is section 2 without resorting to Google?
Man pages date back to Unix First Edition. While hypertext had been invented, it was still in infancy; the web was two decades away, and the manual was an actual printed book, often with one command per page if they fit (that's why they were called pages).
The format used for manual pages has evolved somewhat since then, but most pages aren't really designed for hypertext, and the default man
program doesn't support it (it's just a plain text viewer, with hacks to support some basic formatting). There are however man page viewing programs that reconstruct some hyperlinks, mainly links to other man pages, which are traditionally written in the form man(1)
where man
is the name of the man page and 1
is the section number:
You can browse the manual pages of several operating systems, converted to HTML by man2html
or similar tools, on a number of sites online, for example:
Some time after man pages had become the established documentation format on unix and some time before the web was invented, the GNU project introduced the info documentation format, more advanced than man while sticking to simple markup designed for text terminals. The major innovation of info compared to man was to have multi-page documentation with hyperlinks to other pages. Info is still the prefered documentation format for GNU projects, though most Info pages are generated from a Texinfo source (or sometimes other formats) that can also generate HTML. When info documentation for a program exists, it's often the main manual, while the man pages only contain basic information about command line arguments.
Man section 5 is "File Formats and Conventions" and is not installed by default. see What do the numbers in a man page mean?
To install part of it on a Debian system, install:
sudo apt-get install libarchive-dev
From packages.debian.org:
Package: libarchive-dev (3.1.2-11+deb8u1)
The libarchive library provides a flexible interface for reading and writing archives in various formats such as tar and cpio. libarchive also supports reading and writing archives compressed using various compression filters such as gzip and bzip2. The library is inherently stream-oriented; readers serially iterate through the archive, writers serially add things to the archive.
Double checking if man(5) tar page is installed:
dpkg -S /usr/share/man/man5/tar.5.gz
libarchive-dev:amd64: /usr/share/man/man5/tar.5.gz
Listing the files installed/owned by the package:
dpkg -L libarchive-dev | grep man
/usr/share/man
/usr/share/man/man5
/usr/share/man/man5/tar.5.gz
/usr/share/man/man5/mtree.5.gz
/usr/share/man/man5/libarchive-formats.5.gz
/usr/share/man/man5/cpio.5.gz
/usr/share/man/man3
/usr/share/man/man3/libarchive_internals.3.gz
/usr/share/man/man3/libarchive_changes.3.gz
/usr/share/man/man3/libarchive.3.gz
/usr/share/man/man3/archive_write_set_options.3.gz
/usr/share/man/man3/archive_write_open.3.gz
/usr/share/man/man3/archive_write_new.3.gz
/usr/share/man/man3/archive_write_header.3.gz
/usr/share/man/man3/archive_write_free.3.gz
/usr/share/man/man3/archive_write_format.3.gz
/usr/share/man/man3/archive_write_finish_entry.3.gz
/usr/share/man/man3/archive_write_filter.3.gz
/usr/share/man/man3/archive_write_disk.3.gz
/usr/share/man/man3/archive_write_data.3.gz
/usr/share/man/man3/archive_write_blocksize.3.gz
/usr/share/man/man3/archive_write.3.gz
/usr/share/man/man3/archive_util.3.gz
/usr/share/man/man3/archive_read_set_options.3.gz
/usr/share/man/man3/archive_read_open.3.gz
/usr/share/man/man3/archive_read_new.3.gz
/usr/share/man/man3/archive_read_header.3.gz
/usr/share/man/man3/archive_read_free.3.gz
/usr/share/man/man3/archive_read_format.3.gz
/usr/share/man/man3/archive_read_filter.3.gz
/usr/share/man/man3/archive_read_extract.3.gz
/usr/share/man/man3/archive_read_disk.3.gz
/usr/share/man/man3/archive_read_data.3.gz
/usr/share/man/man3/archive_read.3.gz
/usr/share/man/man3/archive_entry_time.3.gz
/usr/share/man/man3/archive_entry_stat.3.gz
/usr/share/man/man3/archive_entry_perms.3.gz
/usr/share/man/man3/archive_entry_paths.3.gz
/usr/share/man/man3/archive_entry_linkify.3.gz
/usr/share/man/man3/archive_entry_acl.3.gz
/usr/share/man/man3/archive_entry.3.gz
In OS/X you have already parts of the man 5 at /usr/share/man/man5 directory. Apart from copying there the aforementioned pages, have not investigated how to install them.
Best Answer
This command lists the sorted names of all the entries in the given section:
If you want to see the pathnames, use:
This tells
man
to search a section for all commands using the wildcard pattern*
(backslash-quoted so the shell doesn't interpret it).-a
finds all matches,-W
prints the pathnames instead of displaying the pages, and-S 1
specifies section one. Change the1
to whatever section you want to search.The
sed
command strips the filename extensions; remove it if you want to see the complete filenames.sort
sorts the results (-u
removes duplicates).For convenient reuse, this defines a Bash shell function:
For example, you can invoke it as
mansect 3
to see the entries in section three.[Tested on macOS.]