I've inherited a huge joomla website (hundreds of nested folders and thousands of files.) I need to be able to find a specific piece of code, but have no idea which file it's in. Is there a GUI FTP client that has an integrated grep-type function?
5 Answers
- You can use nautilus to connect to the server.
- Goto Places → Connect to server → ftp
- After connecting to it,you can see it in your nautilus.
- You can search it like any other filesystem you can access.
-
I already use Filezilla, but while it allows you to search for file names, I haven't found any function in it for searching for text within files.– EmmySDec 29, 2010 at 19:16
-
Thanks, that wasn't what I was initially thinking of, but it works. (FYI, I'm not the one who voted your answer down.)– EmmySDec 29, 2010 at 19:51
you can mount the ftp resource as a local
curlftpfs [user@]host:[dir] mountpoint [options]
and search with your favorite tools
Like karthick87 wrote, I generally use Nautilus to mount all my network shares. I have the nautilus-open-terminal
package installed, which allows me to right click the window and open a terminal. To search for text, I just open a local terminal from Nautilus and run
grep -r '#include <example.h>' *
Any way of full-text search via pure FTP would involve first downloading applicable files as whole, then browsing through them. So be simple: create local mirror of FTP and search through it. All tools described before do the same, but implicitly.
-
"Any way of full-text search via pure FTP would involve first downloading applicable files as whole" Are you saying no utility could stop downloading once the text being searched for has been found? One needn't download all the files before looking inside any of them. (Even in the case of one big file, ftp supports starting a download anywhere in the file, as well as stopping a download before it is finished. I strongly suspect
curlftpfs
--as jet suggests--uses this functionality.) Oct 17, 2014 at 1:54 -
Computer search, by default, works in "find all occurrences" mode. For this all files are needed. Oct 17, 2014 at 6:10
-
"Computer search, by default" seems substantially narrower than "Any way of full-text search via pure FTP." In this answer you seem to be saying that it is not even theoretically possible to find a single occurrence of a string in a directory tree, without having simultaneously cached full local copies of every file. Furthermore, it doesn't wait to display even the first result until every has been found, does it? (I cannot check into this myself because I don't actually know what you mean by "computer search.") Oct 17, 2014 at 6:14
I think the question was sort of missed. It boils down to this. FTP only transfers files. If all you have is FTP access you will need to download all the files and search them with your favorite search tool.
ssh server; cd /joomla/; grep -ri "text" *
:)