Цитата |
#include <string.h> char command[256]; int i; int main(int argc,char* argv[]){ for(i=1;i<255;i++){ sprintf(command, "ping -c 1 192.168.7.%d", i); system(command); } return 0; } |
Цитата |
#!/bin/sh DAY=`date +%j%y` echo "Starting backuping..." echo "Please wait..." cd /backup mkdir -p backup-$DAY cd backup-$DAY tar cvfy etc.tar.bz2 /mnt/main/etc >/dev/null tar cvfy httpd.tar.bz2 /mnt/main/home/httpd >/dev/null tar cvfy named.tar.bz2 /mnt/main/var/named >/dev/null echo "Done." |
1 пользователь, 1 гость