Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dpaanlka

macrumors 601
Original poster
Nov 16, 2004
4,868
30
Illinois
Ok, I'm trying to get multiple files and directories via the command line. Basically, I want to get an entire directory that contains more directories and files.

But when I type the get command, it gives me a bunch of errors that all the directories I'm trying to get do not already exist on my local machine. How can I work around this? There are a lot of directories and I don't want to manually create and get the contents of each one.
 

plinden

macrumors 601
Apr 8, 2004
4,029
142
Does recursive get work on the FTP server?
Code:
get -R xxx

Edit: I should have said "does recursive get work with your client?" - recursive get is client-specific
 

plinden

macrumors 601
Apr 8, 2004
4,029
142
Are you using a Mac? (I don't want to make any assumptions) Try using the finder (open a Finder window, command-K, type "ftp://yourftpserver").

You should be able to drag directories over.

If you're using Linux, try wget -r ftp://...

Edit: actually, on rereading your OP, I guess you are using a Mac, and using the Mac FTP client. I don't think I've ever actually using OS X's ftp command. But the Finder set up should work.
 

dpaanlka

macrumors 601
Original poster
Nov 16, 2004
4,868
30
Illinois
Actually, I'm logged into a remote UNIX server via SSH and the Terminal, and I'm trying to get the entire contents of a directory from a second remote server via FTP to the first remote server that I am SSH-ing on.

I don't want to waste my bandwidth downloading 7 gb of files, then re-uploading them, on my slow cable internet, when I can just have the two servers talk to each other all fast-like.

I am on a Mac though.
 

SC68Cal

macrumors 68000
Feb 23, 2006
1,642
0
Your bet bet is to SSH and then ftp to the second server. I don't think CLI ftp has the ability to download directories. I've only had luck using mget with a wildcard (*) to just download the contents, making sure that I created the directories on my local machine.

Your best bet, is to TAR up your directories on the remote machine before FTP'ing them to the host that your connected through SSH. That'll preserver directories and such
 

dpaanlka

macrumors 601
Original poster
Nov 16, 2004
4,868
30
Illinois
I sent a description to Dreamhost to see if they had any ideas. Amazingly, at 3:45 in the morning they still have people answering support emails. They suggested I try using a wget -mirror command, which I did, and that seems to be taking care of it.

I still wonder why FTP wouldn't work.

And now, for a moment of zen...

zen.gif
 

SC68Cal

macrumors 68000
Feb 23, 2006
1,642
0
I was thinking about wget, but I didn't know if the files you were looking for were accessible to the public or if it was a private directory
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.