当前位置:网站首页>Shell instruction learning 1
Shell instruction learning 1
2022-04-23 05:37:00 【mg1507】
1、 shell The role of
- Automatic batch system initialization program (update, Software installation , Time zone settings , The security policy …);
- Automated bulk software deployment program ;(LAMP/LNMP/Tomcat/LVS/Nginx);
- Manage applications (KVM、 Cluster management expansion 、MySQL);
- Log analysis handler (PV、UV、200、!200、grep/awk);
- Automated backup recovery procedures (MySQL Full backup / The incremental +Crond)…
2、echo $?
Output return value , If correct, it is 0, Not 0 Represents a mistake .
3、 command 1 && command 2 && Have logical judgment , When ordered 1 If the execution is successful, execute the command 2.
4、 command 1 || command 2 When ordered 1 Execution failure , Order 2 perform .
5、&>
Redirect mixed output , Including standard output and error output .
# Output useless information to /dev/null
&> /dev/null
6、sh Script ,bash xxx.sh perform sh xxx.sh It can also be executed .
7、 If you execute through a path , Need to add permission chmod +x xxx.sh.
8、shell The beginning of the script usually says :#!/usr/bin/bash
Its effect is : Define which interpreter the program uses to execute .
9、 Merge two files cat xx1 >> xx2
,>
Redirect normal information , Redirection is to overwrite the original file ,>>
It is to add .
10、&
Indicates that the task is executed in the background .
版权声明
本文为[mg1507]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230530305350.html
边栏推荐
- Use of ES6 array
- mysql中duplicate key update
- World and personal development
- Strategies to improve Facebook's touch rate and interaction rate | intelligent customer service helps you grasp users' hearts
- Understand the relationship between promise async await
- Wbpack configuring production development environment
- Relative reference and absolute reference of Excel
- Similarities and differences between vector and array (notes)
- Simple and basic use of switch and if
- Strategy for improving the conversion rate of independent stations | recovering abandoned users
猜你喜欢
Flutter 新一代圖形渲染器 Impeller
Intel SGX preliminary learning and understanding notes (continuously updated)
On the use of constant pointer and pointer constant -- exercise (record)
Hongji micro classroom | cyclone RPA's "flexible digital employee" actuator
Nécessité de précharger les cookies dans le sélénium
Sea Level Anomaly 和 Sea Surface Height Anomaly 的区别
弘玑微课堂 | Cyclone RPA之“灵活的数字员工”执行器
Excel 2016 cannot open the file for the first time. Sometimes it is blank and sometimes it is very slow. You have to open it for the second time
橙单微服务之批量导入
Understand the relationship between promise async await
随机推荐
Xiuxian real world and game world
Hongji cyclone RPA provides technical support for Guojin securities and realizes process automation in more than 200 business scenarios
STL function library
Generation of straightening body in 3D slicer
Add two pointers? (legal or illegal)
Log introduction and building web application
[triangle Yang Hui triangle printing odd even cycle JS for break cycle]
Pytorch deep learning practice_ 11 convolutional neural network
Wbpack configuring production development environment
what is wifi6?
The main difference between pointer and reference
Hongji | how does HR carry out self change and organizational change in the digital era?
Ehcache Memcache redis three caches
弘玑Cyclone RPA为国金证券提供技术支撑,超200个业务场景实现流程自动化
Linear sieve method (prime sieve)
Branch and loop statements
C, class library
[no title] Click the classification jump page to display the details
Strategies to improve Facebook's touch rate and interaction rate | intelligent customer service helps you grasp users' hearts
50 SQL exercises, answers and detailed analysis