Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wonder if you could help me please. I run 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

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

You could try

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

share|improve this answer

Your Answer


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.