Need to delete same folder accross different web accounts in VPS?

My hosting provider has found a few suspicious files which I have now removed.
Just wondering if there is a command that I can use to remove all bValidator folders from my VPS?

Thanks,


HEX}php.uploader.max.574 : /home/actions1/public_html/bValidator/test2.php
{HEX}gzbase64.inject.unclassed.15 : /home/bluepage/public_html/flash/stat.php
{HEX}php.uploader.max.574 : /home/kingspace/public_html/bValidator/test2.php
{HEX}php.uploader.max.574 : /home/metrofor/public_html/bValidator/test2.php
{HEX}php.uploader.max.574 : /home/mippcoss/public_html/bValidator/test2.php
{HEX}php.uploader.max.574 : /home/ourshop/public_html/bValidator/test2.php
{HEX}php.uploader.max.574 : /home/sevenths/public_html/bValidator/test2.php
sabecsAsked:
Who is Participating?
 
serialbandConnect With a Mentor Commented:
If they all follow the same order, these can be easier.
rm  /home/*/public_html/bValidator/test2.php
rmdir  /home/*/public_html/bValidator/
0
 
Rob_JeffreyConnect With a Mentor IT/ProgrammingCommented:
If you have shell access, you can use find.

find /home -name "bValidator" -exec rm -rf {} \;


Before you run the above, you can test to see what files would be deleted with:

find /home -name "bValidator"
0
 
sabecsAuthor Commented:
Thanks Rob, would that just remove the directory called bValidator and everything in it, or will it also remove other files that might named bValidator   ?
0
 
Rob_JeffreyIT/ProgrammingCommented:
That would also remove files named bValidator too.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.