Proxy Information
Original URL
gemini://idiomdrottning.org/rsync-paths
Status Code
Success (20)
Meta
text/gemini; lang=en # Trailing slashes on rsync paths With rsync, * if you want to upload a directory so it lands inside another directory, the first path (the source path) should not end in a slash, and * if you wanna upload it so it syncs with the dest dir, so the dest dir becomes a copy of the source dir, the first path (the source path) should end in a slash. The reason I bring this up is that I was taught that with rsync I should just be mindful of the trailing slashes matching or not. But that’s not right. It’s the first path’s last character that matters. The dest path’s last character doesn’t seem to matter. I.e. I was taught that: * rsync foo/ bar/ # bar becomes foo. Correct * rsync foo bar/ # bar now contains foo. Correct. * rsync foo bar # bar becomes foo. Wrong. Instead, bar now contains foo. * rsync foo/ bar # I don’t know what I expected to happen but what does happen is that bar becomes foo. This post is based on me futzing around for five minutes with rsync 3.2.7 on zsh 5.9. Corrections welcome. This is how it works: * Slash on source dir: copy contents of dir * No slash on source dir: copy dir itself
Capsule Response Time
476.26105 milliseconds
Gemini-to-HTML Time
0.013058 milliseconds

This content has been proxied by September (ba2dc).