Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I wonder if you could help me please. I run 5GBFree.com a free hosting site. As you can imagine, it gets quite a few people signing up to abuse the service.

Recently I've found a LOT of people setting up sites with a particular script that floods forums and IRC chat rooms. The names of the files are as follows:

peindom1.php peindom2.php peindom3.php peindom4.php

Is there a command I can run in linux to remove files with these filenames ANYWHERE on the server (so basically, a command to go through all folders on the server and remove instances of that name).

If you could help I would really appreciate it, and I'm sure the people who run the forums and IRC rooms getting spammed would also be grateful to you.

Kind regards, Rob

share|improve this question
add comment

2 Answers

find / -type f -name peindom\*.php -delete

see the find manpage for more info on using find. its definitely a command you want in your quiver

share|improve this answer
    
may I suggest first running without the -delete to verify your results first. –  sreimer Mar 24 '11 at 21:11
add comment

You could try

find / -xdev -name 'peindom[1-4].php' -exec rm {} +

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.