全部博文(7)
发布时间:2013-02-16 13:15:01
[root@localhost ~]# vi ex-1.sh#!/bin/bash#ext-1#Using for move currently directory to /tmpfor Filename in $(ls -l |awk '$5 > 10240 {print $9}')domv $Filename /tmpdonels -la /tmpecho "Done!"......【阅读全文】
发布时间:2013-02-16 13:04:10
[root@localhost ~]# vi ping.sh#!/bin/bash#pingfor ip in 192.168.1.{1..254}; doping -i 0.1 -c 2 -W 2 $ip &> /dev/nullif [ $? -eq 0 ]; thenecho "Host $ip is up."elseecho "Host $ip is down."fidone......【阅读全文】
发布时间:2013-02-16 12:41:32
Example-1:(自动登录FTP服务器:192.168.1.3,并下载其中/bb/*所有内容到本地/aa目录下)[root@localhost ~]# vi ftp_down.sh#!/bin/bash#ftp_downftp -v -n 192.168.1.3 <<ENDuser root 666666binarycd /bblcd /aapromptmget *closebyeENDExample-2:(自动登录FTP服务器:192.168.1.3,.........【阅读全文】