rsync Command Generator
Generate rsync commands to synchronize files
Getting Started with rsync
## What is rsync?
`rsync` transfers and synchronizes files, sending only the differences for speed. Either side can be remote (`user@host:path`). The trailing slash on the source matters.
## How to Use
1. **Source and Destination**: one may be `user@host:path`. 2. **Pick Flags**: `-a` (archive), `-v` (verbose), `-z` (compress) are the common trio. 3. **Copy & Run**: paste the generated command into your terminal.
Flags & Patterns
``` rsync -avzh src/ dest/ rsync -a --delete src/ user@host:/dest/ rsync -avz -e ssh src/ user@host:dest/ ```
### Common flags - `-a` — archive mode (recurse + preserve perms/times/links) - `-v` — verbose; `-z` — compress; `-h` — human-readable numbers - `--delete` — remove files at the destination that no longer exist at the source - `--progress` — show per-file progress - `-e ssh` — use a specific remote shell
### Tips - Trailing slash matters: `src/` copies the *contents* of src; `src` (no slash) copies src itself. - Use `--delete` only when mirroring — it removes extra files at the destination.
▶What's the difference between 'src/' and 'src'?
▶How do I mirror two folders exactly?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee