music |
| | OSdata.com |
man
summary
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.
man [options]
[section] names
shells: | ash | bash | bsh | csh | ksh | sh | tcsh | zsh |
File Name: | man | Directory: | /usr/bin/ | Type: | External |
man
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] [-r seconds] [-v [+|-]val[ymwdHMS]] ... [+output_fmt]
date [-jnu] [[[mm]dd]HH]MM[[cc]yy][.ss]
date [-jnu] -f input_fmt new_date [+output_fmt]
date [-d dst] [-t minutes_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-NUMBER commandname
You can use the whatis command to find the sections and then look at the particular section of your choice.
$ whatis crontab
$ whatis crontab
crontab(1) - maintain crontab files for individual users (V3)
crontab(5) - tables for driving cron
$ man 5 crontab
-f option
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.
$ man file
other
On November 8, 2010, Ramesh Natarajan named this the number 41 most frequently used Unix/Linux command at this web page 50 Most Frequently Used UNIX / Linux Commands (With Examples).
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.
comments, suggestions, corrections, criticisms
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).
View music player in action: www.musicinpublic.com/.
Create your own copy from the original source code/ (presented for learning programming).
This section is under the category of owning cirticism.
In response to a posting about my article collecting social media, Moderator +Andrew Smith (Technology addict, Web Developer, API guru, futsal and football wannabe, and all round nice guy!, Swordfox Design, arrowtown, new zealand) of the Google+ community Web Developers, Web Designers, Web Coding claims Quite frankly this is self promotion, and your site is not of great quality. I can see how +Joost SchuurÊ would think this of not high enough a standard.
Because I no longer have the computer and software to make PDFs, the book is available as an HTML file, which you can convert into a PDF.
Names and logos of various OSs are trademarks of their respective owners.