1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 06:57:55 +01:00
tldr/pages/common/cp.md
2014-03-04 23:28:29 +11:00

513 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. Optionally showing files as they are copied.

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

  • Make a copy of a file adding and extension or changing an extension

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