COPY(1XNX) | XENIX System Compatibility | COPY(1XNX) |
copy - (XENIX) copy groups of files
copy [-a[d]] [-nlsmorvh] source . . . [destination]
The copy command creates a copy of each source file in destination. If no destination argument is present, the current directory is used. If more than one source argument is given, destination must be an existing directory; otherwise, if destination does not exist, it is created. For a directory given as source, its contents are copied to destination, but subdirectories are normally ignored (see the -r option below). Special files are copied as such.
If a destination file exists, its content will be overwritten, but it will retain its permissions and ownership. Otherwise, files are created with the owner and group set to those of the invoking user and with the permissions of the source file (minus umask, see umask(2)).
The copy command accepts the following options, which may be given at any position regarding the file operands:
cp(1), cpio(1)
Files copied will lose all hard link connection.
In contrast to cp(1), if a directory is copied to an existing destination directory, its contents will be written directly into that directory, without a subdirectory being created. For example, if the directory source contains the files file1 and file2, the command
copy source dest
cp -r source dest
12/8/04 | Heirloom Toolchest |