Find and replace through FTP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 96ukssob
    So Fucking Banananananas
    • Mar 2003
    • 12991

    #1

    Find and replace through FTP?

    I have a ton of files that I need to do a find and replace with and I'm trying to find an easier/less time consuming way of doing so.

    Anyone know any tools to do so? Im not that familiar with SSH, but heard there is a way to do it that way. any suggestions?
    Email: Clicky on Me
  • mlove
    the guy
    • Apr 2005
    • 764

    #2
    Can't do it in FTP, but if you run this in ssh, it will work as long as you have the 'replace' application installed

    find /home/yourusername/path/to/your/files/ -exec replace "original string" "new string" -- {} \;

    Otherwise, you can use sed:

    find /home/yourusername/path/to/your/files/ -exec sed -i "s/original string/new string/" {} \;
    If you won't feel as good, I won't feel as cheap.

    Comment

    • dready
      Confirmed User
      • Oct 2002
      • 5247

      #3
      You can do it with CuteFTP's built it editor... kinda. You have to open all the files you want to search, have it do the replace, and then it will resave the files that you changed. It should work well if there aren't too many to go through. More than a couple dozen and I'd have someone do it on the server for you.
      ICQ: 91139591

      Comment

      Working...