2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: cp
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Copy files.
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Signature
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
```> cp (source) (destination) --recursive```
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Parameters
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
- `source`: the place to copy from
|
|
|
|
- `destination`: the place to copy to
|
|
|
|
- `--recursive`: copy recursively through subdirectories
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-20 02:13:33 +01: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
|
|
|
|
```
|
|
|
|
|