#!/usr/bin/php -q n"; echo" AGAIN,... BE CAREFUL IF YOU RUN AS ROOTnnn"; echo"btw b4 you continue i RECOMENDED you to run:n "; echo""find / filename"n"; echo"to make sure what file we seek and killnn"; echo"continue anyway ? (y/n) : "; $quest = fgets($readstdin, 2); if ($quest==y || $quest==Y) { $rstdin = fopen("/dev/stdin", "r"); echo "enter directory to process: "; $dir=fgets($rstdin,255); echo "enter filename for seek and kill ( ie: *.html~ ): "; $filename = fgets($rstdin, 225); $filename=str_replace("n", "", $filename); $dir=str_replace("n", "", $dir); $ex=`find $dir -name $filename`; $wrt = fopen("$tai", "w"); fputs($wrt, "$exrn"); fclose($wrt); fclose($rstdin); $rd=file($tai); $ct=count($rd); $cct=$ct-1; for ($i=0; $i<$cct; $i++) { $rstdini = fopen("/dev/stdin", "r"); $rd[$i]=str_replace("n","",$rd[$i]); echo"delete $rd[$i] ? (y/n/q)"; $confirm[$i]=fgets($rstdini,2); $confirm[$i]=str_replace("n","",$confirm[$i]); if ($confirm[$i] ==y || $confirm[$i]==Y) { exec("rm -f $rd[$i]"); echo"$rd[$i] was deleten"; } if ($confirm[$i] ==q || $confirm[$i]==Q) { die("process terminated by usern"); } if ($confirm[$i] ==n || $confirm[$i]==N) { echo"$rd[$i] not deleten"; } if (!$confirm[$i]) { echo"$rd[$i] not deleten"; } else {} fclose($rstdini); } } else { } fclose($readstdin); } else { die("please run on console!"); } ?>