OpenSSH 8.0 released
OpenSSH 8.0 released
Posted Apr 20, 2019 22:11 UTC (Sat) by karkhaz (subscriber, #99844)In reply to: OpenSSH 8.0 released by dw
Parent article: OpenSSH 8.0 released
A slash on the source directory does change rsync's behaviour, but that has nothing to do with whether the destination exists. The behaviours are orthogonal, here is a matrix:
when dst doesn't exist
rsync -a src/ dst --> creates dst, copies contents of src into dst
rsync -a src dst --> creates dst, copies src into dst
when dst exists
rsync -a src/ dst --> copies contents of src into dst
rsync -a src dst --> copies src into dst
I do remember being surprised by this when I first used rsync, but the man page is fairly clear about it; I'm curious to hear if what behaviour you might find less surprising, while retaining the ability to copy either a directory or its contents (without using shell wildcards or the like)?
