Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
2  
ssh server; cd /joomla/; grep -ri "text" * :) –  Marco Ceppi Dec 29 '10 at 19:45
    
Thanks, but I wasn't given ssh access, only ftp. –  EmmyS Dec 29 '10 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 '10 at 16:01

5 Answers 5

up vote 12 down vote accepted
  • 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
share|improve this answer
    
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 '10 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 '10 at 19:51
    
You are welcome :) –  karthick87 Dec 29 '10 at 20:00

you can mount the ftp resource as a local

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

and search with your favorite tools

share|improve this answer

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>' *
share|improve this answer

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.

share|improve this answer
    
"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.) –  Eliah Kagan Oct 17 at 1:54
    
Computer search, by default, works in "find all occurrences" mode. For this all files are needed. –  Barafu Albino Oct 17 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.") –  Eliah Kagan Oct 17 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.