Use bash scripts in Linux--regularly and automatically back up database important files

1. First write your own bash script, give it executable permissions, the code is as follows:[Git_backup.sh]1#!/bin/Bash2Code_dir="/home/slamgit/code"3Bak_code_dir="/media/ubuntu/kingston/code"4 functionCode_backup () {5 forElementinch`ls$code

Linux Common Commands 2

echo "Hello" >> test.txt append hello to test.txt a > is overwrite two >> is appendecho {0..10}0 1 2 3 4 5 6 7 8 9 10echo {A.. ZA b c d e F g h i j k l m n o p q R S t u v w x y ZEcho stu{0..10}Stu0 stu1 stu2 stu3 stu4 stu5 stu6 stu7 stu8 stu9

Linux Installation and Remote connection

Experimental Purpose: Use VMware Workstation to create new Linux virtual machines and remote connections to virtual machines. Here are the specific operating procedures:First, on the VMware Workstation home page Click Create new virtual machine to

One Linux command per day: Whereis command

svn

The Whereis command can only be used for program name searches, and only binary files (parameter-B), man description file (parameter-m), and source code file (parameter-s) are searched. If the argument is omitted, all information is returned.Whereis

Required Knowledge VI in Linux

The VI command is the most commonly used full-screen plain text editor in Unix operating systems and Linux operating systems.the VI Editor supports edit mode and command mode . Editing mode can complete the editing function of the text, command mode

Linux Install Git

If present, delete the original version:Yum Remove gitTo install the GIT environment:Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-extutils-makemakerDownload git Linux installation on official website:Address:

Linux basic commands

1, how to shut down the command line? (the server generally does not shut down, the virtual machine does not have to shut down, click "Hibernate", keep its running state)Enter shutdown or halt or Poweroff in the terminal2. How to restart the command

Several ways to run Linux---programs in the background

Sometimes it takes a long time to run a program, so it's a bit crazy to get off the clock or when the network is unstable. Today I'm going to share a few of the methods I've used in my work to keep the program running in the background.Nohup$ nohup--

Linux Network Programming Learning (iv) Establishment of the-----Daemon (chapter III)

This article describes a routine daemon_init ()#include #include #include #include #define MAXFD 64void daemon_init (const char *pname, int facility) {int i:pid_t pid;/* Fork, terminates parent process */if (PID = fork ()) exit (0);/* First

Find the Linux file

Find-search for files in a directory hierarchyFind a file tool in the hierarchy directoryGrammar Find [OPTIONS] [Find starting path] [find condition] [processing action] Common options -name name,-iname name: file with Name. Iname

Linux command--test test condition expression

The test command is a tool for testing conditional expressions in the shell for conditional judgments.GrammarTest (option)if [(option)]File test-b Block: True if the file is a block special file;-c Character: True if the file is a character special

Linux Learning notes 13--sed basic usage

Three basic Text Processing tools: grep,sed (Stream editor), awkSed:stream EDitorLine Editor: SEDFull Screen Editor: VISED: Mode spaceBy default, the file itself is not edited, only the data in the pattern space is processed, and then the pattern

Cacti installation under Linux (CENTOS7)

1 Cacti Operating Environment preparationCacti need php+apache+mysql+snmp+rrdtool, as well as cacti itself. Cacti ontology is a Web site developed with PHP that collects remote device information via SNMP. Apache+mysql+php has been done before, the

What is the meaning of variable #,@,0,1,2,*,$$,$ in Linux?

$# 是传给脚本的参数个数$0 is the name of the script itself $1 is the first parameter passed to the shell script $2 is the second parameter passed to the shell script [email protected] is a list of all parameters passed to the script $* is to display all

Tuning process priority for Linux process management commands

The priority range that can be adjusted by the nice value is 100~139, which corresponds to -20~19When the process starts, its nice value defaults to 0, which translates to a priority of 120NiceRun the command with the specified nice valueThe default

Linux basic Commands (ii)

Continue to share with you today (take the previous chapter)(+) Vim + file name (edit file, if the file does not exist also can be edited, but must be saved, the use of vim alone is open vim manual, the same can be editedText, but save it before you

Linux Network Basics (Dry goods)

IpNETMASKGATEWAYHOSTNAMEDNS1DNS2DNS3Dynamic Address:Dhcp:dynamic Host Configuration ProtocolRoutingLinux: The network belongs to the kernelREDHAT5:/etc/modprobe.confAliasREDHAT6:/etc/udev/rules.d/70-persistent-net.rulesEthernet: EthX[Email protected]

In the era of cloud computing, why must you learn Linux?

Cloud computing is no longer a bizarre concept, and its popularity makes Linux operations engineers a more important profession. In today's cloud-based systems, Linux systems are almost undisputed and market share expands.It also gives the Linux OPS

Common use of Linux accelerators

CentosCentOS1、备份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/CentOS 5wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo或者curl -o

Manage Windows Hosts from Linux

Using Powershell Configurations on the Windows Host On the target with Windows system, configure the WinRM server to accept Basic authentication and allow unencrypted traffic .To enable basic Auth, on the Windows in an administrative

Total Pages: 5467 1 .... 2130 2131 2132 2133 2134 .... 5467 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.