view docs/nitros9guide/copy.refentry @ 2322:61fb37b19edd

Edition #3 - for vtio instead of cc3io Willard Goosey
author aaronwolfe
date Mon, 11 Jan 2010 04:20:41 +0000
parents b00cf13c9f61
children
line wrap: on
line source

<refentry id="copy">
<refnamediv>
<refname>COPY</refname>
<refpurpose>Copy data from one path to another</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>copy</command>
<arg choice="plain">
  <replaceable>path</replaceable>
</arg>
<arg choice="plain">
  <replaceable>path</replaceable>
</arg>
<arg choice="opt">
  <option>-a -p -r -s -w=&lt;dir&gt; -x</option>
</arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1><title>Description</title>
<para>
This command copies data from the first file or device specified to
the second. The first file or device must already exist, the
second file is automatically created if the second path is a file on
a mass storage device. Data may be of any type and is NOT modified
in any way as it is copied.
</para>
<para>
Data is transferred using large block reads and writes until end-of-file
occurs on the input path. Because block transfers are used,
normal output processing of data does not occur on character-oriented
devices such as terminals, printers, etc. Therefore, the
<command>list</command> command is preferred over <command>copy</command> when a file consisting of text
is to be sent to a terminal or printer.
</para>
<para>
The &quot;-a&quot; option will force <command>copy</command> to abort its operation if it receives an error during the copy of a file.  If this option is not specified, copy will continue to attempt to copy any other files specified on its command line.
</para>
<para>
The &quot;-p&quot; option prevents copy from echoing the filenames that it is copying (used in conjunction with -w).
</para>
<para>
The &quot;-r&quot; option allows copy to rewrite the destination file if it matches the name of a source file that is being copied.  If this option is not used, then the user will be prompted to overwrite a file of the same name.
</para>
<para>
The &quot;-s&quot; option causes <command>copy</command> to perform a single drive copy
operation. The second pathlist must be a full pathlist if &quot;-s
appears. <command>Copy</command> will read a portion of the source disk into memory,
you remove the source disk and place the destination disk into the
drive, enter a &quot;C&quot; whereupon <command>copy</command> writes on the destination disk,
this process continues until the entire file is copied.
</para>
<para>
The &quot;-w=&lt;dir&gt;&quot; option allows you to specify a destination directory where all the files will be copied to.  Use this option when specifing multiple filenames on the command line.
</para>
<para>
The &quot;-x=&lt;dir&gt;&quot; will cause the files to be copied to an execution-relative directory.
</para>
<para>
Using the shell's alternate memory size modifier to give a large
memory space will increase speed and reduce the number of media
exchanges required for single drive copies.
</para>
</refsect1>
<refsect1><title>Examples</title>
<screen>
copy file1 file2 #15k           (copies file1 to file2)

copy /d1/joe/news /D0/peter/messages

copy /d1/joe/news /d1/joe/weather -w=/D0/peter (where /D0/peter is a directory)

copy /term /p                   (copies console to printer)

copy /d0/cat /d0/animals/cat -s #32k
Ready DESTINATION, hit C to continue: c
Ready SOURCE, hit C to continue: c
Ready DESTINATION, hit C to continue:c
</screen>
</refsect1>
</refentry>