当前位置:网站首页>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
边栏推荐
- Flutter 新一代圖形渲染器 Impeller
- Use pagoda + Xdebug + vscode to debug code remotely
- Redis in node -- ioredis
- Hongji micro classroom | cyclone RPA's "flexible digital employee" actuator
- The prefix of static of egg can be modified, including boots
- The title bar will be pushed to coincide with the status bar
- Flutter nouvelle génération de rendu graphique Impeller
- shell指令学习1
- acwing854. Floyd finds the shortest path
- Executable program execution process
猜你喜欢
Flutter 新一代图形渲染器 Impeller
Breadth first search topics (BFS)
If I am PM's performance, movie VR ticket purchase display
Deep learning object detection
Branch and loop statements
Necessity of selenium preloading cookies
[untitled] Notepad content writing area
弘玑微课堂 | Cyclone RPA之“灵活的数字员工”执行器
Generation of straightening body in 3D slicer
Basic knowledge of redis
随机推荐
Fletter next generation graphics renderer impaller
Linear sieve method (prime sieve)
CMake基础教程(39)pkgconfig
refused connection
Deep learning object detection
Double click The jar package cannot run the solution
五一劳动节期间什么理财产品会有收益?
字符识别easyocr
Relative reference and absolute reference of Excel
d. TS --- for more detailed knowledge, please refer to the introduction on the official website (chapter of declaration document)
QSS, qdateedit, qcalendarwidget custom settings
Uncle wolf is looking for a translator -- Plato -- ongoing translation
Escape characters \ splicing of data formats
If I am PM's performance, movie VR ticket purchase display
Knowledge of egg testing -- mock, Supertest, coffee
Qwebsocket communication
OSI层常用协议
[machine learning] scikit learn introduction
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
Sea Level Anomaly 和 Sea Surface Height Anomaly 的区别