Automatic backup of the entire database
Implement a library to back up a file
Implement exclude libraries that do not require backup
Implementing Backup to Compressed files
Implementing a backup file that defines how many days
Shell: 1, local variables: variables available only in the current shell, 2, Environment variables: variables available for the current Shell's child processes 3, Shell variables: some shell Set the special variables, such as: $ $, $ ... These
Shell Basics1. What is a shellShell is a program developed by C language he is a bridge for users to use Linuxis both a command languageAn application This application provides an interface through which users access the operating system kernel's
Different shells have different functions, the shell also decided that the default shell in Linux is/bin/bash, the popular shell has ash, bash, Ksh, CSH, zsh, and so on, different shells have their own characteristics and use.BashThe Shell,bash
Click Back to learn the path of the Linux command line and shell script5.1-shell Parent-child relationship1 common types of shells
Bash is the Linux standard default Shell, which is an abbreviation for the Bunrneagain shell, with a total of
1. ${ }A more precise range of defined variable names is used for variable substitutionFor example:A=bEcho $ABOriginally intended to replace the result of a $ A and then a B-letter followed, but on the command line, the real result is only replace
1 What shell?Shell is a scripting languageYou can use logical judgments, loops, and other syntaxFunctions can be custom-definedThe shell is a collection of system commandsShell scripts enable automated operations, which can greatly increase our
1. basic usage of shell variables and usage of common symbolsThis section requires writing out the shell commands that implement the requirements, showing(1) Change the main prompt to the user's home directory name(2) Assign the string DOS file c:>\
---restore content starts---The calculation of the shell is actually already in contact with Linux. Every time in the use of the Internet is looking everywhere, so think to spend some time to study.First understand the following commonly used
The shell has a shell meaning, which provides the platform for the user to interact with the kernel, and the kernel then implements the functionality through the underlying system call. Features of the Linux shell:1. Shortcut: Ctrl + A (ahead) move
Find./-mtime 18-exec ls-l {} \;Special places in this example are {} and \; And the-exec keyword, the meaning of these things:
{} stands for "content found by find" and, as shown, the result of find is placed in the {} position;
-exec
SHELL:An interface program that completes the interactive operation between the user and the operating system, providing the user with simplified operation;In the middle of the 70 's, Bell Lab, Bourne;bourne Shell, abbreviated Sh;bill JOY:C Shell,
DownloadPlease download it to https://github.com/mbadolato/iTerm2-Color-Schemes.git clone https://github.com/mbadolato/iTerm2-Color-Schemes.gitInstallationTo install:
Launch ITerm 2. Get the latest version at iterm2.com
Type cmd+i (? +i)
1. Position variable(1) $ ==> Take file name[email protected] ~]# cat test.shEcho[Email protected] ~]# sh test.shtest.sh[Email protected] ~]# sh ~/test.sh/root/test.shDescription: When executing a script, the script name is preceded by a path to the
CTRL + A: Adjust the cursor to the beginningCtrl+e: Adjust cursor to endCtrl+u: Delete the command before the cursorCtrl+k: Delete the command after the cursorCtrl+r: Search A History list for a command "search for a History"Ctrl+l: Clear ScreenCTRL
The shell script shell is a non-type interpreted language, which is defined when assigning a value to a variable.#!/bin/bash //环境说明- chmod o+x 文件名 //命令行运行
/bin/bash file name//Ibid. function
$ variable name//reference variable
$//The name
Case requirementsBatch build Linux users with shell scriptsImplementation requirements: Create user student1 to Student50, specify Group as student group! And each user needs to set a different password!Implementing scripts#!/bin/bashgrep ‘student‘ /
declaring functionsDemofun () { echo" This is my first shell function! " }Function name () {... function body}In the shell, arguments can be passed to a function when it is called. Inside the function body, the value of the parameter is obtained
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