5

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?

3
  • 2
    ssh server; cd /joomla/; grep -ri "text" * :) Dec 29, 2010 at 19:45
  • Thanks, but I wasn't given ssh access, only ftp.
    – EmmyS
    Dec 29, 2010 at 20:05
  • Although not related to the original question, I just tried SSH for one of the clients I do have that access for, and it's fantastic! Being relatively new to Linux I tend to shy away from command-line stuff, but this was fast, easy, and saved a ton of time. I'm definitely adding an entry into evernote to remind me of how to do it.
    – EmmyS
    Dec 30, 2010 at 16:01

5 Answers 5

13
  • You can use nautilus to connect to the server.
  • Goto Places → Connect to server → ftp
    alt text
  • After connecting to it,you can see it in your nautilus.
  • You can search it like any other filesystem you can access. alt text
2
  • 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.
    – EmmyS
    Dec 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.)
    – EmmyS
    Dec 29, 2010 at 19:51
3

you can mount the ftp resource as a local

curlftpfs [user@]host:[dir] mountpoint [options]

and search with your favorite tools

0

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>' *
-1

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.

3
  • "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
-2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .