在远程FTP站点上的文件中搜索 [英] Search Within Files On Remote FTP Site

查看:519
本文介绍了在远程FTP站点上的文件中搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种在远程ftp服务器上的所有文件/目录中搜索特定文本行的方法.

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

到目前为止,我正在使用Cygwin使用lftp建立ftp连接. 我最拿手的就是使用命令:

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模式

ls -l | grep pattern

...在lftp模式下.

...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?

推荐答案

您将必须拥有:

  • 一个FTP客户端,该客户端将下载所有内容,然后进行搜索(可能击败了重点),或者
  • 服务器必须具有支持搜索的扩展名(我从未听说过)
  • 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.

这篇关于在远程FTP站点上的文件中搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆