Shell implementation automatically backs up the entire database, one library backs up a file

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 Process Control Statements

I. The existence and judgment of documents-D to determine if the file exists and whether it is a directory file (the directory is true)-E to determine if the file exists (exists as true)-F to determine if the file exists and is a normal file (the

linux-Shell core and shell relationship

linux-Shell core and shell relationshipThe kernel is in the shell, interacting with the shell (command line) through the shell#####################################################################################################Shell Viewwhich $SHELL/

Shell Programming (2)

Experiment FourBasic usage of 1.shell variables and usage of common symbols(1) Change the main prompt to the user's home directory name(2) Assign the string dos file c:> $student * to the variable x and display it(3) In the shell command Terminal

Shell determines memory usage alarm

#!/usr/bin/bash#########################################memory used#v1.0 by LIXIN 20180605########################################Mem_used=free -m |grep ‘^Mem‘ |awk ‘{print $3}‘mem=free -m |grep ‘Mem‘ |awk ‘{print $2}‘mem_usage=$

Linux Shell shortcut keys

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

Some comparison tests in the shell condition

1> file Comparison:-d filename checks if filename exists and is a directory-e filename checks if filename exists-F filename checks if filename exists and is a file-r filename checks if filename exists and is readable-s filename Check if filenmae

008-shell Process Control

First, if else1.1, ifIf statement syntax format:if condition Then command1 command2 ... fiWrite a line (for the terminal command prompt):if [$ (PSgrep"ssh"1thenecho" True"fiAt the end of the fi is if the upside-down spelling, and later

Shell Programming (Functions)

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

Shell script for regular cleanup of log files by "Shell combat"

Function Description: Cleans the Messages history log file (Messages-date) under the/var/log/path, but does not clean the messages file itselfDependency requirements: The BC module is installed on the server1 #clean_logs.sh2 #!/bin/bash3 4 # ========

Shell Four Swordsman Primer

First,ShellFour The Swordsman (grep)grep fetch rowsRegular Expressions: [0-9] denotes character match 0-9{1,3} indicates that the number of matching characters is less than 3. Example one: [email protected]

The shell command provided by Hadoop accomplishes the same task

Create a TXT file in the "/home/hadoop/" directory of your local Linux file system, where you can enter some words.mkdir hadoopcd Hadooptouch Test.txtgedit test.txt To view the file location locally (LS)Ls-al Displaying the contents of a file

Shell Project-Alarm system

Requirements: Use the shell to customize a variety of personalized alarm tools, but the need for unified management, standardized management.Idea: Specify a script package that contains the main program, subroutine, configuration file, mail engine,

Experimental three shell programming (1)

One, Shell command application exercises1. Describe the purpose of the following documents①/etc/passwdpasswd is a password file that is used to manage the user's password. Ordinary users can usually only modify their own password

Shell Script Basics (iv)

I. Functions in the shellThe function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call the name of the small unit directly.1. function formatfunction f_name() { command}The

Shell script detects if the network is unblocked

When the shell initializes the installation script, it is necessary to install some RPM packages from the network, all of which need to detect the smoothness of the network first.Code#检测网络链接 &&FTP upload Datafunctionnetworkandftp () {#超时时间 timeout=5#

Shell Script Basics (i)

First, Shell script introduction The shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language. The shell is a scripting language; Can use logic

Daily Shell Exercises (03)

1. ExercisesWrite a script that calculates the size of all processes in the Linux system and2. Exercise Analysis 2.1. First question, where to collect data for a processUse top or PS to get the memory usage size of each process. Once the size is

Shell+ nailing robot to complete the Java program after the interrupt self-start and real-time monitoring

Java real-time program in the process of occasional abnormal information interruption in the case, through the shell script to complete the self-boot.The following is a shell script that monitors a real-time Java program.Determine if the program is

Linux Shell Programming (v): arrays

ArrayAn array is an ordered sequence of elements. If a collection of variables of the same type is named, the name is an array name. Each variable that makes up an array is called the component of an array, also known as an element of an array,

Total Pages: 541 1 .... 370 371 372 373 374 .... 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.