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
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
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
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: 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:
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
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 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,
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:
#
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
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
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
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
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
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
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
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