Anonymous 发表于 2019-9-3 20:31:47

课程第25次

#!/bin/sh
sub_ping() {
if ping -c 1 -w 2 -q$1 &>/dev/null
then
echo "$1 is online"
else
echo "$1 offline"
fi
}


for i in {1..254}
do
sub_ping 192.168.0.$i &
done

----------------------------------------------------------
ssh 远程ghost


(ssh 192.168.0.3 dd if=/dev/sda1 bs=4M)|dd of=/dev/sda1
做tar的时候用路径,解tar的时候也用绝对路径:
tar Jcvf /root/boot.tar.xz/boottar -C / -Jxvf/root/boot.tar.xz
https://www.itefix.net/cwrsync

页: [1]
查看完整版本: 课程第25次