Original blog, reproduced please indicate the source
Http://blog.csdn.net/hello_hwc
My virtual machine system is CentOS, the version is older, understanding
Why do you want to learn a help order?
To give people to fish than to teach people to fishing, learned how to look at the help document, is to find a solution to a class of problems, rather than a problem of the method.
second, a few commonly used naming
1, Man
-WWhere to print related help documents
-K Find the specified string in the man page the same as the apropos command
-F Same as the Whatis.
Then we use the Man LS command to analyze the contents of the man page in detail.
[[email protected] ~]# man Lsls (1) User Commands LS (1) NAME ls-list directory contentssynopsis ls [OPTION] ... [FILE] ... DESCRIPTION List information about the FILEs (the current directory by default). Sort entries Alphabetically if none Of-cftuvsux nor--sort. Mandatory arguments to long options is Mandatory for short options too. -A,--all do not ignore entries starting with. -A,--almost-all do not list implied. And ..... Middle omitted author written by Richard Stallman and David mackenzie.reporting BUGS report BUGS to <[email prote Cted]>. COPYRIGHT copyright©2006 Free Software Foundation, Inc. This is the free software. Redistribute copies of it under the terms of the GNU general public License As you can see here, the info LS can give a detailed description
first you will see the title of each part of name,copyright, the meaning of the specific reference
Name name, simple command is used to do what the synopsis short instructions use syntax description detailed description command using options for synopsis, Make a detailed exposition of the commands that can be issued when the commands executes. Files directives related to the file see also and the command associated with this instruction example example bugs the existing vulnerability copyright information reporting Bugs found a bug can upload the mailbox author author
then you see the LS (1) followed by a 1, and this number has a specific meaning.
1 instruction or executable 2 kernel callable function 3 common function Library 4 archive Description 5 file format 6 game 7linux system descriptive content 8root available management naming 9 and kernel-related files
How to page pages in man pages, find
Arrows up and down Up and down line toggle
Home/end To the first page, the last page
/string Find a string, n the next found result, n previous
Q End this time.
When to use the Man command
My experience is: This command is not familiar with, need to look at the details of how you want to use the function, the general order is name-synopsis-description-example
2 、-- Help
List common options for common naming
Use occasions: know the field of use of this command, and the simple way to use, just not familiar with certain options
[[email protected] ~]# file--helpusage:file [OPTION] ... [FILE] ... Determine file type of FILEs. -M,--magic-file list use list as a colon-separated list of magic number files-z,--u Ncompress try to look inside compressed files-b,--brief does not prepend filenames to output Lin Es-c,--checking-printout print the parsed form of the magic file, use in conjunction w Ith-m to debug a new magic file before installing It-f,--files-from file read the F Ilenames to is examined from File-f,--separator string use string as separator instead of ': '-I,--mime Output MIME type strings-k,--keep-going don ' t stop at the first match-l,--dereference Caus Es symlinks to is followed-n,--no-buffer do not buffer output-n,--no-pad does not pad output -p,--preserve-date preserve access Times on Files-r,--raw don ' t translate unprintable chars to \ooo-s,--special-files treat SP Ecial (Block/char devices) files as ordinary ones--help display this hel P and exit--version output version information and exit
3, Whatis
Find the Whatis database and look for descriptive information about the keywords. After we have learned man, we can see the information directly from man Whatis.
Use occasions: we want to know what this command is used for, or we want to know the kind of command.
[Email protected] ~]# Whatis Lsls (1) -list directory Contentsls (1p) -List directory Contents[[email Protected] ~]# Whatis CDCD (1p) -Change the working DIRECTORYCD [Builtins] (1) -Bash built-in commands, See Bash (1)
4. Help
See Help for the Shell's built-in instructions, such as our CD is a bash built-in instruction
[[Email protected] ~]# CD--HELPBASH:CD:--: Invalid OPTIONCD:USAGE:CD [-l|-p] [dir][[email protected] ~]# help CDCD:C d [-l|-p] [dir] Change the current directory to dir. The variable $HOME is the default DIR. The variable Cdpath defines the search path for the directory containing DIR. Alternative directory names in Cdpath is separated by a colon (:). A NULL directory name is the same as the current directory, i.e. If DIR begins with a slash (/) and then Cdpath was not used. If The directory is not found, and the Shell option ' cdable_vars ' are set, then try the word as a variable name.< C14/>if that variable have a value, then CD to the value of the . variable. THE-P option says to use the physical directory structure instead of following symbolic links; the-l option forces Symbolic links to be followed.
Other built-in directives
Alias, BG, bind, break, Builtin, CD, command, Compgen, complete, continue, declare, dirs, disown, Echo, Enable, eval, exec, exit, export, FC, FG, Getopts, hash, help, history , Jobs, kill, let, local, logout, POPD, printf, pushd, pwd, read, ReadOnly, return, set, shift, shopt, source, sus- pend, test, Times, trap, type, typeset, ulimit, umask, una-
Linux common Commands-HELP commands-awarding to Fishing