Cross-Platform
OS-Specific Flags
| Transfer | Recommended Flags |
|---|---|
| Linux → Linux | -avAX (full metadata) |
| macOS → Linux | -av --no-xattrs --exclude='._*' --exclude='.DS_Store' |
| Windows → Linux (WSL) | -av --iconv=CP1252,UTF-8 --chmod=D755,F644 |
| Linux → NTFS/FAT | -av --no-perms --no-owner --no-group |
| Linux → FAT32 | -av --no-perms --modify-window=2 |
| Any → No symlink support | -av --copy-links |
Commands
# macOS → Linux (clean transfer)
rsync -av --no-xattrs --exclude='._*' --exclude='.DS_Store' \
/src/ user@linux:/dest/
# Windows WSL → Linux
rsync -av --iconv=CP1252,UTF-8 --chmod=D755,F644 \
/mnt/c/project/ user@linux:/var/www/html/
# Linux → USB drive (FAT32)
rsync -av --no-perms --no-owner --no-group --modify-window=2 \
/src/ /mnt/usb/backup/
# Force older protocol (version mismatch)
rsync -av --protocol=29 src/ user@old-server:dest/
# Skip ACLs (destination doesn't support)
rsync -av --no-acls src/ user@remote:dest/
# Check versions on both ends
rsync --version | head -1
ssh user@remote "rsync --version | head -1"
# Symlinks as copies (cross-platform safe)
rsync -av --copy-links src/ dest/
tip
--iconv converts filenames only, not file contents. Use dos2unix before syncing if you need line-ending conversion.