cp.md 633 字节
Newer Older
G
gongweibao 已提交
1
# Name  
G
gongweibao 已提交
2
cp - copy files and directories
G
gongweibao 已提交
3 4

# Synopsis
G
gongweibao 已提交
5
` cp [OPTION]...
G
gongweibao 已提交
6 7 8 9
<LocalPath> <PFSPath> or <PFSPath> <LocalPath> or <PFSPath> <PFSPath>`

# Description

G
gongweibao 已提交
10
```		
G
gongweibao 已提交
11 12 13 14 15
--preserve--links
   Reserve links when copy links
   
-R, -r, --recursive
   Copy directories recursively
G
gongweibao 已提交
16 17 18
```

# Examples
G
gongweibao 已提交
19
- The following command copies a single file to pfs
G
gongweibao 已提交
20 21

```
G
gongweibao 已提交
22
paddle pfs cp ./text1.txt pfs://mydir/text1.txt
G
gongweibao 已提交
23 24 25 26 27 28 29 30
```

Output

```
upload ./text1.txt to pfs://mydir/text1.txt
```

G
gongweibao 已提交
31
- The following command copies pfs file to a local file
G
gongweibao 已提交
32 33

```
G
gongweibao 已提交
34
paddle pfs cp pfs://mydir/text1.txt ./text1.txt
G
gongweibao 已提交
35 36 37 38 39 40 41
```

Output

```
download pfs://mydir/text1.txt to ./text1.txt
```