E-Mail:

Learning about Commands, Part III

Learning about Commands, Part III

man, or “Manual” pages in Linux (and Unix) are
organized in a series of groups according to topics, called
“sections.” The man sections
are:

  1. User commands.
  2. System commands offered by the
    kernel.
  3. Library functions (like C programming libraries)

  4. Device commands (try typing man
    hd
    )
  5. File formats, typically for configuration files

  6. Game-related commands
  7. Miscellaneous
  8. Root only system
    administration tools
  9. Linux-specific system commands (as
    opposed to other forms of Unix)

Why did we take a side step into this topic? You need to
understand this information to fully take advantage of the apropos command. When you type:

apropos file | more

you get a ton of responses. My list starts with:

.ldaprc [ldap]       (5)  - ldap configuration file
/etc/anacrontab [anacrontab] (5)  - configuration file for anacron
/etc/isdn/callerid.conf [callerid] (5)  - config file for isdnlog numbers and scripts
/etc/isdn/isdn.conf [isdn] (5)  - config file for isdnlog
/etc/isdn/isdnlog.users [isdnlog] (5)  - user base isdnlog config file
/etc/nscd.conf [nscd] (5)  - name service cache daemon configuration file
/etc/yp.conf [yp]    (5)  - NIS binding configuration file

In each case, these items are configuration files, as we can see
from the section number in parentheses. The names in square
brackets are what you use to actually call the man page, since you don’t use something like
man /etc/anacrontab. Instead
you use man anacrontab. A bit
later in the list I have:

AnyDBM_File          (3pm)  - provide framework for multiple DBMs
B::Showlex           (3pm)  - Show lexical variables used in functions or files
BIO_append_filename  (3ssl)  - FILE bio
BIO_append_filename [BIO_get_fp] (3ssl)  - FILE bio
BIO_append_filename [BIO_new_file] (3ssl)  - FILE bio
BIO_append_filename [BIO_new_fp] (3ssl)  - FILE bio
BIO_append_filename [BIO_read_filename] (3ssl)  - FILE bio

These items are all from section 3, and so are library functions.
To view the B::Showlex perl module’s (pm’s) man page, we would type man B::Showlex. However, for the SSL function
BIO_append_filename “get fp” variant, we would type man BIO_get_fp.

If you know that what you’re looking for is not a programming
library, then the last thing you want is screens and screens of
section 3 items in your apropos output. We’ll take a look at how
to deal with this problem next week.

Next week: A trick for filtering out everything from
section 3.

What Do You Think?

 

Want to Start a Blog Here for Free?

Are you an expert in one subject or another? If your goal is to help others and dispense hard-earned information back to the community, stake a claim on your very own Lockergnome blog today! You can write about anything - no matter the topic. Sign-up to start blogging!

64 queries / 0.385 seconds.