1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 05:17:58 +01:00
tldr/pages/common/cp.md
Bo-Yi Wu c431dffe85 Fix file format for cp command. ref: #402
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2015-12-29 15:11:05 +08:00

523 B

cp

Copy files

  • Copy files in arbitrary locations

cp {{/path/to/original}} {{/path/to/copy}}

  • Copy a file to a parent directory

cp {{/path/to/original}} ../{{path/to/copy}}

  • Copy directories recursive using the option -r

cp -r {{/path/to/original}} {{/path/to/copy}}

  • Show files as they are copied

cp -vr {{/path/to/original}} {{/path/to/copy}}

  • Make a copy of a file, adding an extension

cp {{file.html}}{,.backup}

  • Make a copy of a file, changing the extension

cp {{file.}}{html,backup}