bsd man page for cp

Query: cp

OS: bsd

Section: 1

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

CP(1)							      General Commands Manual							     CP(1)

NAME
cp - copy
SYNOPSIS
cp [ -ip ] file1 file2 cp [ -ipr ] file ... directory
DESCRIPTION
File1 is copied onto file2. By default, the mode and owner of file2 are preserved if it already existed; otherwise the mode of the source file modified by the current umask(2) is used. The -p option causes cp to attempt to preserve (duplicate) in its copies the modification times and modes of the source files, ignoring the present umask. In the second form, one or more files are copied into the directory with their original file-names. Cp refuses to copy a file onto itself. If the -i option is specified, cp will prompt the user with the name of the file whenever the copy will cause an old file to be overwrit- ten. An answer of 'y' will cause cp to continue. Any other answer will prevent it from overwriting the file. If the -r option is specified and any of the source files are directories, cp copies each subtree rooted at that name; in this case the destination must be a directory.
SEE ALSO
cat(1), mv(1), rcp(1C) 4th Berkeley Distribution June 8, 1985 CP(1)
Related Man Pages
cp(1) - bsd
krb5-rcp(1) - debian
rcp(1) - centos
efi_cp(1m) - hpux
rcp(1) - freebsd
Similar Topics in the Unix Linux Community
Lots of file copyingand renaming?
Read each word from File1 and search each file in file2
search for matching value between lists
Inserting file after specific line in another file
How to deal with replaced files?