Site-wide Tags:  Linux(17) | CommandLine(12) | Ubuntu(10) | RemoteAccess(7) | Tools(7) | Vim(7) | LiftWeb(5) | SBT(5) | SoftwareDev(5) | Mac(5) | Scripts(4) | WebDev(4) | Diagrams(4) | Lifty(3) | NetworkDrives(3) | Processwire(3) | Security(3) | Fog(3) | VCS(3) | BestPractices(3) | RaspberryPi(2) | WebDesign(2) | Encryption(2) | Windows(2) | SSH(2) | WinCommandPrompt(2) | GitHubRepos(2) | Emacs(2) | PHP(2) | IDE(2) | ErrorMsgs(2) | JVM(2) | Hardware(2) | Bash(2) | Networks(2) | Graphviz(2) | Cloning | Cygwin | Graphics | Java | SystemRecovery | lessc | Maven | Python | PXE | Samba | LXDE | PackageManagement | LifeHacks | LESS |

This site has been archived and will no longer be updated.
You can find my new homepage at neilpahl.com.

Download ftp Directories Recursively Using wget

Tags:  Linux   RemoteAccess   CommandLine   
Created on Sun, 24 Jun 2012.

Motivation Behind This Cheatsheet

Wanted to know how to easily download all files and folders recursivley from a host that only offers ftp access using only the command line

The Cheatsheet

If you have terminal/ssh access its easy to download remote file structures using a recursive scp command. But what about ftp from the command line? The ftp client native in the command line isn't able to recursivley get and send files, so its better to get it through wget. in the command line, use:

wget -m ftp://username:[email protected]/path/to/directory

Further Discussion

in wget, the -m parameter is for mirror, the -r can only go 5 folders down a dir structure.

Sources:

I don't claim any credit for this method, but I keep it on my site for reference. I got it from serverfault: http://serverfault.com/questions/25199/using-wget-to-recursively-download-whole-ftp-directories


PLEASE let me know if I'm doing something wrong, or if you have any suggestions or requests~

blog comments powered by Disqus