desktopdrbl

Monday, January 15, 2007

account.pl

#!/usr/bin/perl -w

# rm
for(my $i=1;$i<=9;$i++){
system("/bin/rm -rf /home/test0$i/*");
system("/bin/rm -rf /home/test0$i/.*");
}

# rm
for(my $x=0;$x<=1;$x++){
system("/bin/rm -rf /home/test1$x/*");
system("/bin/rm -rf /home/test1$x/.*");
}

# cp
for(my $i=1;$i<=9;$i++){
system("/bin/cp -R /home/test/* /home/test0$i");
system("/bin/cp -R /home/test/.gconf/ /home/test0$i");
system("/bin/chown -R test0$i:test$i /home/test0$i");
}

#cp
for(my $x=0;$x<=1;$x++){
system("/bin/cp -R /home/test/* /home/test1$x");
system("/bin/cp -R /home/test/.gconf/ /home/test1$x");
system("/bin/chown -R test1$x:test$x /home/test1$x");
}

0 Comments:

Post a Comment

<< Home