Seth Woolley's Man Viewer

cp(1) - cp, cp - copy files and directories - man 1 cp

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

CP(1)                                 FSF                                CP(1)

       cp - copy files and directories

       cp [OPTION]... SOURCE DEST
       cp [OPTION]... --target-directory=DIRECTORY SOURCE...

       Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

       -a, --archive
              same as -dpR

              make a backup of each existing destination file(1,n)

       -b     like --backup but does not accept(2,8) an argument

       -d, --no-dereference
              never follow symbolic links

       -f, --force
              if(3,n)  an existing destination file(1,n) cannot be opened, remove it and
              try again

       -i, --interactive
              prompt before overwrite

       -H     follow command-line symbolic links

       -l, --link
              link(1,2) files instead of copying

       -L, --dereference
              always follow symbolic links

       -p, --preserve
              preserve file(1,n) attributes if(3,n) possible

              append source path to DIRECTORY

       -P     same as `--parents' for now; soon to  change  to  `--no-derefer-
              ence' to conform to POSIX

       -r     copy  recursively,  non-directories  as  files  WARNING:  use -R
              instead  when  you  might  copy  special  files  like  FIFOs  or

              remove  each existing destination file(1,n) before attempting to open(2,3,n)
              it (contrast with --force)

              control creation of sparse files

       -R, --recursive
              copy directories recursively

       --strip-trailing-slashes remove any trailing slashes from each SOURCE

       -s, --symbolic-link
              make symbolic links instead of copying

       -S, --suffix=SUFFIX
              override the usual backup suffix

              move(3x,7,3x curs_move) all SOURCE arguments into DIRECTORY

       -u, --update
              copy only when the SOURCE file(1,n) is  newer  than  the  destination
              file(1,n) or when the destination file(1,n) is missing

       -v, --verbose
              explain what is being done

       -x, --one-file-system
              stay on this file(1,n) system

       --help display this help and exit(3,n,1 builtins)

              output version(1,3,5) information and exit(3,n,1 builtins)

       By  default,  sparse SOURCE files are detected by a crude heuristic and
       the corresponding DEST file(1,n) is made sparse as well.  That is the behav-
       ior  selected  by  --sparse=auto(5,8).   Specify --sparse=always to create a
       sparse DEST file(1,n) whenever  the  SOURCE  file(1,n)  contains  a  long  enough
       sequence  of  zero  bytes.   Use  --sparse=never to inhibit creation of
       sparse files.

       The  backup  suffix  is  `~',  unless  set(7,n,1 builtins)  with   --suffix   or   SIM-
       PLE_BACKUP_SUFFIX.   The version(1,3,5) control method may be selected via the
       --backup option or through the  VERSION_CONTROL  environment  variable.
       Here are the values:

       none, off
              never make backups (even if(3,n) --backup is given)

       numbered, t
              make numbered backups

       existing, nil
              numbered if(3,n) numbered backups exist, simple otherwise

       simple, never
              always make simple backups

       As  a  special  case,  cp  makes  a backup of SOURCE when the force and
       backup options are given and SOURCE and DEST are the same name  for  an
       existing, regular file.

       Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

       Report bugs to <>.

       Copyright  2001 Free Software Foundation, Inc.
       This is free software; see the source for copying conditions.  There is
       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR

       The  full  documentation  for cp is maintained as a Texinfo manual.  If
       the info(1,5,n) and cp programs are properly installed at your site, the  com-

              info(1,5,n) cp

       should give you access(2,5) to the complete manual.

cp (fileutils) 4.1                April 2001                             CP(1)

References for this manual (incoming links)