This article describes the most commonly used tools for using shell to process text under Linux:Find, grep, Xargs, Sort, uniq, tr, cut, paste, WC, sed, awk;The examples and parameters provided are the most common and practical;The principle I use
Site was DDoS attack, so wrote a foot to resist, to achieve the way:
1. Attack characteristics, different IP constantly post Web page, resulting in excessive resource consumption2. Analyze Nginx Access log, Judge post feature to obtain Client
Test Condition Expression Description
File symbols:
[Root@lamp test]# Help testtest:test [expr]Evaluate conditional expression.Exits with a status of 0 (True) or 1 (false) depending onThe evaluation of EXPR. Expressions May is unary or binary.
A signal is a interprocess communication mechanism that provides an application with an asynchronous software interrupt that gives the application the opportunity to accept commands (i.e., signals) sent by other programs live terminals. After the
Locate allows users to quickly search the file system for specific files. The approach is to create a database that includes all the file names and paths in the system, and then simply query the database when looking, without actually going into the
In a Linux system, when you enter a command, and then press two times the TAB key, all available commands that begin with the characters you enter are listed. It's not new, maybe you already know. This feature is called the command line complement
I accidentally found a very interesting book of Shell programming, E, content is 101 shell case, stick to tomorrow to read a, write a little experience. The following is an example 001:
#!/bin/sh # inpath-verifies That's a specified program
Monitor hardware Health
Shell monitor Cpu,memory,load average, log to log, when load pressure, email notify admin.Principle:1. Get the value of the Cpu,memory,load average2. Determine whether the value exceeds the scope of the customization, for
> and when it comes to I/O redirection, let's get to know file descriptor (FD) first. The operation of the program, in most cases, is the processing of data (data), which is read from where? And where to send it? This is the function of file
Remove software
To remove the software is very simple, just execute the following command:
Copy Code code as follows:
# rpm–e Xanim
At this point, the user should be careful to use the name of the software Xanim, rather
Previously used Ubuntu, the installation of uninstall software is basically using apt-get this very simple, and the process of software dependencies will automatically help us deal with, similar to the fool-like installation. In addition, in the
A start to build the Chinese blog Alliance, both bloggers remind me to do Web site Daquan maintenance of this kind of website is very troublesome, need a lot of energy to debug some of the aborted site, but also to take the blog Encyclopedia of Pine
Standard input/output and redirection, Linux distribution Fedora Core Linux, and Red Hat's original Red Hat Linux development team will continue to participate in the development of this release.
standard input and output
We know that executing a
Shell string comparisons, judging whether it's a number
Binary comparison operators, comparing variables or comparing numbers. Notice the difference between the number and the string.
Integer Comparisons
-eq equals, such as: if ["$a"-eq
One, array, and associative arrays
An array is an important part of a shell script that stores separate, independent data as a collection by means of an index. A normal array can only use integers as an array index, and associative arrays not only
First, Shell introduction
The design of many Unix-like operating systems is stunning. Even today, the UNIX-style operating system architecture remains one of the best designs ever. One of the most important features of this architecture is the
AWK offers the most powerful features:
Can be matched for regular expressions
Style mount
Flow control
Mathematical operators
Process Control Statements
Built-in variables and functions
You can think of awk as a complete
SQL Manual Injection1. Read the file "Load_file function"' Union SELECT NULL,load_file('/etc/passwd ')--+Burpsuite2. Writing Files' Union select NULL,' " into DumpFile"/var/www/a.php "--+" write a trojan; into D Umpling:mysql function, the input is
The main purpose of the script is to practice capturing signals in a Linux bash script, by practicing the use of functions, and by terminating a running program, subsequent processing of files opened by the program, and so on!Scripting Features:Ping
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.