#! /bin/sh
while true;
do
i=`df -h | egrep '/mnt/D'| awk '{print $5}' | cut -d "%" -f1 -`
if [ "$i" -ge 90 ]
then
echo "disk nearly full"
cd /mnt/D/files/
for file1day in `ls -d */ | sort -n...
分类:
系统相关 时间:
2014-09-21 00:00:59
阅读次数:
276
检查是否nfs#rpm -qa|grep nfs#rpm -qa|grep rpcbind将nfs rpcbind 设置为开机启动#chkconfig nfs on#chkconfig rpcbind on#启动 nfs rpcbinds#service rpcbind start#service....
分类:
其他好文 时间:
2014-09-20 23:48:59
阅读次数:
417
利用 if .... then单层、简单条件判断式if [ 条件判断式 ]; then 当条件判断式成立时,可以进行的命令工作内容;fi {$0 someword}"else echo "The only parameter is 'hello', ex> {$0 hello}"finetst...
分类:
其他好文 时间:
2014-09-20 18:00:29
阅读次数:
262
';}function save($path){ echo "";$data = ob_get_contents();ob_end_clean(); $this->wirtefile ($path,$data);} function wirtefile ($fn,$data){$fp=fopen($...
分类:
Web程序 时间:
2014-09-20 14:03:37
阅读次数:
267
代码如下"; echo "今天:",date("Y-m-d",strtotime("18 june 2008")),""; echo "昨天:",date("Y-m-d",strtotime("-1 day")), ""; echo "明天:",date("Y-m-d",st...
分类:
Web程序 时间:
2014-09-20 08:49:46
阅读次数:
285
//循环分类ID,供首页调用.
function dump($var, $echo=true, $label=null, $strict=true) { $label = ($label === null) ? '' : rtrim($label) . ' '; if (!$strict) { if...
分类:
其他好文 时间:
2014-09-19 23:47:06
阅读次数:
351
练习题:http://blog.chinaunix.net/uid-10540984-id-3086644.htmlcat file:a b c a d as d d d x s ah j s a s h j hj d f j a s j k j要求:删除行内与第一列字符重复的字符,shell、se...
分类:
其他好文 时间:
2014-09-19 23:42:36
阅读次数:
210
1.写一个脚本,实现判断192.168.1.0/24网络里,当前在线的IP有哪些,能ping通则认为在线。#/bin/bash
#Thisprogremistouchpcliveordie
#Auther:XunGE
#####################################################################
FL=/root/IP.txt
read-p"请输入你要测试主机的前3..
分类:
其他好文 时间:
2014-09-19 19:44:56
阅读次数:
218
if判断两个数值大小--多分支if语句实现对参数的严格判断#!/bin/bashprint_usage(){printf"你输入的参数个数不对或者有误,请按照下面语法执行:\n"echo-e"$0数字1数字2"exit1}if[$#-ne2]thenprint_usageexit1fi[-n"`echo$1|sed‘s/[0-9]//g‘`"-a-n"`echo$2|sed‘s/[0-9]//g‘`"]&..
分类:
其他好文 时间:
2014-09-19 19:33:56
阅读次数:
228
代码如下:#!/bin/bash#check MySQL_Slave Status#crontab time 00:10MYSQLPORT=`netstat -na|grep "LISTEN"|grep "3306"|awk -F[:" "]+ '{print $4}'`MYSQLIP=`ifcon...
分类:
数据库 时间:
2014-09-19 19:15:35
阅读次数:
303