Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-21-2006, 05:26 PM   #1
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Rep: Reputation: 31
Downloading directories with FTP

I don't use FTP at all but I recently bought one of those crappy Buffalo TeraStations and the freaking thing doesn't support NFS. Therefor I'm forced to use SMB or FTP. Is there a command to download everything in a directory including directories? I know there are many GUI tools that allow you to drag folders into an FTP window so I'm figuring there must be a command behind it. Thanks!

Last edited by mijohnst; 02-21-2006 at 05:27 PM.
Old 02-21-2006, 05:53 PM   #2
LQ Guru
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,317

Rep: Reputation: Disabled
Try wget. It can log in using username and password and also reads your .netrc file.
Old 02-21-2006, 05:58 PM   #3
Registered: Feb 2006
Location: oregon
Distribution: PIII fedora2 | P4 fedora2 | Thinkpad fedora2
Posts: 54

Rep: Reputation: 15
Hmm... Reading the manual 'man ftp' it looks like mget would do the job, but not very well. I don't know if it would behave very well for subdirectories. It suggests tar'ing the files and directories first and transferring them in binary mode.
Old 03-04-2006, 05:25 AM   #4
LQ Newbie
Registered: Feb 2006
Posts: 7

Rep: Reputation: 0
Right , there is no way we can downnload the directories using the FTP at command line . I have tried it many times , it doesnt work . Remember if you are using FTP in GUI , you can always drag and drop whatever you like But in CLI , the best option that we can do is to use mget or mput as required .If you have loads of files to be put onto the FTP server .CD into the required directory and run ftp .Use ftp -i <ftpserver-name> and then enter .Enter your username and pwd.Change binary mode by typing 'bin' and then to see the data being transferred , type the 'hash' option .Finally to transfer the files , use 'mput *'.It will start the uploading process , Note that we used '-i' option while loggin onto the FTP, that is to turn off interactivity , now that ftp wont prompt you for the y/n while transferring multiple files ...

Another cool option is to zip and tar the files and directories using tar and gzip and then transfer over the single tarred and zipped file ...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloading whole directories ivanatora Linux - Software 4 10-12-2003 07:37 AM
ftp downloading evaluator Linux - Software 4 10-09-2003 10:27 AM
Downloading Slack 9.1 Via FTP Help Psyman014 Slackware 2 10-02-2003 01:49 AM
Nautilus: downloading from FTP site alexferrer Linux - Software 0 11-06-2002 11:19 PM
Problem downloading via FTP pergesu Linux - Networking 3 01-07-2002 01:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration