操作系统
eve_zz
跑不嬴就拉,过不到就抓,故意犯规装瓜,反正必须拿下!!!
展开
-
Shell中关于时间的处理
<br />#!/bin/shNOW=`date +"%s"`echo $NOWBEFORE=`expr 1 /* 24 /* 60 /* 60`echo $BEFOREDELDATE=`expr $NOW - $BEFORE`echo $DELDATESTRDELDATE=`date -d "1970-01-01 UTC $DELDATE seconds" +"%Y%m%d"`echo $STRDELDATE原创 2010-08-29 04:44:00 · 482 阅读 · 0 评论 -
批量测试网络的连通性
<br />#!/bin/sh#Using this script can test the connection of the hosts listed by HOSTFILE#Author: Ivan ZHANG#E-Mail: zhangyi01@newstepinfo.cn#HOSTFILE=host.txtRESULTFILE=result.logTEMPFILE=ping.txtCHECKDATE=`date +"[%F %R]"`echo "st原创 2010-08-21 06:07:00 · 1156 阅读 · 0 评论 -
建立SSH信任
<br />假设A,B两服务器,现在需要在A机上用root登陆B机,而不需要输入密码,那我们可按照下面的步骤来做:<br />1.输入命令:ssh-keygen -t rsa<br /> Generating public/private rsa key pair.<br /> Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa<br /> Enter passphrase (empty for no p原创 2010-07-31 03:09:00 · 561 阅读 · 0 评论