Here is one way - using GNU
Note that the download links on http://www.gnu.org/software/ftpsync/ seem to be broken as of now; the page you'd need is http://savannah.gnu.org/projects/ftpsync ... It seems that I got this via git, probably through the address:
git clone git://git.sv.gnu.org/ftpsync.git
ftpsync is a Perl script, in the
src/ directory of this repo. (Note also there is a different tool,
ftpsync.py in Python, found at ftpsync2d - Google Project Hosting)
Anyways, the trick is simply to try to sync the remote FTP tree to an empty local directory, while having set
ftpsync to info mode (
-i) (so no actual download actions are performed), and in verbose mode. Note though, verbose mode (
-v) seems to be buggy (I get even less output to stdout than if I don't use
-v) ; so below I've used
-d for debug mode, which seems to work as advertised.
Ultimately, I do this:
$ mkdir /tmp/test
$ cd /tmp/test
$ /path/to/ftpsync-git/src/ftpsync -d -i ftp://user:firstname.lastname@example.org/www . 2>&1 | tee _ftpsync_.log
Building remote tree ftp://email@example.com/www
Detecting if passive needed... Passive
Logging in as user.
Sync file /tmp/Q44CbrEGUU => Q44CbrEGUU
Localtime before 1393782144, Remote 1393782120, after 1393782144
Clock sync offset: 0h00m00s
Dir: in www
Mod:1327878000 Size:737 .htaccess
Mod:1237503600 Size:241 .hiddenfile
Dir: stuff in www
Mod:1353452400 Size:4812800 somefile
Building local tree of .
Died at /path/to/ftpsync-git/src/ftpsync line 1011.
After this process is done, you should be having a list of all files and directories under
www/ on remote server, locally in
_ftpsync_.log - thus later you can grep through this file, to search for remote filenames and subdirectory names.
Well - would still like to hear if there are alternative tools for doing this...
Hope this helps someone,