MySQL table optimizer Brief:first, the analysis tablesecond, the inspection tablethird, optimize the tableiv. Table Data ImportFive, lock table operationfirst, the analysis table1.1. Command:ANALYZE [No_write_to_binlog | Local]table tbl_name [,
To deny a system user login, you can set its shell to/usr/sbin/nologin or/bin/false# usermod-s/usr/sbin/nologin usernameOr# usermod-s/bin/false username/bin/false/bin/false does nothing but returns an error state and exits immediately. Set the
Reprinted from: http://www.cnblogs.com/sheldonxu/archive/2012/06/25/2560770.htmlIn a shell script, you can get the nth parameter in a $n way, for example, a script named Paramtest:#!/bin/bashecho $The result of executing./paramtest a B is to print
Write shell scripts Common sh test.shThe notation of-M 2-d 3Case script:#!/bin/bashwhile getopts ": a:b:c:" Arg #选项后面的冒号表示该选项需要参数doecho "arg": $arg case $arg in a) echo "a ' s ARG: $OPTARG---$OPTIND "#参数存在 $OPTARG
BASH: Weakly typed languageVariable type:Environment variables, local variables (local variables), positional variables, special variables1. Local variables: Only valid in the current process, parent-child shell is not universalDeclarative method:
Shell
History
TAB key
Alias
Wildcard characters
Redirection function
Shellshell是一个命令解释器,提供用户和机器之间的交互;Shell 是一个用 C 语言编写的程序,它是用户使用 Linux 的桥梁。Shell 既是一种命令语言,又是一种程序设计语言。Shell
#!/bin/bashwhile true; do for i in {100..120};d o ping -c 2 -w 2 192.168.0. $I &>/dev/null if [ $? -eq 0 ];then echo -e "\033[32;40m 192.168.0. $I is up.\033[0m " else echo -e "\033[32;40m 192.168.0. $I is down.\033[0m"
The landlord encountered a scene like this:Execute a script locally, log on to the server, but the login server requires a password to implement the password manually in the scriptThe function of EOF can be achieved by:ssh [Email protected] 192.168.
Linux Shell Program DebuggingThe shell program is debugged by adding relevant debugging options when running the program or by adding related statements to the script, allowing the shell program to display some "debug information" for reference
8.1 Shell introduces a simple point of understanding, is the system with the computer hardware to use intermediate media, it is only a tool of the system. In fact, there is a layer of stuff between the shell and the computer hardware that is the
Description: Adds a user name and password through a script, and discards the add if the user name already existsScript Name: test2.txtCd/optlsmkdir SHELLLSCD SHELLLSVI Test2.txtThe script reads as follows:#!/bin/bashid $ &>/dev/null && echo "User $
Shell script Detailed definitionA "program" written using the shell's function, which is a plain text file, can write some shell syntax and commands (including external commands) in it, with regular expressions, pipe commands, and data flow
A recent need to do a real-time statistical network situation and statistics of the error rate of the script, the following is a stackexchange on the plagiarism, although not fully satisfied, but only can output some information#!/bin/Bashhost=$1if[-
Today the weather is cloudy, a little bored, so boring to play like ...#!/bin/bash#date:2017-6-20#version:1.0#author:xcn ([email protected]) menu () {Cat This article is from the "Little Rookie" blog, please be sure to keep this source
Positional variables
$ $ Gets the file name of the currently executing shell script, including the script path if the script is executed with a path[[Email protected] shell]# sh n.sh n.sh[[email protected] ~]# sh/shell/n.sh/shell/n.sh[[email
& placed after the startup parameter to set this process as a background processBy default, the process is the foreground process, then the shell is occupied, we can not do other operations, for those who do not interact with the process, many times,
Advanced sorting is much faster than simple sorting, the time complexity of simple sorting is O (n^2), and Hill (shell) sorts O (n (logn) ^2), and quick Sort is O (N*logn).Note: The following is an example of a small to large sort of an int
Shell program run:1./xx.sh. Running the shell this way requires the shell program to have executable permissions. chmod a+x xx.sh to add executable permissions.2, Source xx.sh.3. Bash Xx.sh,bash is a script interpreter, which is essentially an
#声明脚本#!/bin/bash#打印 "------CFB---------"echo "------CFB---------"#java环境变量Java_home=/usr/java/jdk1.8.0_11Classpath= $JAVA _home/bin#指定需要执行jar包的位置, you can set your ownJarpath=/home/haha/desktop#环境变量的标准格式Classpath= $CLASSPATH:
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.