Recently in the debugging server iptables, oneself made a timed turn off iptables, but at night home rarely open a computer, so can not go to start iptables, of course, you may say, why not cancel timed shutdown iptables, I can only say that
Oneself in the VPS do kingate service end, estimated the recent occupancy flow is too big, always be the service provider put my VPS reboot, but kingate this thing is once forced to end, is not boot, because to kingate.pid this file deleted to start,
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
Company colleagues today to find me help modify the filename, I see, well, hundreds of files to rename, file name format is _01.png _02.png so in turn, colleagues asked the front of the "_" to remove, fortunately, the request is simple, did not let
Sometimes you need to compare files consistently in your work, and you can do it with the following script (simpler): share it, hoping to help friends with the same needs
Copy Code code as follows:
#!/bin/bash
#对比服务器上文件是否一样
# Richard
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
The company's recent server testing, the need to constantly adjust the system time, one or two is ok half, a little more points, on a variety of entanglements, the author of these several sets of the author is going crazy. Eldest brother: All speed
Copy Code code as follows:
useradd.sh
#!/bin/bashFor name in Tom Joy John Mark JamesDo Useradd $nameecho "Redhat" | passwd--stdin $nameDone
OK, after the execution, the new user will be automatically created Tom, Joy, John, Mark, James,
When the server pressure is larger, running very laborious time. We often do Site page optimization, will go to find those pages are more frequent, and more time-consuming. Find the addresses that are high and time-consuming, and the related
Use syntax:chkconfig[--add][--del][--list][System Services] or Chkconfig[--level ][system Services][on/off/reset]
Chkconfig Displays the usage when no parameters are running. If you add a service name, check to see if the service is starting at the
1.ls-d *
Copy Code code as follows:
amosli@amosli-pc:~$ ls-d *
%appdata% Develop many Sorted.txt workspace
Bank Documents Music Space Download
2. Find.-type d-maxdepth 1
If you do not add-maxdepth parameters, then
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
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.