Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search Within Files On Remote FTP Site

I am looking for a way to search within all files / directories on a remote ftp server for a certain line of text.

So far I am using Cygwin to make the ftp connection using lftp. The furthest I've got is using the command:

ls -l | grep pattern

...while in lftp mode.

However, that simply looks over the file names returned for the pattern. I want to search within the files for the pattern.

Perhaps there is a software package that allows for this already.

Any ideas on how to do this?

like image 775
Baxter Avatar asked Apr 08 '12 19:04

Baxter


People also ask

How do I search inside a file in WinSCP?

To find files or subdirectories in remote directory1 go to Commands > Find Files. You will be prompted with Find dialog to specify filter for finding. The results of search will appear in the same dialog.

Can you do a search in FileZilla?

If you need to find a particular file on the local machine or remote server: Connect to the server in FileZilla Pro. Alternatively, press the F3 key. The File search window will be displayed.

How do I grep in WinSCP?

WinSCP does not support grep or find commands.


1 Answers

You'd have to either have:

  • an FTP client that would download all the content, and then searched it (probably defeating the point), or
  • the server would have to have some extension that supported searching (which I've never heard of)

There are some alternatives over on askubuntu.com that might help, but unless you can get shell / SSH access on the remote server, everything's going to be a variant of download it all and search it locally.

like image 91
Curtis Avatar answered Oct 03 '22 18:10

Curtis