rsync
and, and
Syntax
rsync [options] source destination
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
-a |
(, and more) | |
Common |
-v |
|
Common | |
-z |
|
Common | |
--delete |
|
Common | |
-n |
(, ) | |
Common |
--exclude |
|
Common | |
-P |
|
Common |
Examples
rsync -avz ./project/ user@server:/opt/project/
()
rsync -avz --delete src/ dest/
and
rsync -avz --exclude='node_modules' --exclude='.git' ./ remote:/app/
()
rsync -avzP large-file.iso user@server:/data/
()
rsync -avn --delete src/ dest/
Tips
- /, /
- -n
- --delete, -n
- scp :,