2014-01-28 10:53:43 +01:00
|
|
|
# cp
|
|
|
|
|
|
|
|
> Copy files
|
|
|
|
|
|
|
|
- Copy files in arbitrary locations
|
|
|
|
|
|
|
|
`cp {{/path/to/original}} {{/path/to/copy}}`
|
|
|
|
|
|
|
|
- Copy a file to a parent directory
|
|
|
|
|
2015-12-29 03:11:10 +01:00
|
|
|
`cp {{/path/to/original}} ../{{path/to/copy}}`
|
2014-01-28 10:53:43 +01:00
|
|
|
|
2015-12-29 03:11:10 +01:00
|
|
|
- Copy directories recursive using the option -r
|
2014-01-28 10:53:43 +01:00
|
|
|
|
|
|
|
`cp -r {{/path/to/original}} {{/path/to/copy}}`
|
2015-12-29 03:11:10 +01:00
|
|
|
|
|
|
|
- Show files as they are copied
|
|
|
|
|
2014-02-11 00:44:02 +01:00
|
|
|
`cp -vr {{/path/to/original}} {{/path/to/copy}}`
|
2014-01-28 10:53:43 +01:00
|
|
|
|
2015-12-29 03:11:10 +01:00
|
|
|
- Make a copy of a file, adding an extension
|
|
|
|
|
|
|
|
`cp {{file.html}}{,.backup}`
|
|
|
|
|
|
|
|
- Make a copy of a file, changing the extension
|
2014-01-28 10:53:43 +01:00
|
|
|
|
2015-12-29 03:11:10 +01:00
|
|
|
`cp {{file.}}{html,backup}`
|