This subchapter looks at man, a UNIX (and Linux) command.
man is the UNIX equivalent of a help function.
man is the command used to view manual pages.
This subchapter show you how to use the man command to get help. Because of huge variation in the various flavors of UNIX and Linux, the man installed on your computer or server is the best source of detailed information. If you have trouble with any of the lessons in this book or in general use of your UNIX or Linux system, always refer to the local man for help.
This subchapter looks at man, a UNIX (and Linux) command.
man is the UNIX equivalent of a help function.
man reports the contents of a manual page.
UNIX was the first operating system distributed with online documentation. This included man (manual pages for each command, library component, system call, header file, etc.) and doc (longer documents detailing major subsystems, such as the C programming language and troff.
example of man command with options
Most BASH commands accept options. These options follow a space character and are typed before you press RETURN or ENTER.
The format is man is followed by the name of the command or tool that you want to view. You will get the manual pages for the named command or tool.
The following example uses the manual page for the date command or tool.
$ man date DATE(1) BSD General Commands Manual DATE(1)
NAME date -- display or set date and time
SYNOPSIS date [-ju] [-rseconds] [-v [+|-]val[ymwdHMS]] ... [+output_fmt] date [-jnu] [[[mm]dd]HH]MM[[cc]yy][.ss] date [-jnu] -finput_fmtnew_date [+output_fmt] date [-ddst] [-tminutes_west] DESCRIPTION When invoked without arguments, the date utility displays the current date and time. Otherwise, depending on the options specified, date will set the date and time or print it in a user-defined way.
The date utility displays the date and time read from the kernel clock. When used to set the date and time, both the kernel clock and the hard- ware clock are updated.
Only the superuser may set the date, and if the system securelevel (see securelevel(8)) is greater than 1, the time may not be changed by more than 1 second. :
Typing the RETURN or ENTER key will bring up the next line of the manual page.
Typing the SPACE-BAR key will bring up the next page of text.
Typing the UP-ARROW or DOWN-ARROW key will move up or down one line.
Typing q will end viewing the manual page and return to the BASH prompt (the entire manual page will disappear from view).
The man command or tool will be a very useful reference.
A man page is typically organized:
NAME: Command name and brief description.
SYNOPSIS: The syntax for using the command, along with the flags (options) the command takes.
DESCRIPTION: Details about the command.
ENVIRONMENT: The environment variables used by the command.
EXIT STATUS: Information about how the command reports errors or success.
FILES: File related to the command.
SEE ALSO: related commands.
STANDARDS: The international standards, if any.
Some systems might have an AUTHOR or other sections.
Type man man for information about the local version of man.
man sections
The first seven distributions of UNIX (called V1 UNIX through V7 UNIX and collectively called traditional UNIX) included a two volume printed manual, which was divided into eight sections.
Some manual pages are located in sections. There are generally eight sections:
General commands
System [kernel] calls
C library functions
Special files (such as devices) and drivers
File formats, conventions, and miscellaneous information
games and screensavers
Macro packages
System administration commands and daemons
Note that on some systems, the system administration commands are in section 1m. This section is also sometimes called the Maintenance commands.
Note that on some systems, section 7 is Miscellaneous.
You can look at a particular section by adding the section number to the command line.
$ man SECTION-NUMBERcommandname
You can use the whatis command to find the sections and then look at the particular section of your choice.
The -f option is used to show all man page titles for entries that begin with a particular word. man -f file will show all the manual pages that have the word file in the title.
$ man file
-k option
The -k option runs a search on all manual pages for any manual page with a particular word anywhere on the page. The man -k file will show all the manual pages that have the word file anywhere in the manual page. The -k option can take a while to run.
In June 2009, Ken Milberg named this command as one of the Top 50 universal UNIX commands at this web page Top 50 Universal INIX commands. Note that this web page requires agreeing to be spammed before you can read it.
free music player coding example
Coding example: I am making heavily documented and explained open source code for a method to play music for free almost any song, no subscription fees, no download costs, no advertisements, all completely legal. This is done by building a front-end to YouTube (which checks the copyright permissions for you).
Create your own copy from the original source code/ (presented for learning programming).
Work on this project is very slow because I am homeless. I am available for work if someone can provide an indoor place to work in Costa Mesa, California, electricity, internet connections, a flat raised working surface (such as a table or desk), a sitting device (such as a chair or stool), and a fully functional reasonably modern used computer. Im already homeless, so you dont need to pay me (and I understand how much business people hate the minimum wage law). Just give me a chance to work.
Building a free downloadable text book on computer programming for university, college, community college, and high school classes in computer programming.
If you like the idea of this project, then please donate some money.
send donations to: Milo
PO Box 1361
Tustin, California 92781
At the time I am homeless. This greatly interferes with my ability to create this project, which can help nearly 20 million U.S. college students and more than 150 million students world-wide. I am looking for 30 rich people or corporations willing to donate $10 a month to my church so that the church can provide a place indoors for me to continue work. If you want to donate, please see help project. Thanks much.
Supporting the entire project:
If you have a business or organization that can support the entire cost of this project, please contact Pr Ntr Kmt (my church)
UNIX used as a generic term unless specifically used as a trademark (such as in the phrase UNIX certified). UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Ltd.
Names and logos of various OSs are trademarks of their respective owners.