Ii. Help

Source: Internet
Author: User

Command type: built-in commands (shell built-in)

External commands (there is an executable file corresponding to the command name under a path in the file system)

External command search depends on the PATH variable

View the external command search path and the PATH variable:

[[Email protected] ~] # Echo $ path

/Usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin: /root/bin

(Paths are separated)

Type: displays the type of the specified command.

[[Email protected] ~] # Type Su

Su is/bin/SU (external command)

Which: shows the full path of (Shell) commadns to view the command path

Which [Options] [--] programname [...]

[[Email protected] ~] # Which Su

/Bin/su


Get Command help

1) whatis command

[[Email protected] ~] # Whatis Su
SU (1)-run a shell with substitute user and group IDs

(1) indicates a chapter

2) Help: displays brief summaries of builtin commands

Internal Command: Help Command

External command: Command -- Help

[[Email protected] ~] # Su -- Help
Usage: su [Option]... [-] [user [parameter]...]
Change the valid tive user ID and group ID to that of user.

3) MAN (manual command manual)

Man command

Man is generally divided into eight chapters:

(1) user commands

(2) system call

(3) database call

(4) special files (hardware files)

(5) file format (Configuration File Syntax)

(6) games

(7) Miscellaneous (Miscellaneous)

(8) management commands

Man screen flip:

Flip back: Space

One screen forward: B

Flip One Line Backward: Enter

One row forward: K

Man search:

/Keyword: Search backward

? Keyword: Forward search

N: Next

N: Previous

Q: Exit man.

[[Email protected] ~] # Man Su


SU (1) user commands SU (1)

Name
Su-run a shell with substitute user and group IDs

Synopsis
Su [Option]... [-] [user [Arg]...]

4) online document: info command

5) Documentation:/usr/share/doc



Exercise:

1) whether ECHO is an internal command or an external command

[[Email protected] ~] # Type echo
ECHO is a shell builtin

ECHO is an internal command

2) Role

Echo --- display a line of text

3) The line feed shows "123456. abcdef"

[[Email protected] ~] # Echo-e "123456 \ nabcdef"

123456

Abcdef


Ii. Help

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.