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

dpaanlka

macrumors 601
Original poster
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.
 
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
 
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.
 
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.
 
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
 
Can't you use scp to copy the files from server2 to server1?

[in server1] scp -unsafe -r user@server2😛ath_server2/* path_server1/

I think it should work.
 
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
 
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.