home *** CD-ROM | disk | FTP | other *** search
Wrap
ftp(1) User Commands ftp(1) NAME ftp - file transfer program SYNOPSIS _ffff_tttt_pppp [ _----_dddd_gggg_iiii_nnnn_tttt_vvvv ] [ _h_o_s_t_n_a_m_e ] AVAILABILITY SUNWcsu DESCRIPTION The _ffff_tttt_pppp command is the user interface to the Internet stan- dard File Transfer Protocol (FTP). _ffff_tttt_pppp transfers files to and from a remote network site. The client host with which _ffff_tttt_pppp is to communicate may be specified on the command line. If this is done, _ffff_tttt_pppp immedi- ately attempts to establish a connection to an FTP server on that host; otherwise, _ffff_tttt_pppp enters its command interpreter and awaits instructions from the user. When _ffff_tttt_pppp is awaiting commands from the user, it displays the prompt _ffff_tttt_pppp_>>>>. OPTIONS The following options may be specified at the command line, or to the command interpreter: -d Enable debugging. -g Disable filename globbing. -i Turn off interactive prompting during multiple file transfers. -n Do not attempt auto-login upon initial connection. If auto-login is not disabled, _ffff_tttt_pppp checks the _...._nnnn_eeee_tttt_rrrr_cccc file in the user's home directory for an entry describing an account on the remote machine. If no entry exists, _ffff_tttt_pppp will prompt for the login name of the account on the remote machine (the default is the login name on the local machine), and, if necessary, prompts for a pass- word and an account with which to login. -t Enable packet tracing (unimplemented). -v Show all responses from the remote server, as well as report on data transfer statistics. This is turned on by default if _ffff_tttt_pppp is running interactively with its input coming from the user's terminal. The following commands can be specified to the command interpreter: Sun Microsystems Last change: 26 Sep 1992 1 ftp(1) User Commands ftp(1) _!!!! [ _c_o_m_m_a_n_d ] Run _c_o_m_m_a_n_d as a shell command on the local machine. If no _c_o_m_m_a_n_d is given, invoke an interactive shell. _$$$$ _m_a_c_r_o-_n_a_m_e [ _a_r_g_s ] Execute the macro _m_a_c_r_o-_n_a_m_e that was defined with the _mmmm_aaaa_cccc_dddd_eeee_ffff command. Arguments are passed to the macro unglobbed. _aaaa_cccc_cccc_oooo_uuuu_nnnn_tttt [ _p_a_s_s_w_d ] Supply a supplemental password required by a remote system for access to resources once a login has been successfully completed. If no argument is included, the user will be prompted for an account password in a non-echoing input mode. _aaaa_pppp_pppp_eeee_nnnn_dddd _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ] Append a local file to a file on the remote machine. If _r_e_m_o_t_e-_f_i_l_e is not specified, the local file name is used, subject to alteration by any _nnnn_tttt_rrrr_aaaa_nnnn_ssss or _nnnn_mmmm_aaaa_pppp set- tings. File transfer uses the current settings for representation type, file structure, and transfer mode. _aaaa_ssss_cccc_iiii_iiii Set the representation type to network ASCII. This is the default type. _bbbb_eeee_llll_llll Sound a bell after each file transfer command is com- pleted. _bbbb_iiii_nnnn_aaaa_rrrr_yyyy Set the representation type to image. _bbbb_yyyy_eeee Terminate the FTP session with the remote server and exit _ffff_tttt_pppp. An EOF will also terminate the session and exit. _cccc_aaaa_ssss_eeee Toggle remote computer file name case mapping during _mmmm_gggg_eeee_tttt commands. When _cccc_aaaa_ssss_eeee is on (default is off), remote computer file names with all letters in upper case are written in the local directory with the letters mapped to lower case. _cccc_dddd _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y Change the working directory on the remote machine to _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y. _cccc_dddd_uuuu_pppp Change the remote machine working directory to the parent of the current remote machine working directory. _cccc_llll_oooo_ssss_eeee Terminate the FTP session with the remote server, and Sun Microsystems Last change: 26 Sep 1992 2 ftp(1) User Commands ftp(1) return to the command interpreter. Any defined macros are erased. _cccc_rrrr Toggle RETURN stripping during network ASCII type file retrieval. Records are denoted by a RETURN/LINEFEED sequence during network ASCII type file transfer. When _cccc_rrrr is on (the default), RETURN characters are stripped from this sequence to conform with the UNIX system sin- gle LINEFEED record delimiter. Records on non-UNIX- system remote hosts may contain single LINEFEED charac- ters; when an network ASCII type transfer is made, these LINEFEED characters may be distinguished from a record delimiter only when _cccc_rrrr is off. _dddd_eeee_llll_eeee_tttt_eeee _r_e_m_o_t_e-_f_i_l_e Delete the file _r_e_m_o_t_e-_f_i_l_e on the remote machine. _dddd_eeee_bbbb_uuuu_gggg Toggle debugging mode. When debugging is on, _ffff_tttt_pppp prints each command sent to the remote machine, preceded by the string _----_----_>>>>. _dddd_iiii_rrrr [ _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y ] [ _l_o_c_a_l-_f_i_l_e ] Print a listing of the directory contents in the direc- tory, _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y, and, optionally, placing the output in _l_o_c_a_l-_f_i_l_e. If no directory is specified, the current working directory on the remote machine is used. If no local file is specified, or _l_o_c_a_l-_f_i_l_e is _----, output is sent to the terminal. _dddd_iiii_ssss_cccc_oooo_nnnn_nnnn_eeee_cccc_tttt A synonym for _cccc_llll_oooo_ssss_eeee. _ffff_oooo_rrrr_mmmm [ _f_o_r_m_a_t-_n_a_m_e ] Set the carriage control format subtype of the representation type to _f_o_r_m_a_t-_n_a_m_e. The only valid _f_o_r_m_a_t-_n_a_m_e is _nnnn_oooo_nnnn_----_pppp_rrrr_iiii_nnnn_tttt, which corresponds to the default non-print subtype. _gggg_eeee_tttt _r_e_m_o_t_e-_f_i_l_e [ _l_o_c_a_l-_f_i_l_e ] Retrieve the _r_e_m_o_t_e-_f_i_l_e and store it on the local machine. If the local file name is not specified, it is given the same name it has on the remote machine, subject to alteration by the current _cccc_aaaa_ssss_eeee, _nnnn_tttt_rrrr_aaaa_nnnn_ssss, and _nnnn_mmmm_aaaa_pppp settings. The current settings for representation type, file structure, and transfer mode are used while transferring the file. _gggg_llll_oooo_bbbb Toggle filename expansion, or globbing, for _mmmm_dddd_eeee_llll_eeee_tttt_eeee, _mmmm_gggg_eeee_tttt and _mmmm_pppp_uuuu_tttt. If globbing is turned off, filenames are taken literally. Sun Microsystems Last change: 26 Sep 1992 3 ftp(1) User Commands ftp(1) Globbing for _mmmm_pppp_uuuu_tttt is done as in sh(1). For _mmmm_dddd_eeee_llll_eeee_tttt_eeee and _mmmm_gggg_eeee_tttt, each remote file name is expanded separately on the remote machine, and the lists are not merged. Expansion of a directory name is likely to be radically different from expansion of the name of an ordinary file: the exact result depends on the remote operating system and FTP server, and can be previewed by doing _mmmm_llll_ssss _r_e_m_o_t_e-_f_i_l_e_s _----. _mmmm_gggg_eeee_tttt and _mmmm_pppp_uuuu_tttt are not meant to transfer entire direc- tory subtrees of files. You can do this by transfer- ring a tar(1) archive of the subtree (using a represen- tation type of image as set by the _bbbb_iiii_nnnn_aaaa_rrrr_yyyy command). _hhhh_aaaa_ssss_hhhh Toggle hash-sign (_####) printing for each data block transferred. The size of a data block is 8192 bytes. _hhhh_eeee_llll_pppp [ _c_o_m_m_a_n_d ] Print an informative message about the meaning of _c_o_m_- _m_a_n_d. If no argument is given, _ffff_tttt_pppp prints a list of the known commands. _llll_cccc_dddd [ _d_i_r_e_c_t_o_r_y ] Change the working directory on the local machine. If no _d_i_r_e_c_t_o_r_y is specified, the user's home directory is used. _llll_ssss [ _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y ] [ _l_o_c_a_l-_f_i_l_e ] Print an abbreviated listing of the contents of a directory on the remote machine. If _r_e_m_o_t_e-_d_i_r_e_c_t_o_r_y is left unspecified, the current working directory is used. If no local file is specified, or if _l_o_c_a_l-_f_i_l_e is _----, the output is sent to the terminal. _mmmm_aaaa_cccc_dddd_eeee_ffff _m_a_c_r_o-_n_a_m_e Define a macro. Subsequent lines are stored as the macro _m_a_c_r_o-_n_a_m_e; a null line (consecutive NEWLINE characters in a file or RETURN characters from the ter- minal) terminates macro input mode. There is a limit of 16 macros and 4096 total characters in all defined macros. Macros remain defined until a _cccc_llll_oooo_ssss_eeee command is executed. The macro processor interprets _$$$$ and _\\\\ as special char- acters. A _$$$$ followed by a number (or numbers) is replaced by the corresponding argument on the macro invocation command line. A _$$$$ followed by an _iiii signals that macro processor that the executing macro is to be looped. On the first pass _$$$$_iiii is replaced by the first argument on the macro invocation command line, on the second pass it is replaced by the second argument, and Sun Microsystems Last change: 26 Sep 1992 4 ftp(1) User Commands ftp(1) so on. A _\\\\ followed by any character is replaced by that character. Use the _\\\\ to prevent special treatment of the _$$$$. _mmmm_dddd_eeee_llll_eeee_tttt_eeee _r_e_m_o_t_e-_f_i_l_e_s Delete the _r_e_m_o_t_e-_f_i_l_e_s on the remote machine. _mmmm_dddd_iiii_rrrr _r_e_m_o_t_e-_f_i_l_e_s _l_o_c_a_l-_f_i_l_e Like _dddd_iiii_rrrr, except multiple remote files may be speci- fied. If interactive prompting is on, _ffff_tttt_pppp will prompt the user to verify that the last argument is indeed the target local file for receiving _mmmm_dddd_iiii_rrrr output. _mmmm_gggg_eeee_tttt _r_e_m_o_t_e-_f_i_l_e_s Expand the _r_e_m_o_t_e-_f_i_l_e_s on the remote machine and do a _gggg_eeee_tttt for each file name thus produced. See _gggg_llll_oooo_bbbb for details on the filename expansion. Resulting file names will then be processed according to _cccc_aaaa_ssss_eeee, _nnnn_tttt_rrrr_aaaa_nnnn_ssss, and _nnnn_mmmm_aaaa_pppp settings. Files are transferred into the local working directory, which can be changed with _llll_cccc_dddd _d_i_r_e_c_t_o_r_y; new local directories can be created with _!!!! _mmmm_kkkk_dddd_iiii_rrrr _d_i_r_e_c_t_o_r_y. _mmmm_kkkk_dddd_iiii_rrrr _d_i_r_e_c_t_o_r_y-_n_a_m_e Make a directory on the remote machine. _mmmm_llll_ssss _r_e_m_o_t_e-_f_i_l_e_s _l_o_c_a_l-_f_i_l_e Like ls(1), except multiple remote files may be speci- fied. If interactive prompting is on, _ffff_tttt_pppp will prompt the user to verify that the last argument is indeed the target local file for receiving _mmmm_llll_ssss output. _mmmm_oooo_dddd_eeee [ _m_o_d_e-_n_a_m_e ] Set the transfer mode to _m_o_d_e-_n_a_m_e. The only valid _m_o_d_e-_n_a_m_e is _ssss_tttt_rrrr_eeee_aaaa_mmmm, which corresponds to the default stream mode. This implementation only supports _ssss_tttt_rrrr_eeee_aaaa_mmmm, and requires that it be specified. _mmmm_pppp_uuuu_tttt _l_o_c_a_l-_f_i_l_e_s Expand wild cards in the list of local files given as arguments and do a _pppp_uuuu_tttt for each file in the resulting list. See _gggg_llll_oooo_bbbb for details of filename expansion. Resulting file names will then be processed according to _nnnn_tttt_rrrr_aaaa_nnnn_ssss and _nnnn_mmmm_aaaa_pppp settings. _nnnn_mmmm_aaaa_pppp [ _i_n_p_a_t_t_e_r_n _o_u_t_p_a_t_t_e_r_n ] Set or unset the filename mapping mechanism. If no arguments are specified, the filename mapping mechanism is unset. If arguments are specified, remote filenames are mapped during _mmmm_pppp_uuuu_tttt commands and _pppp_uuuu_tttt commands issued without a specified remote target filename. If argu- ments are specified, local filenames are mapped during Sun Microsystems Last change: 26 Sep 1992 5 ftp(1) User Commands ftp(1) _mmmm_gggg_eeee_tttt commands and _gggg_eeee_tttt commands issued without a speci- fied local target filename. This command is useful when connecting to a non-UNIX- system remote host with different file naming conven- tions or practices. The mapping follows the pattern set by _i_n_p_a_t_t_e_r_n and _o_u_t_p_a_t_t_e_r_n. _i_n_p_a_t_t_e_r_n is a tem- plate for incoming filenames (which may have already been processed according to the _nnnn_tttt_rrrr_aaaa_nnnn_ssss and _cccc_aaaa_ssss_eeee set- tings). Variable templating is accomplished by includ- ing the sequences _$$$$_1111, _$$$$_2222, ..., _$$$$_9999 in _i_n_p_a_t_t_e_r_n. Use _\\\\ to prevent this special treatment of the _$$$$ character. All other characters are treated literally, and are used to determine the _nnnn_mmmm_aaaa_pppp _i_n_p_a_t_t_e_r_n variable values. For example, given _i_n_p_a_t_t_e_r_n _$$$$_1111_...._$$$$_2222 and the remote file name _mmmm_yyyy_dddd_aaaa_tttt_aaaa_...._dddd_aaaa_tttt_aaaa, _$$$$_1111 would have the value _mmmm_yyyy_dddd_aaaa_tttt_aaaa, and _$$$$_2222 would have the value _dddd_aaaa_tttt_aaaa. The _o_u_t_p_a_t_t_e_r_n determines the resulting mapped filename. The sequences _$$$$_1111, _$$$$_2222, ..., _$$$$_9999 are replaced by any value resulting from the _i_n_p_a_t_t_e_r_n template. The sequence _$$$$_0000 is replaced by the original filename. Additionally, the sequence [_s_e_q_1,_s_e_q_2] is replaced by _s_e_q_1 if _s_e_q_1 is not a null string; otherwise it is replaced by _s_e_q_2. For example, the command _nnnn_mmmm_aaaa_pppp _$$$$_1111_...._$$$$_2222_...._$$$$_3333 _[[[[_$$$$_1111_,,,,_$$$$_2222_]]]]_...._[[[[_$$$$_2222_,,,,_ffff_iiii_llll_eeee_]]]] would yield the output filename _mmmm_yyyy_ffff_iiii_llll_eeee_...._dddd_aaaa_tttt_aaaa for input filenames _mmmm_yyyy_ffff_iiii_llll_eeee_...._dddd_aaaa_tttt_aaaa and _mmmm_yyyy_ffff_iiii_llll_eeee_...._dddd_aaaa_tttt_aaaa_...._oooo_llll_dddd, _mmmm_yyyy_ffff_iiii_llll_eeee_...._ffff_iiii_llll_eeee for the input filename _mmmm_yyyy_ffff_iiii_llll_eeee, and _mmmm_yyyy_ffff_iiii_llll_eeee_...._mmmm_yyyy_ffff_iiii_llll_eeee for the input filename _...._mmmm_yyyy_ffff_iiii_llll_eeee. SPACE characters may be included in _o_u_t_p_a_t_- _t_e_r_n, as in the example _nnnn_mmmm_aaaa_pppp _$$$$_1111 _|||| _ssss_eeee_dddd _""""_ssss_//// _****_$$$$_////_////_"""" _>>>> _$$$$_1111. Use the _\\\\ character to prevent special treatment of the _$$$$, _[[[[, _]]]], and _,,,,, characters. _nnnn_tttt_rrrr_aaaa_nnnn_ssss [ _i_n_c_h_a_r_s [ _o_u_t_c_h_a_r_s ] ] Set or unset the filename character translation mechan- ism. If no arguments are specified, the filename char- acter translation mechanism is unset. If arguments are specified, characters in remote filenames are translated during _mmmm_pppp_uuuu_tttt commands and _pppp_uuuu_tttt commands issued without a specified remote target filename, and charac- ters in local filenames are translated during _mmmm_gggg_eeee_tttt com- mands and _gggg_eeee_tttt commands issued without a specified local target filename. This command is useful when connecting to a non-UNIX- system remote host with different file naming conven- tions or practices. Characters in a filename matching a character in _i_n_c_h_a_r_s are replaced with the Sun Microsystems Last change: 26 Sep 1992 6 ftp(1) User Commands ftp(1) corresponding character in _o_u_t_c_h_a_r_s. If the character's position in _i_n_c_h_a_r_s is longer than the length of _o_u_t_c_h_a_r_s, the character is deleted from the file name. _oooo_pppp_eeee_nnnn _h_o_s_t [ _p_o_r_t ] Establish a connection to the specified _h_o_s_t FTP server. An optional port number may be supplied, in which case, _ffff_tttt_pppp will attempt to contact an FTP server at that port. If the _a_u_t_o-_l_o_g_i_n option is on (default setting), _ffff_tttt_pppp will also attempt to automatically log the user in to the FTP server. _pppp_rrrr_oooo_mmmm_pppp_tttt Toggle interactive prompting. Interactive prompting occurs during multiple file transfers to allow the user to selectively retrieve or store files. By default, prompting is turned on. If prompting is turned off, any _mmmm_gggg_eeee_tttt or _mmmm_pppp_uuuu_tttt will transfer all files, and any _mmmm_dddd_eeee_llll_eeee_tttt_eeee will delete all files. _pppp_rrrr_oooo_xxxx_yyyy _f_t_p-_c_o_m_m_a_n_d Execute an FTP command on a secondary control connec- tion. This command allows simultaneous connection to two remote FTP servers for transferring files between the two servers. The first _pppp_rrrr_oooo_xxxx_yyyy command should be an _oooo_pppp_eeee_nnnn, to establish the secondary control connection. Enter the command _pppp_rrrr_oooo_xxxx_yyyy _???? to see other FTP commands executable on the secondary connection. The following commands behave differently when prefaced by _pppp_rrrr_oooo_xxxx_yyyy: _oooo_pppp_eeee_nnnn will not define new macros during the auto-login process, _cccc_llll_oooo_ssss_eeee will not erase existing macro definitions, _gggg_eeee_tttt and _mmmm_gggg_eeee_tttt transfer files from the host on the primary control connection to the host on the secondary control connection, and _pppp_uuuu_tttt, _mmmm_pppp_uuuu_tttt_dddd, and _aaaa_pppp_pppp_eeee_nnnn_dddd transfer files from the host on the secondary control connection to the host on the primary control connection. Third party file transfers depend upon support of the _PPPP_AAAA_SSSS_VVVV command by the server on the secondary control connection. _pppp_uuuu_tttt _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ] Store a local file on the remote machine. If _r_e_m_o_t_e- _f_i_l_e is left unspecified, the local file name is used after processing according to any _nnnn_tttt_rrrr_aaaa_nnnn_ssss or _nnnn_mmmm_aaaa_pppp set- tings in naming the remote file. File transfer uses the current settings for representation type, file structure, and transfer mode. Sun Microsystems Last change: 26 Sep 1992 7 ftp(1) User Commands ftp(1) _pppp_wwww_dddd Print the name of the current working directory on the remote machine. _qqqq_uuuu_iiii_tttt A synonym for _bbbb_yyyy_eeee. _qqqq_uuuu_oooo_tttt_eeee _a_r_g_1 _a_r_g_2 ... Send the arguments specified, verbatim, to the remote FTP server. A single FTP reply code is expected in return. (The _rrrr_eeee_mmmm_oooo_tttt_eeee_hhhh_eeee_llll_pppp command displays a list of valid arguments.) _qqqq_uuuu_oooo_tttt_eeee should be used only by experienced users who are familiar with the FTP protocol. _rrrr_eeee_cccc_vvvv _r_e_m_o_t_e-_f_i_l_e [ _l_o_c_a_l-_f_i_l_e] A synonym for _gggg_eeee_tttt. _rrrr_eeee_mmmm_oooo_tttt_eeee_hhhh_eeee_llll_pppp [ _c_o_m_m_a_n_d-_n_a_m_e ] Request help from the remote FTP server. If a _c_o_m_m_a_n_d-_n_a_m_e is specified it is supplied to the server as well. _rrrr_eeee_nnnn_aaaa_mmmm_eeee _f_r_o_m _t_o Rename the file _f_r_o_m on the remote machine to have the name _t_o. _rrrr_eeee_ssss_eeee_tttt Clear reply queue. This command re-synchronizes command/reply sequencing with the remote FTP server. Resynchronization may be necessary following a viola- tion of the FTP protocol by the remote server. _rrrr_mmmm_dddd_iiii_rrrr _d_i_r_e_c_t_o_r_y-_n_a_m_e Delete a directory on the remote machine. _rrrr_uuuu_nnnn_iiii_qqqq_uuuu_eeee Toggle storing of files on the local system with unique filenames. If a file already exists with a name equal to the target local filename for a _gggg_eeee_tttt or _mmmm_gggg_eeee_tttt command, a _...._1111 is appended to the name. If the resulting name matches another existing file, a _...._2222 is appended to the original name. If this process continues up to _...._9999_9999, an error message is printed, and the transfer does not take place. The generated unique filename will be reported. _rrrr_uuuu_nnnn_iiii_qqqq_uuuu_eeee will not affect local files gen- erated from a shell command. The default value is off. _ssss_eeee_nnnn_dddd _l_o_c_a_l-_f_i_l_e [ _r_e_m_o_t_e-_f_i_l_e ] A synonym for _pppp_uuuu_tttt. _ssss_eeee_nnnn_dddd_pppp_oooo_rrrr_tttt Toggle the use of _PPPP_OOOO_RRRR_TTTT commands. By default, _ffff_tttt_pppp will Sun Microsystems Last change: 26 Sep 1992 8 ftp(1) User Commands ftp(1) attempt to use a _PPPP_OOOO_RRRR_TTTT command when establishing a con- nection for each data transfer. The use of _PPPP_OOOO_RRRR_TTTT com- mands can prevent delays when performing multiple file transfers. If the _PPPP_OOOO_RRRR_TTTT command fails, _ffff_tttt_pppp will use the default data port. When the use of _PPPP_OOOO_RRRR_TTTT commands is disabled, no attempt will be made to use _PPPP_OOOO_RRRR_TTTT commands for each data transfer. This is useful when connected to certain FTP implementations that ignore _PPPP_OOOO_RRRR_TTTT com- mands but incorrectly indicate they have been accepted. _ssss_tttt_aaaa_tttt_uuuu_ssss Show the current status of _ffff_tttt_pppp. _ssss_tttt_rrrr_uuuu_cccc_tttt [ _s_t_r_u_c_t-_n_a_m_e ] Set the file structure to _s_t_r_u_c_t-_n_a_m_e. The only valid _s_t_r_u_c_t-_n_a_m_e is _ffff_iiii_llll_eeee, which corresponds to the default file structure. The implementation only supports _ffff_iiii_llll_eeee, and requires that it be specified. _ssss_uuuu_nnnn_iiii_qqqq_uuuu_eeee Toggle storing of files on remote machine under unique file names. The remote FTP server must support the _SSSS_TTTT_OOOO_UUUU command for successful completion. The remote server will report the unique name. Default value is off. _tttt_eeee_nnnn_eeee_xxxx Set the representation type to that needed to talk to TENEX machines. _tttt_rrrr_aaaa_cccc_eeee Toggle packet tracing (unimplemented). _tttt_yyyy_pppp_eeee [ _t_y_p_e-_n_a_m_e ] Set the representation type to _t_y_p_e-_n_a_m_e. The valid _t_y_p_e-_n_a_m_es are _aaaa_ssss_cccc_iiii_iiii for network ASCII, _bbbb_iiii_nnnn_aaaa_rrrr_yyyy or _iiii_mmmm_aaaa_gggg_eeee for image, and _tttt_eeee_nnnn_eeee_xxxx for local byte size with a byte size of 8 (used to talk to TENEX machines). If no type is specified, the current type is printed. The default type is network ASCII. _uuuu_ssss_eeee_rrrr _u_s_e_r-_n_a_m_e [ _p_a_s_s_w_o_r_d ] [ _a_c_c_o_u_n_t ] Identify yourself to the remote FTP server. If the password is not specified and the server requires it, _ffff_tttt_pppp will prompt the user for it (after disabling local echo). If an account field is not specified, and the FTP server requires it, the user will be prompted for it. If an account field is specified, an account com- mand will be relayed to the remote server after the login sequence is completed if the remote server did not require it for logging in. Unless _ffff_tttt_pppp is invoked with auto-login disabled, this process is done Sun Microsystems Last change: 26 Sep 1992 9 ftp(1) User Commands ftp(1) automatically on initial connection to the FTP server. _vvvv_eeee_rrrr_bbbb_oooo_ssss_eeee Toggle verbose mode. In verbose mode, all responses from the FTP server are displayed to the user. In addition, if verbose mode is on, when a file transfer completes, statistics regarding the efficiency of the transfer are reported. By default, verbose mode is on if _ffff_tttt_pppp's commands are coming from a terminal, and off otherwise. _???? [ _c_o_m_m_a_n_d ] A synonym for _hhhh_eeee_llll_pppp. Command arguments which have embedded spaces may be quoted with quote (") marks. If any command argument which is not indicated as being optional is not specified, _ffff_tttt_pppp will prompt for that argu- ment. ABORTING A FILE TRANSFER To abort a file transfer, use the terminal interrupt key. Sending transfers will be immediately halted. Receiving transfers will be halted by sending an FTP protocol _AAAA_BBBB_OOOO_RRRR command to the remote server, and discarding any further data received. The speed at which this is accomplished depends upon the remote server's support for _AAAA_BBBB_OOOO_RRRR process- ing. If the remote server does not support the _AAAA_BBBB_OOOO_RRRR com- mand, an _ffff_tttt_pppp_>>>> prompt will not appear until the remote server has completed sending the requested file. The terminal interrupt key sequence will be ignored when _ffff_tttt_pppp has completed any local processing and is awaiting a reply from the remote server. A long delay in this mode may result from the _AAAA_BBBB_OOOO_RRRR processing described above, or from unexpected behavior by the remote server, including viola- tions of the ftp protocol. If the delay results from unex- pected remote server behavior, the local _ffff_tttt_pppp program must be killed by hand. FILE NAMING CONVENTIONS Local files specified as arguments to _ffff_tttt_pppp commands are pro- cessed according to the following rules. 1) If the file name _---- is specified, the standard input (for reading) or standard output (for writing) is used. 2) If the first character of the file name is _||||, the remainder of the argument is interpreted as a shell command. _ffff_tttt_pppp then forks a shell, using popen(3S) with the argument supplied, and reads (writes) from the Sun Microsystems Last change: 26 Sep 1992 10 ftp(1) User Commands ftp(1) standard output (standard input) of that shell. If the shell command includes SPACE characters, the argument must be quoted; for example _""""_|||| _llll_ssss _----_llll_tttt_"""". A particularly useful example of this mechanism is: _""""_dddd_iiii_rrrr _|||| _mmmm_oooo_rrrr_eeee_"""". 3) Failing the above checks, if globbing is enabled, local file names are expanded according to the rules used in the sh(1); see the _gggg_llll_oooo_bbbb command. If the _ffff_tttt_pppp command expects a single local file (for example, _pppp_uuuu_tttt), only the first filename generated by the globbing operation is used. 4) For _mmmm_gggg_eeee_tttt commands and _gggg_eeee_tttt commands with unspecified local file names, the local filename is the remote filename, which may be altered by a _cccc_aaaa_ssss_eeee, _nnnn_tttt_rrrr_aaaa_nnnn_ssss, or _nnnn_mmmm_aaaa_pppp setting. The resulting filename may then be altered if _rrrr_uuuu_nnnn_iiii_qqqq_uuuu_eeee is on. 5) For _mmmm_pppp_uuuu_tttt commands and _pppp_uuuu_tttt commands with unspecified remote file names, the remote filename is the local filename, which may be altered by a _nnnn_tttt_rrrr_aaaa_nnnn_ssss or _nnnn_mmmm_aaaa_pppp set- ting. The resulting filename may then be altered by the remote server if _ssss_uuuu_nnnn_iiii_qqqq_uuuu_eeee is on. FILE TRANSFER PARAMETERS The FTP specification specifies many parameters which may affect a file transfer. The representation type may be one of network ASCII, EBCDIC, image, or local byte size with a specified byte size (for PDP-10's and PDP-20's mostly). The network ASCII and EBCDIC types have a further subtype which specifies whether verti- cal format control (NEWLINE characters, form feeds, etc.) are to be passed through (non-print), provided in TELNET format (TELNET format controls), or provided in ASA (FOR- TRAN) (carriage control (ASA)) format. _ffff_tttt_pppp supports the network ASCII (subtype non-print only) and image types, plus local byte size with a byte size of 8 for communicating with TENEX machines. The file structure may be one of _ffff_iiii_llll_eeee (no record structure), _rrrr_eeee_cccc_oooo_rrrr_dddd, or _pppp_aaaa_gggg_eeee. _ffff_tttt_pppp supports only the default value, which is _ffff_iiii_llll_eeee. The transfer mode may be one of _ssss_tttt_rrrr_eeee_aaaa_mmmm, _bbbb_llll_oooo_cccc_kkkk, or _cccc_oooo_mmmm_pppp_rrrr_eeee_ssss_ssss_eeee_dddd. _ffff_tttt_pppp supports only the default value, which is _ssss_tttt_rrrr_eeee_aaaa_mmmm. SEE ALSO ls(1), rcp(1), sh(1), tar(1), ftpd(1M), popen(3S), netrc(4) Sun Microsystems Last change: 26 Sep 1992 11 ftp(1) User Commands ftp(1) NOTES Correct execution of many commands depends upon proper behavior by the remote server. An error in the treatment of carriage returns in the 4.2 BSD code handling transfers with a representation type of net- work ASCII has been corrected. This correction may result in incorrect transfers of binary files to and from 4.2 BSD servers using a representation type of network ASCII. Avoid this problem by using the image type. Sun Microsystems Last change: 26 Sep 1992 12