GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Find and replace through FTP? (https://gfy.com/showthread.php?t=922763)

96ukssob 08-19-2009 09:28 PM

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?

mlove 08-19-2009 09:32 PM

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/" {} \;

dready 08-19-2009 09:49 PM

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.


All times are GMT -7. The time now is 07:58 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123