This example is to start or close the remote MySQL database with Java shell script, demand reason: After the game server, in order to save memory consumption, need to shut down the server unnecessary database (a server host has multiple MySQL
MySQL database backup and recovery Brief:One, database backupSecond, database recoveryOne, database backup1, Backup simple description: System operation, incremental backup and overall backupExample: Every Sunday overall backup, Monday to Saturday
The while loop is used to continuously execute a series of commands and to read data from the input file; the command is usually a test condition. The format is:While Commanddostatement (s) to being executed if command is TruedoneThe command
Since the use of Mac after the various configurations, the premise of this article is to use Tmux friends, introduce a god plugin zsh, first of all why use it:
Crtl + Z Displays the PID of the process when the process is suspended, so that
Problem: String output of ' 1,2,3,4,5 ' is used, separated by 1 2 3 4 5Feature: There are no spaces in the stringWorkaround 1:[Plain]View Plaincopy
#!/bin/bash
Var= ' 1,2,3,4,5 '
var=${var//,/} #这里是将var中的, replace with a space
First name the shell command as a. sh fileSave the above code as test.sh and CD to the appropriate directory:chmod +x./test.sh #使脚本具有执行权限./test.sh #执行脚本If an error/bin/bash^m:bad interpreter:no such file or directoryOne of the reasons for the
Download the following log and copy and paste it into your Linux, and then perform a statistical analysis:650) this.width=650; "src=" http://www.apelearn.com/bbs/static/image/filetype/unknown.gif "border=" 0 "class=" VM " Style=
Hardware Chapter
CPU-related
Lscpu #查看的是cpu的统计信息. Cat/proc/cpuinfo #查看CPU信息详细信息, such as the model of each CPU, frequency, etc.
Memory-related
Free-m #概要查看内存情况 The unit here is
1.shell between the operating system and the user. Responsible for interpreting the command line2./etc/shells Record login system effectively supports Shell3./ETC/PASSWD Finally, someone who can see the user's default shell4. Directly enter the name
As Linux small white, only learn a little bit to remember:When deploying a server, it is often necessary to view the console output as if it were local, to be able to view log output overrides on Linux, and, of course, to have the logs displayed in
Linux shell commandWhat is a shell?The Shell is the interface that connects the operating system kernel to the user.The terminal is the representation of the shell.the kernel version of Linux consists of three parts: the main version . Minor version
-mtime 0 represents files that are currently 0 days away from the file modification time, which is less than 1 days (24 hours) away from the current time.-mtime 1 is a file that is currently 1 days away from the file modification time, which is 1
Local variables in shell scripts define functions in the shell to make the code modular and easy to reuse code. But the scope of the variables and functions of the script itself can be confusing, and here's a look at the problem. (1)The variables
Thinking: (1) get "." The I node number, called N (using stat)(2) ChDir. (using ChDir)(3) Find the node with inode number n and get its file name.Repeat the above operation until the current folder "." The inode value equals "..." The Inode
Structure of this article: Bash shell Introduction--variables and variable operations, array-->bash Environment profile analysis
What is a shell:
Operating system is a set of software to control the entire hardware and management
The mountain is the essence of the package insert sort sort. This method is also known as a narrow incremental sort because of DL. Shell to 1959 named.The basic idea of this method is to first cut the whole sequence of elements into several
Installing Redis Services and PHP Redis extensions One, redis related file downloadSecond, Redis installation iii. Phpredis expansion and installation I. Downloads of documents related to this document1, Redis:http://redis.io/download2. PHP redis
Shell script checks the memcache process and automatically restartsRevised version:#! /Bin/sh# Check memcache process and restart if downMm_bin = "/usr/local/bin/memcached"Mm_log = "/home/xxx/memcached_check.log"Mm_ports = ("11211" "11212 ")Mm_param
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