What would be the fastest way to recursively retrieve entire directory listing from an ftp server using wget/curl/whatever? I don't need to download any files, just directory and file names. Basically what ls -R
does.
Ftp – Retrieve FTP directory tree from the command line
curlftpwget
Related Topic
- Windows – download only new files from ftp using WGET/cUrl
- Linux – How to mention the prefix directory path in CURL command
- Linux – Why does wget from ftp-sites sometimes create a few empty files when it downloads the rest of the files without problems
- Ftp – lftp mirror files from a directory tree into single directory
- FTP – PASV FTP Fails for wget/ftp but Works for curl/lftp
Best Answer
The best I can do with wget is
Which will create empty directories containing a
.listing
file with the listing of the matching directory on the ftp server, and take forever.You'll probably need to use a real ftp client like lftp: