cp − copy files and/or directories
% cp
[−fipv] source_file target_file
% cp [−fipv] source... target_dir
The cp utility copies the source files/directories to the target. If the target is a file you may only specify one file as the source. cp will not copy a file onto itself.
|
• |
−f − force copy if possible (DEFAULT) |
|||
|
• |
−i − prompt for confirmation whenever the copy would overwrite an existing target. |
|||
|
• |
−p − preserve source file attributes (like modDate) as much as possible onto the target. |
|||
|
• |
−v − verbose. Echo "cp source target" before copy is done. |
Specifying both −f and −i options is not considered an error. The −f option will override the −i option.
cp has no known bugs, but be aware that the current copy mode is binary mode.
|
• |
0 − All sources were copied successfully. |
|||
|
• |
1 − There was error |
brian d foy, <[email protected]>
Copyright © 2023 brian d foy. All rights reserved.
You may use this program under the terms of the Artistic License 2.0.