NAME | SYNOPSIS | DESCRIPTION | 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.
For each existing destination pathname, removes it 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.
In ChorusOS, cp will NOT preserve file attributes such as modification time, access time, file flags, file mode, user ID, and group ID. Therefore, the -p option is not present. 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 which 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 | RESTRICTIONS FOR ChorusOS | DIAGNOSTICS | ATTRIBUTES | SEE ALSO