Super simple Linux website backup script Shell

#! /Bin/bash# Shell command for backup MySQL database everyday automatically by crontab# Author: linsong# Date: 2011-10-11Service mysqld stopFiledate = 'date + % Y % m % d'Mkdir-P/home/backup/$ filedateTar-zcvf/home/backup/$

Shell greedy match

Sometimes, you can extract only a part of a text segment by using shell's greedy match. % is a match from the right to the left, and # Is a match from the left to the right, as shown in the following example: [Root @ WWW ~] #Qq = www.qq.com

Linux Shell array creation and usage tips

Linux Shell is much more powerful than Windows batch processing in programming, whether in loops or operations. Data Types cannot be compared. The following is a summary of some operations on the array when I am using it.   1. array

Wscript. Shell object details !! (3)

; Strmydesktop = wshshell. specialfolders ("desktop ") 'List all special foldersFor each strfolder in wshshell. specialfoldersMsgbox strfolderNext SeeWshshell. specialfolders attributes Wshshell. createshortcutThe createshortcut method creates a

Wscript. Shell object details !!

Wshshell object Progid wscript. Shell File Name wshom. ocx CLSID F935DC22-1CF0-11d0-ADB9-00C04FD58A0B IID F935DC21-1CF0-11d0-ADB9-00C04FD58A0B The following table describes the properties related to the wshshell object. Attribute

Evaluate the expression value in Shell

Alas, I didn't learn shell, and my colleagues encountered a problem. I asked my classmates if it was necessary to learn it. It wasn't complicated, but the syntax was too strange and I really didn't understand it. I wrote a simple script. #!

Shell basic knowledge 2

Conditional expression: 1. File expression # If the file exists if [-f file] # if the directory exists if [-d dir] # if the file exists and is not empty if [-s file] # if the file exists and is readable if [-r file] # if the file exists, you can

Shell basics 4

Functions in shell are similar to methods in Java. script code is placed in the function and can be run anywhere to reduce a large amount of repeated code. Understanding Shell functions involves the following aspects: function creation, function

Classic Shell 3.6.8 Chinese Version

Classic shell is a tool used to optimize Windows 7 and 8 user interfaces. The motivation for the software development was to be dissatisfied with Windows 7's removal of the classic "start" menu. As a result, he developed his own program to replace

DNS, Shanghai peanut shell DNS resolution error, had to use another.

Beijing 10.2.1.38 202.106.196.115 202.106.0.20 Shanghai 10.95.0.3 202.96.199.20.202.96.0.20. Tianjin 10.10.64.68 202.99.96.68 Guangdong 202.96.128.68 202.96.128.110 Henan 10.68.160.3 10.68.32.3 202.102.227.68 202.102.245.12 Guangxi 10.137.128.40 202

How to obtain data from shell pipelines in different languages

Shell: #! /Bin/bash #=============================================== ====================================## this example show you how to get data from pipe #====== ========================================================== =============== while

Shell comparison operator

Operator Description Example File comparison operator -EFilename IfFilenameYes, true [-E/var/log/syslog] -DFilename IfFilenameIs a directory, it is true [-D/tmp/mydir] -FFilename IfFilenameIs

Symbol explanation for shell output input stream

> Append > Overwrite > & Set the previous storage location to the next storage location P.S.: Of course, there is still an inverse 0 standard input 1 standard output 2 standard errors   Example:   ls /usr/tmp 2> err.file Write the error generated

Shell script learning notes (6)-redirection and traps

Redirection   File Code: 0, 1, 2 ,... output Most of the conversion semantics cannot be used independently and must be used together with the Bash command.   Operation file: Fd <> FileFd file code, available for reading and writing Fd Close input

Shell script learning notes (5)-Functions

Function Bash does not enable a new sub-shell to call a function. It is executed in the existing shell environment. Syntax: Function Name (){Command Area}Function Name (){Command Area}Function Name{Command Area} Call: function name parameter 1

Linux/Unix Shell shortcut keys)

Sometimes, we need to repeat the previous commands in Bash. Of course, you can use the up arrow key to view commands that have been run before, but this article introduces some better ways, such !!,! A ,! Number ,! -Number ,! $, Ctrl + r, and other

Shell basics-powerful regular grep in Linux Shell

Linux ShellStrong Regular ExpressionsGrep Linux grep commandUse 'grep' to search for text filesIf you want to find a string in several text files, you can use the 'grep' command. 'Grep' searches for the specified string in the text.Suppose you are

Shell basics-What is Shell

What isShell Shell is a program with special functions. It is an interface between the user and the core program (kernel) of the UNIX/Linux operating system. Why do we say shell is an intermediary between the core program of the system and the user?

Shell programming-Description

I. Shell VariablesIt mainly includes local variables and environment variables. 1. Local variable -- Used in the script currently running by the user1)Define local variablesFormat: variable-name = valueExample: [root @ jike1/root] # LOCALTEST =

Scheduled shell script execution in linux

In oracle, you can use the dbms_job package to regularly execute pl/SQL and SQL processes. crontab can only be used for scheduled tasks at the operating system level, such as backup. This article describes the specific usage of crontab for memo. In

Total Pages: 541 1 .... 503 504 505 506 507 .... 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.