How to download a directory over FTP?
I want to download a directory over FTP. The directory is very large, and it would be useful if I can pause and resume the download as needed.
The target FTP directory is static. That is, it's contents won't change in time. And no authentication is needed.
What's the best tool to do this job?
14 Answers
wget should work:
wget -r -l 0 ftp://username:password@wget is tool for downloading files.
-rmeans recursive.-l 0for infinite recursion, because-rby default have recursion depth of 5.some_dir/is relative to user home dir. If you want absolute path add one more/after host name.
Maybe you have to use --user and --password arguments to get it to work on Ubuntu.(according to )
You can do it with curl :
curl -u user:password 'ftp://site/folder/file.txt' -o /tmp/file.txtor with gui FileZilla
1AFAIK ftp doesn't support downloading the directory directly.
You can use FileZilla for this purpose. It stores all your transfer in queue. You can resume the transfer later once it is paused or when you reconnect to server.
I would use lftp and mirror function in it. You can download files in pararell, stop, resume, limit speed etc.
Alternativly - you can use wget
wget -m -c ftp://serwer/directory
If you wish to stop - simply stop wget. For resume - do it again - it will not download files which was already downloaded.
If you wish to download/reject specific files you can use -A or -R option (or - if you wish to specify it via regexp - --accept-regex/--reject-regex)
2