pfsclient.md 3.4 KB
Newer Older
G
gongweibao 已提交
1
# PFSClient
G
gongweibao 已提交
2 3

## Description
G
gongweibao 已提交
4
The `pfs` command is a Command Line Interface to manage your files on PaddlePaddle Cloud
G
gongweibao 已提交
5 6 7 8 9 10 11 12 13 14

## Synopsis
```
paddle [options] pfs <subcommand> [parameters]
```

## Options
```
--profile (string)
	Use a specific profile from your credential file.
G
gongweibao 已提交
15 16 17 18

--help (string)
	Display more information about command

G
gongweibao 已提交
19 20
--version
	Output version information and exit
G
gongweibao 已提交
21

G
gongweibao 已提交
22 23
--debug
	Show detailed debugging log	
G
gongweibao 已提交
24 25 26
	
--only-show-errors (boolean) 
	Only errors and warnings are displayed. All other output is suppressed.
G
gongweibao 已提交
27 28 29
```

## Path Arguments
G
gongweibao 已提交
30
When using a command, we need to specify path arguments. There are two path argument type: `localpath` and `pfspath`.  
G
gongweibao 已提交
31

G
gongweibao 已提交
32
A `pfspath` begin with `/pfs`, eg: `/pfs/$DATACENTER/home/$USER/folder`.
G
gongweibao 已提交
33

G
gongweibao 已提交
34 35
[Here](https://github.com/PaddlePaddle/Paddle/blob/develop/doc/design/cluster_train/data_dispatch.md#上传训练文件) is how to config DataCenter

G
gongweibao 已提交
36
## order of Path Arguments
G
gongweibao 已提交
37
Commonly, if there are two path arguments, the first is the source, and the second is the destination.
G
gongweibao 已提交
38 39

## Subcommonds
G
gongweibao 已提交
40 41 42 43 44 45 46 47
- rm - remove files or directories

```
Synopsis:
	rm [-r] [-v] <PFSPath> ...

Options:
	-r 
G
gongweibao 已提交
48
		Remove directories and their contents recursively 
G
gongweibao 已提交
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
	-v      
		Cause rm to be verbose, showing files after they are removed.
	
Examples:
	paddle pfs rm /pfs/$DATACENTER/home/$USER/file
	paddle pfs rm -r /pfs/$DATACENTER/home/$USER/folder
```
- mv - move (rename) files

```
Synopsis:
	mv [-f | -n] [-v] <LocalPath> <PFSPath>
	mv [-f | -n] [-v] <LocalPath> ... <PFSPath>
	mv [-f | -n] [-v] <PFSPath> <LocalPath> 
	mv [-f | -n] [-v] <PFSPath> ... <LocalPath> 
	mv [-f | -n] [-v] <PFSPath> <PFSPath> 
	mv [-f | -n] [-v] <PFSPath> ... <PFSPath> 
	
Options:
	-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 mv to be verbose, showing files after they are moved.
		
Examples:
	paddle pfs mv ./text1.txt /pfs/$DATACENTER/home/$USER/text1.txt
```
- cp - copy files or directories

```
Synopsis:
	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>

Options:
	-r
   		Copy directories recursively
G
gongweibao 已提交
92
   	-f      
G
gongweibao 已提交
93 94 95 96 97 98 99
		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.
	--preserve--links
	   Reserve links when copy links
G
gongweibao 已提交
100 101 102 103
	   
Examples:
	paddle pfs cp ./file /pfs/$DATACENTER/home/$USER/file
	paddle pfs cp /pfs/$DATACENTER/home/$USER/file ./file
G
gongweibao 已提交
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
```
- ls- list files

```
Synopsis:
	ls [-r] <PFSPath> ...
	
Options:
	-r
   		List directory(ies) recursively

Examples:
	paddle pfs ls  /pfs/$DATACENTER/home/$USER/file
	paddle pfs ls  /pfs/$DATACENTER/home/$USER/folder
```

- mkdir - mkdir directory(ies)
Create intermediate directory(ies) as required.

```
Synopsis:
	mkdir <PFSPath> ...

Examples:
	paddle pfs mkdir  /pfs/$DATACENTER/home/$USER/folder
```