The Unix program _r_c_p ("_remote system _co_py") copies files between networked Unix computers. Here at the ECMC, we most often employ _r_c_p to copy files back and forth between the ECMC systems and computers at other sites. Although _r_c_p also can be used to copy files between our SGI and NeXT Unix systems, this generally can be accomplished more easily by using the local scripts _e_s_m_g_e_t, _e_s_m_p_u_t, _e_s_m_g_e_t_s_f and _e_s_m_p_u_t_s_f. _m_a_n pages are available on these four scripts. For more complete details on _r_c_p, type _m_a_n _r_c_p. _I. _B_e_f_o_r_e _u_s_i_n_g _r_c_p: Before you can use _r_c_p, or any other remote system Unix command (such as _r_l_o_g_i_n or _r_s_h), you must have a file on both the local system (the computer on which you are currently logged on) and on the remote system called ._r_h_o_s_t_s A ._r_s_h_o_s_t_s file lists UIDs ("user IDs," or login names) on remote machines to which you grant permission to execute commands in your directories on this machine. => On the Sun system, your ._r_h_o_s_t_s file should include this line: lulu.esm.rochester.edu UID where _U_I_D is your login name on _l_u_l_u. => On the NeXT, your ._r_h_o_s_t_s file should include the lines: sound.esm.rochester.edu UID fury.esm.rochester.edu UID When using _r_c_p, be sure that you know: o+ your current working directory on the local system, and o+ the complete directory paths, on both the local and remote systems, from which and to which you wish to copy one or more files The home directory paths for student (non-staff) users on both the NeXT and Sun systems are: Unix files: /u/comp/UID soundfiles: /snd/UID Subdirectory names and file names are appended to the end of these home directory paths. For example, the path for a Unix file named _n_e_w_t_e_s_t_s located in your subdirectory _s_c_o_r_e_s is /u/comp/UID/scores/newtests. A soundfile called _o_b_o_e_2._s_n_d in your soundfile subdirectory _S_e_c_t_i_o_n_2 has the path /snd/UID/Section2/oboe2.snd -------------------- _I_I. _U_s_i_n_g _r_c_p: _r_c_p has two arguments: o+ the source location of the file to be copied This argument includes the _m_a_c_h_i_n_e _n_a_m_e (if not the local machine), the _d_i_r_e_c_t_o_r_y _p_a_t_h and the _f_i_l_e _n_a_m_e o+ the destination where you want to place the copy This argument includes the _m_a_c_h_i_n_e _n_a_m_e (if not the local machine), and the _d_i_r_e_c_t_o_r_y _p_a_t_h (if not your current work- ing directory on the local machine). If you wish to give the file a new name on the receiving system, include this name at the end of the directory path. (1) Copying from the local machine to the remote machine: The basic _r_c_p syntax here is: (source) destination rcp filename machine_name:directory_path or rcp directory_path/filename machine_name:directory_path Note the colon between the remote computer name and the directory path on this machine. The target directory must follow the machine game and colon with no intervening spaces. Note also that is possible to copy a file not only from your current working Unix directory, but from any directory for which you have read and execute priviledges. However, in this case you must specify the complete directory path of the file. (2) Copying from a remote machine to the local machine: (source) destination rcp machine_name:directory_path/filename . or rcp machine_name:directory_path/filename directory_path If you are copying the file to your current working direc- tory on the local machine, you can specify the destination simply with a dot, which, in Unixspeak, means "to here" (to your current working directory). If you wish to copy the file to some directory other than your current working directory on the local machine, you must replace the dot at the end of this command line with the full target directory path. To change the name of the file, include the new name after the dot or directory path. _E_x_a_m_p_l_e_s: Example 1: You are logged on to _l_u_l_u and wish to copy file _m_y_s_t_u_f_f from your current working Unix directory on _l_u_l_u to your home directory on the Sun system. The _r_c_p command line would read: rcp mystuff sound:/u/comp/UID => Note: Be careful not to overwrite an existing file of the same name on the remote system unless you really intend to do this. In the example above, if file _m_y_s_t_u_f_f already exists in your home directory on the Sun system, it will be overwritten by the version of _m_y_s_t_u_f_f on the NeXT disk. If you wish to substitute a new name for the file on the remote system, include this name at the end of the com- mand line: rcp mystuff sound:/u/comp/UID/newname Example 2: You are logged on Sun workstation _s_o_u_n_d, happily ensconced in your home Unix directory, and wish to copy A Csound orchestra file called file _x_y_l_o from your directory _i_n_s_t_r_u_m_e_n_t_s to a file also called _x_y_l_o in your directory _O_r_c_h on _l_u_l_u. Type rcp instruments/xylo lulu:/u/comp/UID/Orch If you were already in directory _i_n_s_t_r_u_m_e_n_t_s on _s_o_u_n_d, the above command would be: rcp xylo lulu:/u/comp/UID/Orch Example 3: You are logged on to _l_u_l_u, and wish to copy a soundfile from the /_s_n_d/_p_u_b soundfile directory on the Sun system to your home soundfile directory on _l_u_l_u. You might do a _c_d to your home soundfile directory _c_d /_s_n_d/_U_S_E_R_I_D and then submit the command _r_c_p _s_o_u_n_d:/_s_n_d/_p_u_b/_s_o_u_n_d_f_i_l_e__n_a_m_e . Alternatively, you could submit the following command from your home Unix directory: _r_c_p _s_o_u_n_d:/_s_n_d/_p_u_b/_s_o_u_n_d_f_i_l_e__n_a_m_e $_S_F_D_I_R The environment variable $_S_F_D_I_R is an alias that stands for your current soundfile directory on the local machine. September 9, 1998