[Email protected] wyb]#CatTest10.SH #!/bin/bash# using the For loop/test10 directory 10 HTML files are created in bulk by random lowercase 10 letters plus a fixed string Oldboydir=/root/wyb/test10/[ ! -D $dir] &&mkdir-P $dir forIinch`seq Ten` Do
Idea: Upload a "backdoor", through the control back door to get the shell, such as a word Trojan. Like what://Submit via request, execute ShellPHP A word trojan, directly on the chopperThis constructs the following statement:1 ' and 1=2 Union select
Transferred from: http://blog.csdn.net/w_ww_w/article/details/7075867Eval can read a series of parameters and then execute them according to the characteristics of the parameters themselves. Eval is a shell built-in command that can be used by the
Distribution system: Used for multiple server code or software simultaneous distribution of execution1.install–y Expect installation expect program for automatic login to remote server2. Write Automatic Login ScriptVim Hu.expect#! /usr/bin/expectSet
Ctrl + A: Moves to the beginning of the currently edited command,Ctrl + E: Moves to the end of the currently edited command line,Ctrl + F or->: move by word aligns (toward the end of the command line, forward)Ctrl + B or Alt + F: Move right by word (
In peacetime, we sometimes encounter the need to change the server administrator password, if the server is more, we can write a script to achieve, save time and effort.Linux uses SSH login need to manually enter Yes to confirm the connection, so
The shell script obtains a method for each CPU usage of the host.#!/bin/Bashinterval=3Cpu_num=`Cat/proc/Stat|grepcpu[0-9] -C ' Start_idle=() Start_total=() cpu_rate=() Cpu_rate_file=./`hostname' _cpu_rate.csvif[-F ${cpu_rate_file}]; Then
General work to deploy a new server, deployment completed also add Zabbix monitoring, so install Zabbix client is very frequent, I wrote here a simple automatic installation script, not very perfect, but also can be used in peacetime.The script may
I believe that the students running on the path of the script, can feel that the script needs to apply variables in a very wide area, simply to see the variable is simply: var=value; if we go deep into it, we can also find that the knowledge of
1. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]Cat ~/.BASHRC #查看 ~/.BASHRC#. BASHRC# User specific aliases and functions# Source Global Definitionsif [-F/
I. Description of the Catalogue1.1 Bin General user, executable system built-in commands1.2 Sbin system administrator, executable system built-in commands1.3 Boot boot file directory, start the relevant files are saved in this1.4 Dev Device
Introduction to Shells and scripts
The Gnu/linux Shell is an interactive tool that provides users with the means to start programs, manage files on file systems, and manage processes running on Linux systems.
At the heart of the
Managing Shell JobsWhen moving jobs between the foreground and background, it could be useful to a overview of all current jobs. To get such a overview, use the jobs command. As can see in Table 9.2, this command gives an overview of all jobs
Single-branch if statement:
If condition test actionThenCommand SequenceFi
Example: Determine if the mount point directory exists, or create a new directory if it does not exist.
[email protected] script]# cat chkmountdir.sh#!
The operation of a numeric variable:
The numerical operation of the shell variable is mostly used in the process control of the script, in the shell environment, only a simple integer operation, does not support the fractional operation,
The difference and relation between the inverted quotation mark "" "and the $ ()' $ ' (parameter substitution) and ' ' (Command substitution)The use of the anti-quote "'" and $ () is the same. When executing a command, the statement in the ", or $ ()
Shell-6.shell Read commandRead--Reads the information from the keyboard or file and assigns it to a variable1. Read variable nameInstance[email protected] home]# cat name.sh#!/bin/shEcho-n "Please input your name:"Read nameecho "Name is ${name}"Show
Using the WC command to count the file lines, the number of words, the number of characters, using sort sorting and de-weight, combined with uniq can be the word frequency statistics.Cat File.txtsort hello.c | uniq-c | Sort-nr |head-5Use cat
DNS Cluster ( multiple servers synchronize one primary DNS information, easing the pressure on the primary DNS )Configure the secondary DNF server (so that it can synchronize primary DNS, sharing the pressure of the primary DNS :)Modifying a
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