COPY(I)                            02/13/76                            COPY(I)

NAME
	copy


SYNOPSIS
	copy [-a] [-l] [-n] [-o] [-r] [-ad] [-v] sources destination


DESCRIPTION

	   The purpose of the copy command is to enable a UNIX user to copy
	contents of directories to another directory.  It is possible to
	copy whole file systems since directories are made when needed.

	   The contents of the source directories are copied to the
	destination directory.  If files, directories, or special files
	do not exist at the destination, then they are created with the
	same mode or flags of the source.  Also super user may set their
	owner and group.  The owner and mode will not be changed if the
	destination file exists.  Note that there may be more than one
	source directory.  If so, then the effect is the same as if the
	command had been issued each with only one source.

	   All of the flags in the above synopsis are optional, and those
	that are used may appear in any order even after the other arguments.
	The arguments are:


	-a      Asks the user before attempting a copy.  If the
		response does not begin with a 'y', then a copy will
		not be done.  This option also sets the "-ad" flag.

	-l      Uses links instead whenever they can be used. Otherwise
		a copy is done.  Note that links are never done for
		special files or directories.

	-n      Requires the destination file to be new.  If not, then
		the copy command will not change the destination file.
		Of course the "-n" flag is meaningless for directories.
		For special files a "-n" flag is assumed. (i.e. the
		destination of a special file must not exist.)

	-o      Only the super user may set this option.  If set then
		every file copied will have its owner and group set to
		those of the source.  If not set, then the owner will be
		that of the user who invoked the program.

	-r      If set, then every directory is recursively examined as
		it is encountered. If not set then any directories
		that are found will be ignored.

	-ad     Asks the user whether a "-r" flag applies when a
		directory is discovered.  If the answer does not begin
		with a 'y', then the directory will be ignored.

	-v      If the verbose option is set, then all kinds of messages
		will be printed that reveal what the program is doing.

	source
		This may be a file, directory or special file.  It must
		exist.  If it is not a directory, then the results of
		the command will be the same as for the cp command.

	destination
		The destination must be either a file or directory
		different from the source.  If the source and destination
		are anything but directories, then copy will act just
		like a cp command.  If both are directories, then copy
		will copy each file into the destination directory
		according to the flags that have been set. The default
		(without flags) is to silently copy as stated above.

DIAGNOSTICS
	Should be self-explanatory

AUTHOR
	Keith H Davis
