parent
33e316c8e0
commit
fae4e6992e
|
@ -42,27 +42,27 @@ rsync -arlP <src> <dst>
|
||||||
带压缩的拷贝
|
带压缩的拷贝
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rsync -avzrlP <src> <dst>
|
rsync -avzzrlP <src> <dst>
|
||||||
```
|
```
|
||||||
|
|
||||||
远程拷贝
|
远程拷贝
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rsync -avzrlP <file> <usrname>@<IP>:<path & name>
|
rsync -avzzrlP <file> <usrname>@<IP>:<path & name>
|
||||||
# 或
|
# 或
|
||||||
rsync -avzrlP <usrname>@<IP>:<path & name> <file>
|
rsync -avzzrlP <usrname>@<IP>:<path & name> <file>
|
||||||
# 或
|
# 或
|
||||||
rsync -avzrlP -e 'ssh -p <port>' <usrname>@<IP>:<path & name> <file>
|
rsync -avzzrlP -e 'ssh -p <port>' <usrname>@<IP>:<path & name> <file>
|
||||||
```
|
```
|
||||||
|
|
||||||
排除文件或目录
|
排除文件或目录
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rsync -avzrlP <usrname>@<IP>:<path & name> --exclude <exclude file1> --exclude <exclude fileN> <file>
|
rsync -avzzrlP <usrname>@<IP>:<path & name> --exclude <exclude file1> --exclude <exclude fileN> <file>
|
||||||
```
|
```
|
||||||
|
|
||||||
同步后删除源文件,相当于移动文件操作(不影响目录)
|
同步后删除源文件,相当于移动文件操作(不影响目录)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rsync -avzrlP --remove-source-files <src> <dest>
|
rsync -avzzrlP --remove-source-files <src> <dest>
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue