2014-01-28 09:53:43 +00:00
|
|
|
# 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}}`
|
|
|
|
|
2014-02-10 23:44:02 +00:00
|
|
|
- Copy directories recursive using the option -r. Optionally showing files as they are copied.
|
2014-01-28 09:53:43 +00:00
|
|
|
|
|
|
|
`cp -r {{/path/to/original}} {{/path/to/copy}}`
|
2014-02-10 23:44:02 +00:00
|
|
|
`cp -vr {{/path/to/original}} {{/path/to/copy}}`
|
2014-01-28 09:53:43 +00:00
|
|
|
|
2015-10-22 08:31:52 +01:00
|
|
|
- Make a copy of a file adding and extension or changing an extension
|
2014-01-28 09:53:43 +00:00
|
|
|
|
2014-02-10 23:44:02 +00:00
|
|
|
`cp {{file.html}}\{,.backup\}`
|
|
|
|
`cp file.\{html,backup\}`
|