Raspberry Pi_Eng_10.4.3 “man” Command – Get Help on Commands


Published Book on Amazon


All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


10.4.3  "man" Command - Get Help on Commands

 

Most of the commands used in Linux can perform a variety of functions in a single command. In order to correctly execute these various functions provided by a specific command, the command must be input in various formats. Also, the execution result of the command is displayed in various types and various forms. In reality, for each command, we can hardly remember all necessary knowledge about what functions the command can do, and how to instruct the command, and how to understand the outcome of the execution.

So Linux provides detailed help for each command. With the help, users can search various informations that they can not remember when they need it, and solve the problem. The "man" command is used in this case.

 

[Command Format]

man   command  

 

[Command Overview]

   This shows detailed help for the specified command.

   User privilege          -- Normal user.

 

[Detail Description]

Help for a specific command usually contains many explanations over several pages. In order to read these multi-page help, you need to move to the desired position on the screen. Here are some of the ways to move around the screen:

    /xxxx                     -- Search for and display the specified character.

-- Moves sequentially to the searched location with "N" keys

    Page Up/down        -- Move up/down in page unit.

    Arrow Up/down       -- Move up/down in line unit.

    Space                    -- Moves down in page unit.

    Enter                     -- Moves down in line unit.        

 

[Used Example]

Let's check the usage of the simplest "cat" command.

 

pi@raspberrypi ~/testdata $ man cat

 

 

Then the help for the specified command appears on the following screen. The user can move up or down page by page using the [page Up/Down] key. You can also move to the next line by pressing the [space] key or the [Enter] key, or up and down by line using the [arrow Up/Down] keys. If you enter "q" key during execution, the corresponding command is terminated and the screen returns to the desired command input screen.