Linux Fundamentals review-3

Source: Internet
Author: User

1. File path

The path of the file in Linux is implemented with shell settings, the path is set by a variable path in advance, when the user enters the command, the shell will read the contents of path from left to right, and under the current path, find out if there is an executable file with the same command as the input

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8D/0D/wKiom1iDcgOhgyskAAALZFAqQP4654.png "title=" capture. PNG "alt=" Wkiom1idcgohgyskaaalzfaqqp4654.png "/>

If it is not found under this path, you will be prompted

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8D/0A/wKioL1iDcmjwk7cvAAAE_5cNztA899.png "title=" 1.PNG " alt= "Wkiol1idcmjwk7cvaaae_5cnzta899.png"/>

Of course there will always be, if it does not exist, you can add the path into path, added to the configuration file/ETC/BASHRC or ~/ETC/BASHRC the last line. The former is valid for the system shell, which is only valid for the individual shell, and does not take effect immediately after being added, and must be reread by the shell to take effect, either by re-logging in the account or by executing commands

# SOURCE/ETC/BASHRC (which is the source of the change)


2, Help information related to supplement

Last mention, how to get help, but didn't say help how to read the Help file.

General help file inside there are a lot of content, useful mainly is the following several

Names of name commands, including full name

The syntax of the Synopsis command, which is the usage, will be listed here, but not in detail

A description of the DESCRIPTION command, which will explain in detail under what circumstances it will be used

Options command, which will detail the usage of each parameter

An example of the EXAMPLES command is a combination of the options listed

In addition, when the input #man COMMAND is entered into the Help information interface, there are some keys

Browse Features:

Blank: Flip one screen and shift+pgdn the same

B: Flip one screen and shift+pgup the same

Enter: down one line

K: top-up row

Search function:

Forward search/: Direct input/, will appear at the bottom of the screen: Waiting for you to enter information

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8D/0A/wKioL1iDd5WzqTInAAAZrDzTJPQ790.png "title=" 3.PNG " alt= "Wkiol1idd5wzqtinaaazrdztjpq790.png"/>

For example, I find links, the content highlighted

Reverse search? : and/Like, just search in the opposite direction

3, in the current shell process to find keywords in which paragraphs have the use of help

Whatis KEYWORD

Man-k KEYWORD

The first one for the exact lookup, the second for the Fuzzy lookup


4. Help Information location

Help information are stored in/etc/share/doc, if interested, you can directly open the production to see, these are mastered, learn Linux without any problems!


5, the format of the command

COMMAND OPTIONS ARGUMENTS

Command option Parameters

Commands are commands that are used, such as: Mv,cp,mkdir,useradd,...

The option is followed by the command--

Short Options-: For example, useradd-u, options can have multiple, useradd-u-g,ls-a-l-d, some can merge Ls-ald

Long options-: such as Chkconfig--list,service--list, can not be abbreviated, nor merged

Parameters are the objects that the command acts on, such as Cp/etc/fatab/tmp


6. Export

Export can be applied to all child shells at the same time after the environment variable is changed

such as change language # export Lang=zh

7, Shutdown, restart

Shutdown OPTIONS

-H: Shutdown, can be followed by time, specify the time of the shutdown, but also can be accompanied by the shutdown information

-R: Restart, followed by time, specify the time to restart, and can be accompanied by the shutdown information

Reboot: Restart

Halt: Shut down the machine

8, date display or modify the system time

Date +%f

+%t

+%mmddhhmm[cc]yy.ss

Hwclock Display Hardware Time

If the hwclock is inconsistent with the date time, you can modify

Hwclock

-S: Subject to hardware time

-W: Whichever is the software time

This article is from the "Miss" blog, make sure to keep this source http://mxiansheng.blog.51cto.com/12225663/1893642

Linux Fundamentals review-3

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.