home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 Shareware (Platinum Edition) / QUEPLAT95.ISO / files / inteutil / rcprsh32 / rcp.doc < prev    next >
Encoding:
Text File  |  1995-06-27  |  17.6 KB  |  440 lines

  1. Winsock RCP for Win32                              Version 1.7
  2. Copyright 1994 Denicomp Systems
  3. All Rights Reserved
  4.  
  5.  
  6. DESCRIPTION
  7. -----------
  8.  
  9. Winsock RCP ("Remote Copy") for Win32 copies files between a PC and a remote
  10. host or between two remote hosts.  It is similar to the Unix utility of the
  11. same name.
  12.  
  13. There are two versions of Winsock RCP included: a "console" version that is
  14. well-suited for use from the Command Prompt (named "RCP") and a windowing
  15. version that displays output in a window, allowing you to use the scroll bars
  16. to review the output, cut/paste it, or save it to a file.  The windowing
  17. version is named "WRCP".
  18.  
  19. The "remote host" must be a system running the rshd ("remote shell daemon")
  20. server.  This can be a Unix system or a Windows-based PC running Denicomp
  21. Systems' Winsock RSHD.
  22.  
  23. Please note that if you are using Windows NT, it includes rexec.  Since the
  24. rexec included in this packages has the same name, you must be sure to put
  25. the directory that contains Winsock REXEC at the beginning of your PATH
  26. environment variable (or rename NT's rexec command).
  27.  
  28.  
  29. REQUIREMENTS
  30. ------------
  31.  
  32. Winsock RCP requires a PC running Windows NT, Windows 95, or other Windows
  33. operating system that supports WSOCK32.DLL, and a connection via TCP/IP to
  34. a host running the rshd server.
  35.  
  36.  
  37. SYNTAX
  38. ------
  39.  
  40. Console Version:
  41.  
  42.  rcp [-abcdhfmprvw] [[User@][Host:]]{File|Dir} ... [[User@][Host:]]{File|[Dir]}
  43.  
  44. Windowing Version:
  45.  
  46.  wrcp [-abcdfprw] [[User@][Host:]]{File|Dir} ... [[User@][Host:]]{File|[Dir]}
  47.  
  48.  
  49. PARAMETERS
  50. ----------
  51.  
  52. User@   (optional)  Specifies the user name to be used at the remote
  53.         host.  If this prefixes the Host: parameter, this user name
  54.         overrides the name of the user currently logged in.
  55.  
  56. Host:   Specifies the host name of the remote host.  This is not
  57.         required if the file or directory referenced is on the local system.
  58.         This host must be a system running the rshd server process.
  59.  
  60. File    Specifies the filename of the source or destination file.  You
  61.         may use wildcard characters to copy multiple source files.  You
  62.         may also specify multiple source files individually by separating
  63.         the names with spaces.  If the filename includes embedded spaces,
  64.         you must enclose it in double quotes.
  65.  
  66. Dir     Specifies the name of the source or destination directory.
  67.         
  68.  
  69.  
  70. HOST NAMES
  71. ----------
  72.  
  73. The Host: parameter is required for either the source file/directory or
  74. the destination file/directory.  Copying between two remote hosts is
  75. permitted by specifying a Host: for both the source and destination.
  76.  
  77. If a remote host name is not specified for either the source or the
  78. destination, you will receive an error.  Use the COPY command instead.
  79. You should not use the Host: parameter when referencing local files.
  80.  
  81. The local user name determines the file access privileges permitted
  82. at the remote host.  This name also determines the ownership and
  83. access modes of the destination file or files.
  84.  
  85. If the Host is prefixed by the User@ parameter, that name is used as the
  86. user name at the remote host.  If the User@ parameter is not used, the
  87. local user name is used at the remote host.
  88.  
  89.  
  90. USER NAMES
  91. ----------
  92.  
  93. The local user name is normally the name you used when logging in to
  94. Windows NT or Windows 95.  For example, if you logged in to Windows as
  95. the user "joed", Winsock RCP will use "joed" as the user name at the remote
  96. host.  Winsock RCP will always convert this name to all lowercase characters.
  97.  
  98. To maintain some compatibility with the 16-bit version, Winsock RCP will
  99. also continue to look at the file WIN.INI in the Windows directory
  100. (e.g. \WINNT35 or \WINDOWS) for an alternate user name to use as the local
  101. user name.
  102.   
  103. If WIN.INI contains a section named "[RCP]" and contains an entry named
  104. "User" in that section, the name specified there will be used as the local
  105. user name.  For example, WIN.INI might contain:
  106.  
  107.      [RCP]
  108.      User=joe
  109.  
  110. If this appeared in WIN.INI, the local user name would be "joe" and
  111. Winsock RCP would use this name at the remote host.
  112.  
  113. To support multiple users, Winsock RCP will also look for a section named
  114. "[RCP-user]" in WIN.INI first for an alternate user name, where the "user"
  115. in the section name is the name used to log in to Windows NT/95.  Winsock RCP
  116. will look at this section first; if it does not exist, it will then look
  117. at the "[RCP]" section (without a user name).
  118.  
  119. For example, if "Mary Jones" and "John Smith" are both users on the Windows
  120. PC, but their user names at the remote host are "mary" and "john" respectively,
  121. WIN.INI might look like this:
  122.  
  123.      [RCP-John Smith]
  124.      User=john
  125.  
  126.      [RCP-Mary Jones]
  127.      User=mary
  128.  
  129. When the Windows user "John Smith" uses Winsock RCP, "john" will be used at
  130. the remote host.  When the Windows user "Mary Jones" uses it, "mary" will be
  131. used instead.
  132.  
  133. Please note that the use of WIN.INI is supported only to maintain some
  134. compatibility with the 16-bit version of Winsock RCP.  It is highly recommended
  135. that you maintain the same user names across your systems.
  136.  
  137.  
  138. FILE NAMES
  139. ----------
  140.  
  141. If a full directory path is not specified for a remote host, the path
  142. begins at the user's home directory.  That is, if the file/directory
  143. name specified after the Host: parameter does not begin with a slash (/),
  144. it is assumed to reference a file/directory in the user's home directory.
  145.  
  146. For example, the file "joe@remhost:file.txt" refers to the file "file.txt"
  147. in the home directory of the user "joe" on the host "remhost".
  148.  
  149. Filenames may contain either slashes (/) or backslashes (\) as directory
  150. separators, for either the host file/directory or file/directories on the
  151. PC.  They will be converted to the appropriate separator.
  152.  
  153. You can copy multiple files by using wildcard characters, such as * or ?.
  154.  
  155. You can also copy multiple source files by separating them with spaces.
  156. If the source files reside on the remote host, you must specify the Host:
  157. (and optionally the User@) parameter for each file.
  158.  
  159. If you copy multiple source files with wildcard characters or by specifying
  160. individual filenames, the destination must be a directory.
  161.  
  162. Note that a colon (:) terminates the host name.  This causes a problem
  163. when filenames on the PC require a drive letter (e.g. A:).  If a file
  164. name specification begins with one character between A and Z and is
  165. followed by a colon (:), Winsock RCP will interpret this as a drive letter
  166. instead of a host name.  This means that Winsock RCP cannot handle one
  167. character host names.
  168.  
  169. The destination cannot contain only a drive specification (e.g. A:).  It
  170. must also include a filename or a directory name.  If the destination is
  171. the current directory on the drive, use "." (e.g. A:.).
  172.  
  173.  
  174. COMMAND LINE OPTIONS
  175. --------------------
  176.  
  177. -a    ASCII conversion.  For file(s) transferred to the remote host, all
  178.       sequences of CR/NL (ASCII 13/10) will be converted to NL (ASCII 10).
  179.       This is the standard Unix text file format.  For file(s) transferred
  180.       from the remote host to the PC, a CR (ASCII 13) will be added before
  181.       every NL (ASCII 10) if that NL is not already preceeded by a CR.  This
  182.       is the standard MS-DOS text file format.  Without the -a option, files
  183.       are transferred with no translation.
  184.  
  185. -b    Binary transfer.  File(s) are transferred with no modifications.  This
  186.       is the default, so this option is not necessary if you want a binary
  187.       transfer.  It is provided for command line compatibility with other
  188.       RCP commands from other vendors.
  189.  
  190. -c    Preserve the case of filenames copied using the recursive option (-r)
  191.       or wildcards.  By default, all filenames are converted to lowercase
  192.       characters before being sent to the remote host.  This is normally
  193.       useful, especially when copying to case-sensitive systems, such as Unix.
  194.  
  195.       However, since Windows NT and Windows 95 can store filenames in mixed
  196.       case (even though the file system is not case senstive), you can use this
  197.       option to preserve the case of the names as they appear in the Windows
  198.       directory.
  199.  
  200.       Note that this ONLY affects recursive copies and wildcard copies.  If
  201.       you copy individual files by specifying their names on the command line,
  202.       the case that you use on the command line will be used at the remote
  203.       host.  For example:
  204.  
  205.             rcp xyz unix:/tmp
  206.  
  207.       Will create the file "/tmp/xyz" on the "unix" host.  The command:
  208.  
  209.             rcp XYZ unix:/tmp
  210.  
  211.       Will create the file "/tmp/XYZ" on the "unix" host.  Note that under
  212.       Windows NT and Windows 95, "xyz" and "XYZ" represent the SAME file.
  213.       However, under Unix, these are two different filenames.
  214.  
  215. -d    Ignore directories in wildcards.  When using wildcards to copy multiple
  216.       files, normally RCP will attempt to copy any directories that match
  217.       the wildcard pattern.  If you are not using the recursive copy option
  218.       (-r), you will receive errors on the directory names matched.  This
  219.       option excludes the directories when matched and you will not receive
  220.       the errors.
  221.  
  222. -f    Copy hidden files.  Normally, wildcard patterns and recurive copies
  223.       to not include files with the "hidden" attribute.  If you specify this
  224.       option, wildcard copies and recursive copies will copy hidden files.
  225.  
  226. -h    Run Hidden.  Like -m, but the window will be completely hidden.  Use
  227.       with caution, since hidden windows cannot be accessed using the
  228.       Task Manager, so you cannot use it to manually stop a transfer.
  229.  
  230.       ** This option is only available in the windowing version (wrcp) **
  231.  
  232. -m    Run Minimized.  Normally, Winsock RCP will display a window showing
  233.       progress and any possible error messages.  With -m, Winsock RCP will
  234.       only display a minimized icon while running.  This is useful for
  235.       software developers who wish to call Winsock RCP transparently from
  236.       within their software.
  237.  
  238.       ** This option is only available in the windowing version (wrcp) **
  239.  
  240. -p    Preserve access and modification times.  Normally, when you copy a file
  241.       to the local system, the files are created with access and modification
  242.       times of the current date and time.  This option will preserve the access
  243.       and modification time of the file as it was on the remote host.
  244.  
  245. -r    Recursively copies, for directories only, each file and
  246.       subdirectory in the source directory into the destination directory.
  247.  
  248. -v    Verbose.  In the Console version (rcp), this will display the name
  249.       of each file as it is copied.  Normally, this does not occur.
  250.  
  251.       In the windowing version (wrcp), the names of the files display in the
  252.       window automatically, so this option is not necessary, although
  253.       specifying it will not cause an error.
  254.  
  255. -w    Wait at the end of the command.
  256.  
  257.       In the Console version (rcp), it will wait for you to press the Return
  258.       key after the file(s) are copied so you can view the list of files
  259.       copied and any error messages from the remote host.
  260.  
  261.       In the windowing version (wrcp), it will wait for you to close the RCP
  262.       window (using File/Exit from the menu, for example).   If you are
  263.       copying multiple files and the list scrolls the window, you can
  264.       use the scrollbars to review the scrolled information.  You can also
  265.       cut/paste information into other windows or save the information in
  266.       the window to a file.
  267.  
  268.  
  269. NOTES FOR OPTIONS
  270. -----------------
  271.  
  272. Specify all options separately; do not combine options.  For example, do not use
  273. "-amw"; use "-a -m -w" instead.
  274.  
  275. The -a option translates the file regardless of its actual contents.  For
  276. example, if you transfer a non-text file using -a, it will be modified as
  277. if it were a text file.  The resulting file will most likely be unusable.
  278.  
  279. If you use the -a option and you transfer multiple files, all files will be
  280. translated as ASCII files.
  281.  
  282. Using the -a option to transfer files TO the remote host will slow the operation
  283. of Winsock RCP somewhat because it must read each file twice.  It reads the
  284. file once to calculate the new translated file size, then reads it again to
  285. transfer the data.  This is because the RCP protocol requires that the exact
  286. file size be transmitted before the actual data in the file is sent.  Without
  287. the -a option, the file size can be found by examining the file's directory
  288. entry, but with the -a, the file's contents must be examined to determine the
  289. size after CR/NL combinations are replaced with NL.
  290.  
  291. The -a option will also slow Winsock RCP when transferring files FROM the
  292. remote host, but only slightly.
  293.  
  294. If transmission speed is critical, consider using utilities to translate the
  295. text files after they are transferred.
  296.  
  297.  
  298. UNIX SECURITY
  299. -------------
  300.  
  301. If the remote host is running the Unix operating system, it allows
  302. access if one of the following conditions is satisfied:
  303.   
  304.   * The name of the local host (your PC) is listed in the /etc/hosts file
  305.     on the remote host (Unix) with the proper IP address and as an equivalent
  306.     host in the /etc/hosts.equiv file on the remote host.
  307.  
  308.   * If the name of your PC is not in the /etc/hosts.equiv file, the user's home
  309.     directory on the remote host must contain a .rhosts file that lists the
  310.     name of your PC and your user name.
  311.   
  312.     The .rhosts file in the user's home directory must be owned by either
  313.     the user specified or "root", and only the owner should have read and write
  314.     access.  That is, it must have permissions of 0600.
  315.  
  316.   * The user's login on the remote host does not require a password.
  317.  
  318.  
  319. ADDITIONAL OPTIONS
  320. ------------------
  321.  
  322. There are two options you can specify in the [RCP] section of WIN.INI to
  323. control the behavior of Winsock RCP.
  324.  
  325. The Minimize entry allows you to control the display of the Winsock RCP
  326. window without using the -m or -h command line options.  This is useful
  327. if you have third party software that calls Winsock RCP and you cannot
  328. modify it to run Winsock RCP minimized or hidden through command line
  329. options.
  330.  
  331. If you set Minimize to a value of 1 in WIN.INI, Winsock RCP will always
  332. run minimized.  If you set Minimize to a value of 2, Winsock RCP will
  333. always run hidden.
  334.  
  335. For example, to always run Winsock RCP minimized, specify in WIN.INI:
  336.  
  337.  [RCP]
  338.  User=joe
  339.  Minimize=1
  340.  
  341.  
  342. If either the -m or -h options are specified on the command line, these
  343. will override the option specified in WIN.INI.  However, there is no way
  344. to cause Winsock RCP to run with a normal window if the Minimize option
  345. is specified in WIN.INI.
  346.  
  347. The other option available is the BlockSize entry.  This specifies the number
  348. of bytes that will be read from a file and sent over the network connection or
  349. the number of bytes read from the network connection and written to a file
  350. at one time.  Note that this does NOT change any TCP/IP parameters; it is an
  351. internal buffer size only.  By default, this is set to a value of 512 bytes.
  352.  
  353. Normally, you do not need to change this option.  If you set it too high,
  354. you may receive "out of memory" errors from Winsock RCP and it may limit
  355. you to the number of recursion levels when doing recursive copies.
  356.  
  357.  
  358. NOTE:  Both of these options must be specified in the [RCP] section in
  359.        WIN.INI.  They cannot be specified by user using the [RCP-user]
  360.        section.  Therefore, if specified, they will apply to all users
  361.        logging on to the PC.
  362.  
  363.  
  364.  
  365. EXAMPLES
  366. --------
  367.  
  368. * To copy a file from the PC to a remote host, use:
  369.  
  370.           rcp localfile remhost:/u/joe
  371.  
  372.   The file localfile is copied from the PC to the remote host remhost and
  373.   placed in the directory /u/joe.
  374.  
  375.  
  376. * To copy a file from the remote host to the PC, use:
  377.  
  378.           rcp remhost:/u/joe/remfile \lists\remfile
  379.  
  380.   The file remfile is copied from the remote host remhost to the file
  381.   remfile in the directory \lists on the PC.
  382.  
  383.  
  384. * To copy a remote file from one remote host to another remote host, use: 
  385.  
  386.           rcp host1:/u/joe/xfile host2:/u/fred/yfile
  387.  
  388.   The file /u/joe/xfile on host1 is copied to the file /u/fred/yfile on
  389.   the remote host host2.
  390.  
  391.  
  392. * To copy all of the files in the directory \docs to the a remote host:
  393.  
  394.            rcp -a -w \docs\*.* remhost:/u/docs
  395.  
  396.   All of the files in \docs are copied to the directory /u/docs on the
  397.   remote host remhost.  The files are converted from the MS-DOS text file
  398.   format to the Unix text file format using the "-a" option.  As the files
  399.   are transferred, their names will display on the screen.  The "-w" option
  400.   tells Winsock RCP to wait for you to press Enter after the files are
  401.   transferred so you can examine the list.
  402.  
  403.  
  404. * To copy the file from a remote host to the diskette in drive A: on the PC:
  405.  
  406.            rcp mary@remhost:resume.doc a:.
  407.  
  408.   This will copy the file resume.doc from the user mary's home directory
  409.   (since no starting directory was given after the host) to the same
  410.   name on the diskette in drive A: on the PC.  Note the "." after the
  411.   colon of the drive letter.  This refers to the current directory on the
  412.   A: drive, since a destination filename or directory name is required.
  413.  
  414.  
  415. * To send the entire directory tree from the PC to a remote host, use:
  416.  
  417.            rcp -r \share joe@remhost:
  418.  
  419.   The directory \share is copied from the PC to the home directory of joe
  420.   on the remote host remhost.
  421.  
  422.  
  423.  
  424. NOTE: You can subsititue "wrcp" for all of the above examples if you wish
  425.       to use the windowing version of Winsock RCP.
  426.  
  427.  
  428. SUPPORT
  429. -------
  430.  
  431. Support is available via U.S. Mail and Compuserve/Internet.
  432.  
  433. Denicomp Systems
  434. P.O. Box 731
  435. Exton, PA  19341
  436.  
  437. Compuserve: 71612,2333
  438. Internet:   71612.2333@compuserve.com
  439.  
  440.