TEXT   92

cp.txt

Guest on 1st August 2021 05:55:18 PM

  1.  
  2.  
  3. NAME
  4.        cp - copy files
  5.  
  6.  
  7.  
  8. SYNOPSIS
  9.        cp [options] source dest
  10.        cp [options] source... directory
  11.        Options:
  12.        [-abdfilprsuvxPR]  [-S backup-suffix] [-V {numbered,exist-
  13.        ing,simple}]   [--backup]   [--no-dereference]   [--force]
  14.        [--interactive] [--one-file-system] [--preserve] [--recur-
  15.        sive]  [--update]   [--verbose]   [--suffix=backup-suffix]
  16.        [--version-control={numbered,existing,simple}] [--archive]
  17.        [--parents] [--link]  [--symbolic-link]  [--help]  [--ver-
  18.        sion]
  19.  
  20.  
  21.  
  22. DESCRIPTION
  23.        This  manual page documents the GNU version of cp.  If the
  24.        last argument names an existing directory, cp copies  each
  25.        other  given  file  into a file with the same name in that
  26.        directory.  Otherwise, if only two  files  are  given,  it
  27.        copies  the  first onto the second.  It is an error if the
  28.        last argument is not a directory and more than  two  files
  29.        are given.  By default, it does not copy directories.
  30.  
  31.    OPTIONS
  32.        -a, --archive
  33.               Preserve  as  much as possible of the structure and
  34.               attributes of the original files in the copy.   The
  35.               same as -dpR.
  36.  
  37.        -b, --backup
  38.               Make  backups  of  files that are about to be over-
  39.               written or removed.
  40.  
  41.        -d, --no-dereference
  42.               Copy symbolic links as symbolic links  rather  than
  43.               copying  the files that they point to, and preserve
  44.               hard link relationships between source files in the
  45.               copies.
  46.  
  47.        -f, --force
  48.               Remove existing destination files.
  49.  
  50.        -i, --interactive
  51.               Prompt whether to overwrite existing regular desti-
  52.               nation files.
  53.  
  54.        -l, --link
  55.               Make hard links instead of copies  of  non-directo-
  56.               ries.
  57.  
  58.        -P, --parents
  59.               Form the name of each destination file by appending
  60.               to the target directory a slash and  the  specified
  61.               name  of  the source file.  The last argument given
  62.               to cp must be the name of  an  existing  directory.
  63.               For example, the command `cp --parents a/b/c exist-
  64.               ing_dir'  copies   the   file   a/b/c   to   exist-
  65.               ing_dir/a/b/c,  creating  any  missing intermediate
  66.               directories.
  67.  
  68.        -p, --preserve
  69.               Preserve the original files' owner, group,  permis-
  70.               sions, and timestamps.
  71.  
  72.        -r     Copy  directories  recursively,  copying  all  non-
  73.               directories as if they were regular files.
  74.  
  75.        -s, --symbolic-link
  76.               Make symbolic links instead of copies of non-direc-
  77.               tories.   All  source  filenames  must  be absolute
  78.               (starting with `/') unless  the  destination  files
  79.               are in the current directory.  This option produces
  80.               an error message on systems  that  do  not  support
  81.               symbolic links.
  82.  
  83.        -u, --update
  84.               Do  not  copy  a  nondirectory that has an existing
  85.               destination with the  same  or  newer  modification
  86.               time.
  87.  
  88.        -v, --verbose
  89.               Print the name of each file before copying it.
  90.  
  91.        -x, --one-file-system
  92.               Skip  subdirectories that are on different filesys-
  93.               tems from the one that the copy started on.
  94.  
  95.        -R, --recursive
  96.               Copy directories recursively.
  97.  
  98.        --help Print a usage message on standard output  and  exit
  99.               successfully.
  100.  
  101.        --version
  102.               Print  version  information on standard output then
  103.               exit successfully.
  104.  
  105.        -S, --suffix backup-suffix
  106.               The suffix used for making simple backup files  can
  107.               be  set  with  the SIMPLE_BACKUP_SUFFIX environment
  108.               variable, which can be overridden by  this  option.
  109.               If  neither  of those is given, the default is `~',
  110.               as it is in Emacs.
  111.  
  112.        -V, --version-control {numbered,existing,simple}
  113.               The type of backups made can be set with  the  VER-
  114.               SION_CONTROL  environment  variable,  which  can be
  115.               overridden by this option.  If  VERSION_CONTROL  is
  116.               not  set  and this option is not given, the default
  117.               backup type is `existing'.  The value of  the  VER-
  118.               SION_CONTROL  environment variable and the argument
  119.               to this option are like the GNU Emacs `version-con-
  120.               trol'  variable;  they also recognize synonyms that
  121.               are more descriptive.  The valid values are (unique
  122.               abbreviations are accepted):
  123.  
  124.               `t' or `numbered'
  125.                      Always make numbered backups.
  126.  
  127.               `nil' or `existing'
  128.                      Make  numbered backups of files that already
  129.                      have them, simple backups of the others.
  130.  
  131.               `never' or `simple'
  132.                      Always make simple backups.

Raw Paste


Login or Register to edit or fork this paste. It's free.