Write automated, fully-prepared shell scripts based on mysqldumpOn-line MySQL database backup is divided into full standby and add-on, while Xtrabackup backup already supports incremental backup, but mysqldump does not support incremental backup, so
Add the following code to the ~/.bash_profile, if none of the files can be created by yourself: Java code
VI ~/.bash_profile
#加入
#export ps1=' [[email protected] w]$ '
Uppercase W represents the last path, and lowercase w for
1, in any folder, create a new 10 empty files, the file name is T1.txt-t10.txt, the file content is 11-20, on a line, and then the 10 files named as t1.sh-t10.sh.Old driver Version:$ for ((i=1;i> "T" ${i}.txt; Done #创建加写入$ for fie in ' ls *txt ';d o
Logical judgment in the shellFormat 1:if condition; Then statement; FiIf it's what it is, then what happens?Write a simple script that means when a=5, when a is greater than 3 o'clock print OK#!/bin/bashA=5If [$a-GT 3]ThenEcho OKFiExecute script
21.1 Why to learn shell programming(1) Linux OPS engineers need to write shell programs for server management when managing server clusters.(2) for Java EE and Python programmers, the need for work, your old assembly requires you to write some shell
awk IntroductionReport Generator, formatted text outputThe processing mechanism is similar to the SED command, which comes with loop processing, reads a line and then automatically reads the next line to processThe identity of the SED command
Shell IntroductionThe shell is a command interpreter that provides interaction between the user and the machineFor example, we have remote login tool, it is actually a shellThe CentOS default shell is bash (Bourne Agin Shell)·Command historyHistory
Shell Color and Flicker control
Sometimes custom output is required under the shell, such as adding color to the output, highlighting it, or adding flicker.Then these color codes or control codes are relatively bad to remember. At this
Once the backup SQL file is generated in auto-package, monitor the operation!#Crontab Time # variablesfile_dir=/data/mysql_bak/ #备份存放路径DATE = ' Date +%y_%m_%d ' #获取当前系统时间FILE_NAME = " Mysqldata_bak_$date.tar.gz "#最终保存的数据库备份文件名FILE =${file_dir}
Introduction to the Shellzsh, ksh (yum list |grep zsh to be viewed and then installed accordingly )Command history1./root/.bash_history (this file holds the command we've knocked on)2. History (You can see how many of the commands we've used before.
#!/bin/bashEcho ' $ "gets the currently executing shell script file name: '" $ "Echo ' $n gets the nth parameter value of the currently executing shell script, n=1..9 ' $ ' =$1, ' $ $ ' =$2, ' $ $ ' =$3Echo ' $get all parameters for the current
Programming is the process of writing program source code using human natural language or machine language. This is what we all know, because it, after all, has programmed what student performance management system, library management system. Wait a
One, monitoring server system load situation:1, use the uptime command to view the current load situation (1 minutes, 5 minutes, 15 minutes average load situation)# uptime15:43:59 up 186 days, 20:04, 1 user, load average:0.01, 0.02, 0.00Rule of
Pipe symbol, UNIX is a very powerful feature, the symbol is a vertical line: "|".Usage: Command 1 | Command 2 His function is to pass the result of the first command 1 execution as input of the Command2 to command 2, for example: $ls-S|SORT-NR (Note
#!/bin/bash (fixed start)# Comments (in script)Cat 1.sh Viewing scripts1. Execute the Script1) Execute permissions for script firstchmod 744 1.sh or chmod +x 1.sh2) execution . /1. SH (./current path)2. Give permission to run directlychmod a+x
1. Reasons:My own ESXi server recently added a lot of virtual hosts, but I'm not installing, using, the kind of batch OPS (Saltstack,ansible,puppet, etc.). Although there is another way: to open several windows at a time through the shell tool, and
Article Source: http://www.jb51.net/article/53924.htmThis article mainly introduces the 4 methods of executing shell scripts in Linux, that is, 4 ways to run shell scripts in Linux, and the friends you need can refer to the followingThere are
Shell programming-detailed introduction to sed commands, shellsed detailed introduction
Sed Introduction
Sed editor is called Stream editor. It is used to perform basic text conversion in an input stream (file or input from a pipeline. During
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service