4 ms·
> FTP has mget Not quite, ftp CLIENTS have mget. The ftp protocol has absolutely no awareness of mget. In fact, ftp is terrible at downloading more than one
by justinsaccount 10y ago
> FTP has mget
Not quite, ftp CLIENTS have mget. The ftp protocol has absolutely no awareness of mget. In fact, ftp is terrible at downloading more than one file at a time because it has no concept of pipelining and keepalive, both things that http supports.
With a nice multi protocol client like lftp, http directory indexes work just like an ftp server:
$ lftp http://http.debian.net/debian/
cd: received redirection to `http://cdn-fastly.deb.debian.org/debian/'
cd ok, cwd=/debian
lftp cdn-fastly.deb.debian.org:/debian> ls
drwxr-xr-x -- /
-rw-r--r-- 1.0K 2017-01-14 10:44 README
-rw-r--r-- 1.3K 2010-06-26 09:52 README.CD-manufacture
-rw-r--r-- 2.5K 2017-01-14 10:44 README.html
-rw-r--r-- 291 2017-03-04 20:08 README.mirrors.html
-rw-r--r-- 86 2017-03-04 20:08 README.mirrors.txt
..[snip]..
lftp cdn-fastly.deb.debian.org:/debian> mget README*
5315 bytes transferred
Total 5 files transferred
lftp cdn-fastly.deb.debian.org:/debian>
- Spiritus 10y agoWow, I had no idea lftp had that feature. That's super cool.
- justinsaccount 10y agolftp has a ton of features. background jobs, tab completion, caching of directory contents, multiple connections, parallel fetching of a SINGLE file using multiple connections. Yes, it looks like '/usr/bin/ftp' from 1970, but it's far far far more advanced than that.
- anc84 10y agoFor anyone else wondering how to recursively download with this: lftp cdn-fastly.deb.debian.org:/debian> mirror doc Total: 2 directories, 43 files, 0 symlinks New: 43 files, 0 symlinks 1031755 bytes transferred in 1 second (678.7 KiB/s) lftp cdn-fastly.deb.debian.org:/debian> Warning, -R means reverse (upload!), not recursive. ;)