Linux programming help

Source: Internet
Author: User

If you want to program one side in Linux, you must master the skills, that is, view help.

Maybe you are used to Google or Baidu for help, but use the following method to get information faster and learn more systematically.

There are two methods to view the help of a command:

  • Command + -- Help
  • MAN + command

These two methods generally have one form of commands, some of which both have the same output and will tell you how to use the commands and the options supported by the commands, for example:

g++ --helpman g++

The first sentence in the Command g ++ -- help output is: Usage: G ++ [Options] file... this is the usage of this command. g ++ is connected to options and then to the file. The brackets mean that the options are optional. You can leave them blank, you can also give any number of options. What are the specific options of G ++? The previous blog introduced a few items, and the rest of them opened the window of the black hole and entered the command. There are too many posts.

The man G ++ output has its own format, but it is similar. Try it on your own. The following describes the differences between the two commands.

Command + -- Help

This help is provided by the command and written in the code when the author writes the command. -- help is an option to call the command. If the author of the implementation command does not provide this option, you cannot view the help in this way. However, most commands are supported.

MAN + command

This man is the abbreviation of manual (manual). It is itself a command. You can also regard it as a man. If you have any command that you don't understand, ask this kind of friend. You can also use man -- help or man to view help information about this friend.

Man explained to himself that an interface to the on-line reference manuals is an interface used to view online manuals, in fact, many Command help files are saved locally. But it doesn't matter. The important thing is that the Help file is separated from the command. The author of the Help file and command can not be a person. Therefore, in theory, you can write a ls help file, but the content is indeed the help of G ++...

Since man is an interface, it means that the format of the Help file is required. Therefore, all man-displayed help files will have descriptions such as name, synopsis, description, and so on. If you want to write a man page, you also need to comply with its requirements.

Generally, commands can be used to help you understand either of them. Some commands are only helpful and can be easily read.

Finally, let's take a look at some of the commands mentioned earlier or the help of the commands we know. Practice makes perfect :)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.