cp.md 1.1 KB
Newer Older
G
gongweibao 已提交
1
# Name  
G
gongweibao 已提交
2
cp - copy files
G
gongweibao 已提交
3 4

# Synopsis
G
gongweibao 已提交
5 6 7 8 9 10 11 12
```
cp [-r] [-f | -n] [-v] [--preserve--links] <LocalPath> <PFSPath>
cp [-r] [-f | -n] [-v] [--preserve--links] <LocalPath> ... <PFSPath>
cp [-r] [-f | -n] [-v] [--preserve--links] <PFSPath> <LocalPath> 
cp [-r] [-f | -n] [-v] [--preserve--links] <PFSPath> ... <LocalPath>
cp [-r] [-f | -n] [-v] [--preserve--links] <PFSPath> <PFSPath> 
cp [-r] [-f | -n] [-v] [--preserve--links] <PFSPath> ... <PFSPath>
```
G
gongweibao 已提交
13 14

# Description
G
gongweibao 已提交
15 16 17 18 19 20 21 22 23 24 25 26 27 28
```	   
The following options are available:

-r
   Copy directories recursively
   
-f      
	Do not prompt for confirmation before overwriting the destination path.  (The -f option overrides previous -n options.)

-n      
	Do not overwrite an existing file.  (The -n option overrides previous -f options.)

-v      
	Cause cp to be verbose, showing files after they are copied.
G
gongweibao 已提交
29

G
gongweibao 已提交
30 31
--preserve--links
   Reserve links when copy links
G
gongweibao 已提交
32 33 34
```

# Examples
G
gongweibao 已提交
35
- The following command copies a single file to pfs
G
gongweibao 已提交
36 37

```
G
gongweibao 已提交
38
paddle pfs cp ./text1.txt /pfs/$DATACENTER/home/$USER/text1.txt
G
gongweibao 已提交
39 40
```

G
gongweibao 已提交
41
- The following command copies pfs file to a local file
G
gongweibao 已提交
42 43

```
G
gongweibao 已提交
44
paddle pfs cp /pfs/$DATACENTER/home/$USER/text1.txt ./text1.txt
G
gongweibao 已提交
45
```