Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Find and Replace Recursively

    Hi There,

    Our server recently was hacked. The hacker added an iframe to every index.html file. We got the exploits removed, but the iframe code needs to be removed from every index.html file. Does anyone know how we can recursively find and replace the iframe code with nothing (deleting the code)?


  2. #2
    Linux Newbie X.Cyclop's Avatar
    Join Date
    May 2006
    rm -rf `find /path -name 'index.html'`

    "Don't think about the work, think about the benefit"

    Leonardo Juszkiewicz

  3. #3
    No, I don't want to delete the files, just replace the text in them so basically deleting this iframe code. I found a way here is what I did:

    find /home/* -type f -exec sed -i 's/iframe code/ /' {} \;

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts