24. vi, vim text processor
/Word ,? Word, dd, ndd, yy, nyy, p, P, I, Esc,: q !, : Wq,: set nu
Vim supports Color Display and many program syntaxes, whether C or shell scripts.
The vim setting value is generally stored in the/etc/vimrc file. We recommend that you modify it ~ /. Vimrc File
25./bin/bash, Linux default shell
Command Memory Function ~ /. Bash_history
Command and file completion full-featured tab key
Alias lm = 'LS-al'
Job control (jobs), foreground, and background control
Powerful functions of Shell scripts
Wildcard
26. type [-tpa] name
Displays whether the name is an external command or a bash built-in command.
27. Get and set variables: echo, variable setting rules, unset
# PATH = $ PATH:/home/allen/bin
Environment Variable Function: env
Set command: Except for environment variables, other custom variables and all variables are listed.
Convert custom variables to environment variables: export
Variable keyboard reading, array and Declaration: read, array, declare
Constraints on file systems and programs: ulimit
Command alias and history commands: alias, unalias, history
Login message display data:/etc/issue,/etc/motd
28. System Setting Value
/Etc/sysconfig/i18n
/Etc/profile,/etc/profile. d,/etc/inputrc
/Etc/bashrc
/Etc/profile. d/*. sh
/Etc/man. config
29. Individual price settings
~ /. Bash_profile ,~ /. Bash_login ,~ /. Profile
~ /. Bashrc: the file will be read again every time the shell script is executed.
~ /. Bash_history
~ /. Bash_logout
30. Read/etc/profile first, and then read other additional settings files, such as/etc/profile. d and/etc/inputrc.
Read data from the user's home directory based on different users ~ /. Bash_profile or ~ /. Bash_login or ~ /. Profile and other setting files
According to different users, go to the home directory to read ~ /. Bashrc
Login shell and non-Login shell
31. Data Stream redirection
Standard Input stdin: code 0, use <or <
Standard output stdout: the code is 1, use> or>
Stderr output for standard errors: Code 2, Use 2> or 2>
# Find/home-name testing> list 2> & 1
32. Command Execution judgment basis:;, &, |
# Ls/tmp & touch/tmp/test
Variable $ ?, If there is no error message in the command execution result, $? is returned? = 0. If there is an error, the return value is not 0. With this judgment, we can use & to determine whether the current execution result is correct, and then execute subsequent commands.
# Ls/tmp | touch/tmp/test
| Opposite to &, the current command is executed only when an error occurs |
33. MPS queue ls-al/etc | less
34. SELECT command: cut, grep
# Cut-d 'delimiter'-f fields
# Echo $ PATH | cut-d': '-f5
# Echo $ PATH | cut-d': '-f3, 5
# Grep [-acinv] 'search string 'filename'
# Last | grep 'root'
# Last | grep-v 'root'
# Last | grep 'root' | cut-d'-f1
35. Sorting commands: sort, wc, and uniq
Sort by data type./etc/passwd content is separated by:, and the third column is used for sorting.
# Cat/etc/passwd | sort-t': '-k 3
# Last | cut-d ''-f1 | sort | uniq-c
# Cat/etc/man. config | wc-l
Bidirectional redirection: tee
# Last-l/home | tee home.txt | cut-d'-f1
Author "allenhu0320"