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