How to recursively search FTP server using Linux?

0

I googled this and found tons of answers, but for one reason or another they just didn't work for me or wouldn't fit the situation. I run DD-WRT third party firmware on my routers. Occasionally I want to update one and need to find the newest firmware so I will have to go manually search ftp.dd-wrt.com. I found a way to use Google to search the repo recursively, but it's picky. I can google using the query below and it finds some but is very picky.

site:ftp.dd-wrt.com ROUTERMODELNUM

Is there a way to do recursive searches of an FTP server? Even recursively displaying files in a FTP server and then using grep to filter would be acceptable to me.

Kyle H

Posted 2018-02-05T17:40:02.433

Reputation: 338

I won't say that there isn't such a tool (we don't do software recommendations either way) but that kind of task is completely inconsistent with the FTP command syntax, so Id be a little surprised. – Frank Thomas – 2018-02-05T17:46:27.403

Yes, i didn't see ftp commands that could do it so i was wondering if there was a hybrid way like my Google search. Thank you! – Kyle H – 2018-02-05T17:47:48.337

Answers

2

Use curlftpfs.

The program curlftpfs is a tool to mount remote ftp hosts as local directories.

This is a FUSE-based solution, get familiar with security concerns. You can (and should) do the mounting as a normal user:

curlftpfs -r ftp.dd-wrt.com ~/mnt/foo/

Then play with find or whatever. To unmount:

fusermount -u ~/mnt/foo/

Kamil Maciorowski

Posted 2018-02-05T17:40:02.433

Reputation: 38 429