Linux Learning Path -2017/12/25

Source: Internet
Author: User

Three chapters command wildcard character, PATH variable

Wildcard characters that support multiple literals

Wildcard meaning

* Match 0 or more characters

? Match any single character

[0-9] numbers within the matched range

[ABC] matches any character that has been out

Example:

Supports multiple special character extensions

Character action

\ (backslash) escapes a single character later

"(single quote) to escape all characters

"" (double quote) variable is still in effect

"(anti-quote) EXECUTE command statement

Path variable

Alias, which is used to set the aliases of the command, in the format: "Alias alias = Command" "

Unalias, the alias used to cancel the command, format: "" "" "" "" "Unalias alias"

Example:

commands for viewing $path variables: Echo $PATH

Add a new value to the variable: path= $PATH:/root/bin

Important Environment variables

Env, view important environment variables in Linux systems

Variable is a fixed "variable name" with the user or the system set "variable value" two parts, you can directly modify

Variable name action

Home User's home directory

Which program is the shell's current shell?

Histsize History Command record number of bars

Mail Mail mailbox file

LANG language Data

Random randomly numbered

PS1 Bash prompt

Histfilesize History Command Store quantity

Path directory in the path to find the execution file

Editor default text Editor

Home User Home Directory

Example:

Different user's Homea variable value is not the same,

Suppose you need to set a variable "Workdir", let the user execute "CD $WORKDIR", switch to the/home/workdir directory

What is the reason for switching to another user and discovering that the environment variable is empty?

Cause: This is only a local variable and is valid for the current user only.

Need to use export to promote local variables to global variables, command: Export variable name "= Variable Value"

Question: GAVINW user under CD $WORKDIR failed to go into the/home/workdir directory?

Linux Learning Path -2017/12/25

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.