NAME | SYNOPSIS | DESCRIPTION | OPTIONS | COMPATABILITY | RESTRICTIONS FOR ChorusOS | DIAGNOSTICS | ATTRIBUTES | SEE ALSO
cp is a target utility.
In the first form in the synopsis, the utility copies the contents of the source_file to the target_file. In the second form of the synopsis, the contents of each named source_file are copied to the destination directory. The names of the files themselves are not changed. If cp detects an attempt to copy a file to itself, the copy will fail.
The following options are available:
If source_file designates a directory, cp copies the directory and the entire subtree connected at that point. This option allows cp to create special files rather than copying them as normal files. The directories created are identical to the corresponding source directory.
When the -R option is used alone, symbolic links are copied, rather than followed.
If the -R option is specified, symbolic links are followed.
If the -R option is specified, symbolic links are followed.
If the -R option is specified, symbolic links are not followed.
Removes each existing destination pathname and creates a new file, without prompting for confirmation, regardless of the permissions.
Causes cp to write a prompt to the standard error output before copying a file that would overwrite an existing file. If the response from the standard input begins with the character "y", the file copy is attempted.
This option is present, but does nothing.
Older versions of the cp utility had an -r option. This implementation supports that option. However, use of this option is strongly discouraged as it does not copy FIFOs and special files correctly.
In ChorusOS, cp will NOT preserve file attributes such as modification time, access time, file flags, file mode, user ID, and group ID. Although the -p option is present, it therefore does nothing. Only file modes will be preserved (this may depend on the underlying file system).
In the second form shown in the synopsis, directory must exist, unless there is only one named source_file that is a directory and the -R flag is specified.
Appropriate permissions are required for file creation or overwriting.
If successful, an exit status of 0 is returned, otherwise, a positive exit status is returned.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | COMPATABILITY | RESTRICTIONS FOR ChorusOS | DIAGNOSTICS | ATTRIBUTES | SEE ALSO