Shell script automatically backs up Linux systems

Today, write an incremental backup system file using shell scripts, and review the shell script related commands, which can be used to back up different files or folders for full backups and incremental backups, depending on your needs. Directly on

Linux Shell Test

(EXPRESSION)Expression is true expression true! EXPRESSIONExpression is false expression falseExpression1-a EXPRESSION2Both EXPRESSION1 and EXPRESSION2 are true both trueExpression1-o EXPRESSION2Either EXPRESSION1 or EXPRESSION2 is true one of

Shell Common operations

1. Read the value of the Jdbc_url parameter in the configuration file ($InputParamFile the absolute path of the destination file to be read)Jdbc_url= ' grep ' Jdbc_url ' $InputParamFile | Awk-f ' = ' {print $} '2. Modify the value of the

Know bash, the shell.

We communicate the commands we enter with the kernel through the shell so that the kernel can control the hardware to work correctlyBash is our default shell for LinuxUser interface (Shell,application)--------core (Kernel)-------hardware

About the return value of functions in the shell

#!/bin/shsum (){echo $ (($1+$2))return $ (($1-$2))}Sum $c=$ (sum $)echo $?Echo $cExecute command:./bashtest 1The operating result is:12--sum Results10--echo $? result because the value of return is ten12--echo $c result, the value is 12, so C will

8 Shell Command's find

The Find command, like a CD, is often used. But perhaps most of the time as long as the one or two parameters are enough to use. Or, it's a little too much. But when we take the initiative to look at the handbook of Find, we will find that the

Writing shell scripts and executing

This study: Understanding the shell, how to write shell scripts and executeThe shell is actually a program that interprets the execution of commands,The so-called shell programming is to use a certain syntax to combine the various basic commands,

6 Sort,uniq of the shell command

Sort is used for sorting, and the uniq is used to de-weigh, and these two commands are often used together. Mainly because the Uniq to the premise that the text must be arranged in order to be.Of course, it is true that these two commands are indeed

Consistency issues with the Shell's trap

Example 1:[Email protected] example]$ more trapping#!/bin/sh# scriptname:trapping# Script to illustrate the trap command and SignalsTrap ' echo ' ctrl-c would not terminate $. "' 2Trap ' echo ' ctrl-\ would not terminate $. "' 3echo "Enter any

The Linux shell gets millisecond-level timestamps

There is no millisecond unit of time in a Linux shell, and only seconds and nanoseconds are actually sufficient, since the unit range of nanoseconds is (000000000). 999999999), so the nanosecond is also available from nanoseconds to

The Linux shell script traverses all the files in the folder

#!/bin/bashfunction ergodic() { For file in ' ls $' d o                      if [-D $1 $file ] #如果 file exists and is a directory is true                      then                        ergodic $ 1 "/" $file        

Unix Shell Programming Notes series (II)

First, regular expressionPeriod. Matches any single character, such as a. Represents two characters after a match^//Match the beginning of the line, such as ^w, to match the W at the beginning$//matches the end of a line, such as x$, that matches

To interpret variables through shell scripts

Variable assignment, substitution, etc. #!/bin/bash#1. Assigning values to a single variableVariable1=33 #将变量variable1赋值为33Echo ${variable1} # #第一种显示方法为 ${variable1}echo $variable 1 # #第二种显示方法为 $variable 1variable2= "Hello World"

Installation and use of mac-zsh--ultimate shell

Foreword: Zsh can be configured strong, user can customize the configuration, personalization is strong. Zsh Tab Completion is more powerful, this feature allows us to save a lot of time. Zsh also has the code highlighting function, makes the code

Shell Judgments and comparisons

Http://blog.chinaunix.net/uid-7553302-id-183648.html1 Shell's $! , $?, $$,[email protected] $n The first parameter,$2 the second ... $# the number of command-line parameters. The name of the current program.

Linux Shell basic3 dd WC comm chmod ls

Generating files of any size/dev/zerois A character special device, which infinitely returns the zero byte.The above command would create a file called Junk.datathat is exactly 1MB in size. Let ' s goThrough the Parameters:ifstands for–inputfile,

Special usage of shell brackets

The parentheses in the shell have their special usage and are summarized as follows:1. Parentheses after the symbol $${a} The value of variable A to omit curly braces without causing ambiguity.The $ (cmd) command is replaced with the result of the

Execute the system command and write the shell script that writes the output to the log file,

Execute the system command and write the shell script that writes the output to the log file, This is probably the requirement. Run the usysfault command on the aix system to retrieve the fault light information. However, it seems that only the

Linux Shell script introduction Reading Notes Chapter 1 test and test

Linux Shell script introduction Reading Notes Chapter 1 test and testI. Introduction 1. Bash (Bourne Again Shell), which is currently the default shell environment for most GNU/Linux systems. All commands are input and executed in the shell terminal.

Linux-shell test, linux-shell

Linux-shell test, linux-shell Nature of testing: Is an operation command According to $? Return Value to determine whether the condition is true Operation Specifications: Format 1: test Condition expression Format 2: [conditional

Total Pages: 541 1 .... 272 273 274 275 276 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.