Shell script Implementation Monitoring Iptables rule is modified _linux shell

Recently read an article through Nagios to realize MD5 real-time monitoring iptables status, I would like to see if the shell can also do monitoring iptables rule changes, after the experiment, there is the following script. System: CentOS 5.x

Shell script automatically deletes backup files above a specified size _linux shell

The recent local virtual machine space is always backed up to fill, in order to lazy don't want to log up every day to clear, just write this automatic cleanup script. System: CentOS 5.x Script content: Cat make_room.sh Copy Code code as

Shell script Bulk purge nginx cache _linux Shell

Foreword * With the development of the whole Internet, has produced numerous big and small website, along with the user to the website UI and the speed experience also is strengthening, to the enterprise or the individual, wins the user experience

Shell create user and generate random password script share _linux shell

To create a random number method: Copy Code code as follows: 1~~~~ /dev/urandom In Linux, a device/dev/urandom is used to generate random sequence of numbers. Using this device we can generate random strings when needed.

A simple shell script sharing _linux shell that monitors squid running processes and automatically restarts

Copy Code code as follows: #!/bin/sh While Sleep 30 Todo Squidnum= ' Ps-ef|grep squid|grep-v grep|wc-l ' #HttpNum = ' netstat-an|grep 0.0.0.0:80|grep-v grep|wc-l ' #80状态 If [$SquidNum!= 3]; Then /etc/rc3.duid start Adddate= '

Print process number (PID) _linux shell with interface provided by kernel

C File Printpid.c Copy Code code as follows: #include #include #include #include #include static __init int printpid (void)//install module functions{struct Task_struct *task,*p;struct List_head *ps;int count=0;PRINTK

Shell script Implementation installs Jdk_linux shell automatically in Linux system

A: This script runs the machine, LinuxB: The machine that installs the JDK, Linux First, on machine A on which the script runs, determine that you can log on to machine B on the JDK by SSH without a password, and then you can run this script on a:

Shell script achieves precise cleanup squid cache _linux Shell

This script was modified on the Zhang Yi cache cleanup Script, the main is to add the IF option and optionally list the address of the cache file based on the parameter type (because it is not fixed, sometimes a particular JPG type, sometimes a

Parsing the implementation code of the shell sort _c language

Copy Code code as follows: #include using namespace Std; void Shellqin (int a[],int N) { int GAP=N/2; int i,j; for (; gap>0;gap=gap/2)//Set the initial gap, according to the Gap group, Gap in accordance with GAP/2 decline { After the

Shell script Implementation Batch collection Love station keyword library _linux shell

Shell Batch collection Love Station keyword library, the whim of the play, not perfect, first put out, later slowly update, although the function is simple, similar tools are also many ready-made, but after all, it is their own writing tools,

Shell implements system time and BIOS time synchronization calibration script sharing _linux Shell

The script is mainly from the defined NTP server list to get the server address to synchronize, if the first unsuccessful, will continue to change the address to sync! Not perfect place also please point out! Copy Code code as follows: #

Shell uses Mysqld_multi to automate multiple instances from library script _linux Shell

Copy Code code as follows: # Cat Doallslave.sh #!/bin/sh #code by Scpman #mail: scpman@live.com #blog: http://www.scpman.com #name: "Doallslave.sh" Helpinfo () { Echo-e ' \t\thelp View Help information ' Echo-e ' \t\t automatically do

Use Plink tool in Shell to implement remote batch shutdown _linux Shell

My operating system is centos6.4. Operating system: Rhel 6.2 x86_64 Download and install the Putty software package, I downloaded the putty-0.62-1.el6.rf.x86_64.rpmDownload the address below: HTTP://RPM.PBONE.NET/INDEX.PHP3 1. Remote Host IP

Shell periodically deletes files before the specified time _linux shell

Recently the World Cup has come, has been busy between work and the World Cup, there is no time to manage my blog, today can only be the whole simple small shell to everyone. The company asked to delete one months before the backup file, so that the

Summary of array operations in shell and bubble sort implementation script sharing _linux Shell

Shell Array Description: Copy Code code as follows: Array variable definition: $ arr= (1 3 6 8 2 5 9 0 7 4) Get first element by default $ echo $arr By subscript access, the second element of the array below, the shell array

Command line A new method of adding an account number (Shell.users) _dos/bat

But add the user, this one shell.users is enough. This may also be a new method of adding a user, possibly with the deletion of Net.exe and no ADSI. The code is as follows: Js: Copy Code code as follows: var o=new activexobject

Shell+linux Command Implementation log Analysis _linux Shell

The IP that lists the most visited times of the daycommand: Copy Code code as follows: Cut-d--F 1/usr/local/apache2/logs/access_log |uniq-c | Sort-rn | Head-20 Principle: Copy Code code as follows:        cut   

Shell script implementation balances process load into multi-core CPUs _linux Shell

Sometimes, because of the architectural design or other business itself characteristics, resulting in some applications using CPU is very uneven, so business processing concentrated on one CPU, while the other CPU idle sleep. Here is a simple

Linux shell features three and a

The shell can be said to be an interpreter while providing a running environment for the code to run. and provides the programming capabilityThe shell does not have its own library, it just writes the applet commands within the command invocation

Shell common operations accumulation

1. Stitching strings * #!/bin/sh write_log () {Local up_name =$1 local num =${# string " while [$num-le 256 ]; do up_name = " $up _name* " num =$ (($num + 1 done echo $up _name}write_log " wang " Output:wang******************

Total Pages: 541 1 .... 490 491 492 493 494 .... 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.