Description of FTP commands, as or 2/5/77 Some Useful FTP Commands: CONNECT Connects to a foreign host. Use the name of the host or its (octal) numeric address. Any pre-existing connection will be flushed. FTP prompts with "$$" when it is not connected to a foreign host, and with "$" when a connection exists. Is equivalent to CONN . HOSTS Lists the names of hosts which FTP knows LOGIN Logs in at foreign host (if needed by that host) If you get an error message implying that you are not logged in, this is where to start. Sometimes FTP will figure out by itself that logging in is what you have to do; then it will ask for for a user name, send it, and go ahead with the operation you had already requested. TEN Mode command for pdp10 36 bit binary files. (May also be used for pdp10 ascii files if you don't mind extraneous characters at the end of the file) NOTE: This is the DEFAULT mode when communicating with another PDP10. You can specify it explicitly, also, with any computer (although some may not accept it). It is an abbreviation for TYPE I and BYTE 36 TEXT Mode command for Network ASCII data transmission. This mode is the DEFAULT when communicating with a machine that is not a PDP10. It is an abbreviation for TYPE A and BYTE 8. GET or RETRIEVE Transfers a file from foreign host to here. Asks for local name (end with CR) and then foreign name. PUT or STORE Transfers a file from here to foreign host. or SEND Asks for local name (end with CR) and then foreign name. APPEND Appends a local file onto a file at the foreign host. Arguments are local file (not changed by the operation) followed by the foreign file (which will be created if it does not exist), as for PUT. TRAN = Transfers at to at . Two foreign hosts can't be used, though; one of and must be the local host's name. Abbreviations are allowed: You can leave out the name of the local host (omitting the altmode as well), as in TRAN FOO BAR=MCFOO BAR or TRAN MCFOO BAR=X Y, and if the two filespecs are identical either one may be omitted, as in TRAN FOO BAR=MC which is equivalent to TRAN FOO BAR=MCFOO BAR. NOTE: "_" is equivalent to "=". To include a "=" or "_" or a ^Q in a filename in a TRAN command, precede it with a ^Q (which will be gobbled up as a quoter). ^Q's followed by other characters (not _, = or ^Q) will NOT be absorbed by TRAN (so you can use them to quote at other levels, with hosts that understand it). QUIT Closes connection to foreign host, and then exit from FTP ^C Is the same as QUIT - no CR is needed. Any command may be terminated with a ^C instead of a CR, in which case that command will be followed by a QUIT (unless it encounters an error). DISC Closes connection to foreign host. You may then connect to another host, or QUIT, or ^Z... HELP or ? Types a list of commands, with brief descritions. Less useful commands: DELETE Deletes the specified file at the foreign host. RENAME Renames the file at the foreign host to be called . Separate the two names with a CR. DIRECTORY or LISTF Types out a listing of the foreign host's directory . Some hosts may also allow you to specify a filename, in which case info on that file will be given. LISTB Types out a brief listing of a foreign directory. It is like LISTF except that onlty the filenames are typed - no other info on the files. LISTL Types out a listing of the directory at the local host. CWD Sets the foreign default directory to DEFAULTS Sets the local filename defaults to . Note: the local defaults are sticky; each local filename's names default to the last filenames specified for a local file. Rarely Useful Commands: STATUS Asks for a status message from the foreign host. The meaning of is site-dependent. ITS sites don't implement the command at all. QUOTE Sends directly to the foreign host over the TELNET connection. Used if the foreign host implements some simple command that FTP doesn't know about itself. It won't work for commands that do anything hairy (such as use the data connection at all) since FTP doesn't expect it do do that. SOAK Waits for and describes one reply from the server. This is never necessary with any of the normal FTP commands, since they know when to wait for replies. DEBUG Toggles the switch which says whether to print expected replies from the server (unexpected replies such as error messages and notices to the user are always printed). The DEBUG switch also causes reply codes to be given with all replies, not just error messages. PASS Sends a password to a foreign host. Note that after a LOGIN command, if a password is needed, FTP will usually be able to figure that out; it will ask you for the password and send it automatically, so you need not explicitly give a PASSWORD command. ACCT Sends an account number to the foreign host. Note that if after a LOGIN command an account number is needed, FTP will usually figure that out and just ask you for it. So you usually won't need to give an explicit ACCT command. BYE Is like QUIT, but it notifies the foreign host with a BYE command before closing the connection. Is this ever useful? ^C is easier. ALLOCATE Sends the foreign host the estimated size of a file you are about to send it (measured in bytes). Most hosts don't need ALLOCATE commands since they can allocate file storage dynamically. TYPE Says what transfer type to use. Of the many types specified in the FTP protocol, only A (ASCII) and I (Image) are implemented on ITS. You usually would rather use the TEXT or TEN commands, since they specify the two most useful combinations of TYPE and BYTE. BYTE Says what byte size to use for transfers. The only byte sizes implemented on ITS for FTP'ing are 8, 32 and 36. In any case, you should usually use the TEXT and TEN commands for mode-setting. Giving FTP commands from DDT: If you do :FTP and contains an = or a _, FTP automatically does a TRAN command with as arguments. After that transfer completes, FTP kills itself. For example, :FTP FOO BAR=MC will transfer FOO BAR from MC to the local host, leaving you back in DDT. If the command string from DDT does not contain an = or a _, it is simply executed as an FTP command. FTP will then read more commands from the TTY, since one FTP command (unless it is TRAN) is not usually enough for a whole transaction. Filename Defaulting: Local filenames default "stickily", so that each file's device, sname, and first and second filenames all default to the last such names specified for a local file. Giving a null argument for the local file will cause the default file to be used. When you specify only one filename, it is the first filename, and ">" is used as the second. The initial default directory is your working directory. If you wish to include a space, colon, or semicolon in a local filename (or in a foreign filename if the foreign site is an ITS), precede it with a ^Q. The same technique is used for including a = or _ or ^Q anywhere in a pathname, in the TRAN command. Type-in Conventions: You can use Rubout to delete one character, ^D, ^G or ^U to cancel an entire line, and ^L to redisplay the current line as typed so far. Commands with no arguments should be terminated with a CR. When giving a command with arguments, you can separate the command name from the first argument with either a space or a CR (if you use CR, FTP will tell you what sort of argument is expected). When a command requires several arguments, the arguments are separated with CRs. You can use a ^C instead of CR to terminate a line. That causes FTP to return to DDT, killing itself, after the current command is finished (as long as it does not get an error). If you plan to disown a FTP while it is transfering, you should end the last command with a ^C so that the FTP will go away when it is finished; otherwise it might hang around for hours until someone notices it and kills it. You can use ^N instead of CR to terminate a line. This is not especially useful when you are typing on the TTY, but it is useful when passing commands from DDT, since it allows you to put several lines' worth of input into the one line that DDT lets you send.