Pipe character
| Represents the output of the previous instruction as input to the latter instruction
#cat/etc/passwd|wc-l
Such as
[Email protected] ~]# cat/etc/passwd|wc-l
19
Job Control
#find./-type F View the current = Directory file
#find./-type F |wc-l Print the current number of files
[[email protected] ~]# Find/-type f|wc-l
18
Ctr+z pausing a process in progress
FG Resume Paused Task * *
[Email protected] ~]# vim 1.txt
[1]+ has stopped Vim 1.txt
[Email protected] ~]# vim 2.txt
[2]+ has stopped Vim 2.txt
[[email protected] ~]# FG 1
Vim 1.txt
[[email protected] ~]# FG 2
Vim 2.txt
Jobs view tasks that are paused or running in the background
BG puts suspended tasks in the background
Summary: In Job control
CTL +z Suspend Service
FG Recovery Service
Jobs view tasks that are paused or run in the background
BG puts the suspended task back on the day after tomorrow, the sign is can write the command
Vmstat 1 commands for observing System status
Variable
Env set view system environment variables
Rules for variable names: letters, numbers underline, the first cannot be a number
Such as:
[Email protected] ~]# A_a1=ou
[Email protected] ~]# echo $a _a1
Ou
[[email protected] ~]# a= ' ADF '
[Email protected] ~]# echo $a
Adf
[Email protected] ~]# a=1
[Email protected] ~]# b=2
[Email protected] ~]# echo $a $b
12
environment variable configuration file
Two dimensions: One is the system environment variable under/etc/, and the other is: environment variable under home directory
/etc/profile User Environment variables, interactive, login only execution
/ETC/BASHRC user does not have to log on, execution shell is effective
~/.bashrc
Linux Shell Basics