2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: cp
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Copy files.
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
```> cp (source) (destination) --recursive```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Parameters
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `source`: the place to copy from
|
|
|
|
- `destination`: the place to copy to
|
|
|
|
- `--recursive`: copy recursively through subdirectories
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-20 01:13:33 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Copy myfile to dir_b
|
|
|
|
```shell
|
|
|
|
> cp myfile dir_b
|
|
|
|
```
|
|
|
|
|
|
|
|
Recursively copy dir_a to dir_b
|
|
|
|
```shell
|
|
|
|
> cp -r dir_a dir_b
|
|
|
|
```
|
|
|
|
|