Many time we face the hacking issue, hackers uploaded the index.html or index.php page under all the hosting accounts present on the server and we have to delete or rename the index page in one single command. At that time we can run the following command on the server, so that all the hacked index.html page will be renamed as index.html-hacked.
find / -name ‘index.html’ | while read file ; do
newfile=${file%.html}”.html-hacked” ;
mv $file $newfile ;
done
But make sure that you are using the above commands in the correct path.