Dirk
03-23-2001, 01:30 AM
What are the basic commands to use ftp from a terminal? Thanks
|
Click to See Complete Forum and Search --> : ftp acquisition from command line Dirk 03-23-2001, 01:30 AM What are the basic commands to use ftp from a terminal? Thanks FoBoT 03-23-2001, 01:36 AM ftp then a ? will show the commands thats all i know BigBlockMopar 03-27-2001, 05:25 PM Originally posted by Dirk: What are the basic commands to use ftp from a terminal? Thanks Okay, first off, make sure that you've run FTP from the directory in which you want your downloaded stuff to go. For uploading, it's the same, though, like most people, I download more often than I upload. ;) Oh yeah, and before you navigate to the FTP server and file that you want to get, it's good to make sure that you're starting the FTP client from a file where you've got write permission.... :) "open" lets you open a connection to an FTP server. The syntax is "open [host]". You'll be asked for a username. "anonymous" often works, and as an e-mail address (password for anonymous access), "bgates@microsoft.com" is a personal favorite. "ls" works as you'd expect, though I haven't figured out how to |less a directory listing that is bigger than one screen. And I haven't intensively researched it, I'm afraid, it's been back-burner. :) "pwd" is Print Working Directory, telling you where you are. "cwd" or "cd" are Change (Working) Directory. "binary" and "ascii" are your friends. If you're downloading anything that isn't a text file, make *sure* that you type "binary" before transferring, unless you like to add carriage returns to executables. (Bad idea.) "get [filename]" gets a file and sticks it in your local directory. "mget [file*]" will get Multiple files meeting the wildcard. You will be prompted for each. I don't know how to get around the prompt, it's a pain in the butt when you're trying to move a lot of stuff, but I've only just recently weaned myself away from graphical FTP clients. "put [filename on client, not server]" and "mput [filename on client*]" put files from your machine up onto the FTP server. Of course, this assumes that you've CWDed into a directory where you've got writing permissions. "quit" logs you out when you've done your stuff. And the rest of the commands are pretty much like you'd expect. If the FTP server is running verbosely, you're all set; if it's only spitting back numbers at you, it's pretty hard to know whether it's unhappy with you. Here are a couple of common ones: 230 - Logged in 200 - command interpreted and okay, doing it. 221 - Session closed by guest, goodbye. And then there's my personal favorite: 425 - Can't build data connection, no route to host. The last one is important if you run your FTP client behind a firewall. FTP communications include a control and a data connection. The control connection is initiated from the client and is therefore pretty easy to pass through your firewall. The data connection is initiated by the server and will probably be stopped by your firewall. Kick to passive mode and it should work. (But, I'm noticing, M$ Windows 95B's FTP client doesn't support passive mode..) Anyway, that's a good intro. Have fun. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |