Linux shell script Analysis Nginx log anti-small DDoS attack

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

Using Shell to monitor memory usage scripts in Linux

In order to more easily know the memory usage on the server, and according to the memory use size to restart the service, I only the whole fault alarm, if you want to automatically restart the service, we will have to modify their own. Script

Linux shell txt convert to HTML implementation code _linux shell

Principle: awk command, split formatted TXT (TXT file format with "|") divided) into groups, then spliced into HTML format (html-head-title-body-table) Shell Source #!/bin/sh file_input= ' txt.log ' file_output= ' txt2html.html ' td_str= '

Discussion on the details of IO and condition and cyclic processing in Linux shell programming _linux Shell

> 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

Shell script implements batch generation Nagios configuration file _linux Shell

If you manage more sites and servers, every time you modify a configuration file, it's pretty painful. The idea is to use a shell script to generate bulk configuration files and configuration data. The following script is a shell script for batch

Linux RPM Package Installation Query uninstall command Summary and Yum command detailed _linux Shell

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

Linux Shell Custom Function (definition, return value, variable scope) Introduction _linux shell

The Linux shell can be user-defined, and can be invoked randomly in a shell script. Here's how it's defined, and what the call needs to pay attention to. First, define the shell function (define functions) Grammar: [Function] funname [()]

Putty method of implementing automatic login (SSH and SSH2) _linux shell

1, login to the host and enter ssh-keygen-t RSA Prompt for enter file in which to save the key (/ROOT/.SSH/ID_RSA): Input/root/.ssh/sea_rsa Enter the relevant pathname and filename as prompted and generate two files (followed by two options to

Linux Shell Script Tutorial Series (i): Shell Primer _linux Shell

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

3 ways to judge variables as numbers in a shell script _linux shell

Method 1: Add a variable to an integer value by using expr, or an integer if it is performed correctly, or an error is executed, $? will be a value that is non 0 Copy Code code as follows: Expr $args + 0 &>/dev/null Method 2

Shell script gets the local network card IP, MAC address, subnet mask, DNS IP, extranet ip_linux shell

#/usr/bin/env Bash # Name:get_network_info.sh # author:purple_grape # This was a script to gather network inf Ormation of your Linux system. # Test under Ubuntu 10.04 only. #---------------------------- nic=eth0 mac= ' lang=c ifconfig $NIC | awk '/

Linux BASH Shell set font and background color _linux shell

BASH shell set font and background color Echo-e "\e[31mtest\e[41m" \e[30m change the display color of a character to black \e[31m change the display color of a character to red \e[32m change the display color of a character to green \e[33m change

Shell to take today, yesterday, day before yesterday's time operation code _linux shell

1. Take today's time Copy Code code as follows: $date-D "Now" +%y-%m-%d 2. Take yesterday time Copy Code code as follows: $date-D "Yesterday" +%y-%m-%d $date-D "1 days ago" +%y-%m-%d # # D,--date=string

Write a summary of some tips for robust bash shell scripts _linux shell

Many people use shell scripts to accomplish simple tasks and become part of their lives. Unfortunately, shell scripts can have a very large impact when they run an exception. It is necessary to minimize this type of problem when writing scripts. In

Summary of 7 shell string manipulation methods and instances sharing _linux shell

Each language has his own string manipulation method, the shell is the same, the following in an example of the way, a simple introduction of common methods. 1, get string length Copy Code code as follows:

Shell Programming Learning: Shell Basics and files

1shell is an interface between the user and the kernel to interoperate, 2shell commands that can be run include Linux commands, built-in commands, utilities, user programs, shell scripts 3shell characters: 4. Get command help: Man,info.--help 5

Using Msmtp+mutt+shell to implement email alerts

Scene:The Redis keys value needs to be monitored, and monitoring scripts are executed using the Crond cycle. If there is an exception, notify by email.First, install the MSMTPDownload softwarewget http://sourceforge.net/projects/msmtp/files/msmtp/1.4

9th Shell Foundation (4) _bash operator and environment variable configuration file

5. Bash 's operators5.1 numeric operations and operators5.1.1 Declare declaring variable types: #declare [+/-] [ option] Variable name Options Description - set type properties for variable

Shell Introduction: What are the two ways to execute a shell,shell command

The shell itself is a program written in C, which is a bridge for users to use Unix/linux, and most of their work is done through the shell. The shell is both a command language and a programming language. As a command language, it interprets and

Shell script that calculates the factorial of n by a shell program.

[Email protected] ~]#CatJiechen.SH #!/bin/bash# Design a shell program to calculate the factorial of N, required: #1. Receive parameters from the command line n;#2to determine the legality of n immediately after the commencement of the program, that

Total Pages: 541 1 .... 70 71 72 73 74 .... 541 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.