Search Within Files On Remote FTP Site

喜夏-厌秋 提交于 2019-12-08 15:40:31

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/10065524/search-within-files-on-remote-ftp-site

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!