Copy files through sftp/ftp via wget

PHOTO EMBED

Tue Mar 25 2025 16:07:38 GMT+0000 (Coordinated Universal Time)

Saved by @dphillips #bash

wget -r -l 0 <ftp|sftp>://<user>:<password>@<host>/<path>/*


// -r means recursive.
// -l 0 for infinite recursion, because -r by default have recursion depth of 5.

// If the host is 'example.com' and the path is 'foo/bar' with the file 'baz.txt',
// the result will be './example.com/foo/bar/baz.txt'.
content_copyCOPY

https://askubuntu.com/questions/580890/how-to-download-a-directory-over-ftp