Super User is a question and answer site for computer enthusiasts and power users. 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 would like to delete a php code on all my php files on my debian server. indeed I would like to get rid of a line:


It's present in many of my phpfiles. That's why I would like to find a script which is going to look it up in all my php files and replace itwith nothing? Do you have any idea how i could do that ? I know how to do it on windows with some software (notepad++ is very useful) but no idea how can I do that in a command line through ssh

Thanks for your answer.

share|improve this question

In C shell, you could do something like this:

foreach i ( `find -name "*.php"` )
   sed '/^eval(base64_decode("DQplcnJvcl9yZXBvcnR"));$/d' $i > $
   mv $ $i

In bash, it would look like this:

for i in $(find -name "*.php"); do
   sed '/^eval(base64_decode("DQplcnJvcl9yZXBvcnR"));$/d' $i > $
   mv $ $i
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.