Use rsync instead

In my minimal attempts to use rsync, I always find examples where they always use a ton of flags alongside the locations. I'm not gonna learn those flags if cp can do it intuitively and with minimal extra commands. Maybe it's just me.

Not just you.

Also, I always have this vague fear that I'll rsync in the wrong direction, or accidentally blow away unrelated files in rsync's efforts to fully synchronize two directories (can't remember if this is a valid concern).

I'm sure these concerns would go away if I used it regularly, but I just don't. ‘cp' or ’scp’ almost always meet my needs.

Kinda like the way people are probably right that I should learn to use ’awk’, but I just can't muster the motivation.

> Also, I always have this vague fear that I'll rsync in the wrong direction

It's the same direction as cp/scp ... You could easily do it wrong, but you must be afraid to do anything other than maybe cat < source > dest because that's clear?

> or accidentally blow away unrelated files in rsync's efforts to fully synchronize two directories (can't remember if this is a valid concern).

I think you need --delete for this. As I recall, it's sometimes more tricky to get it to delete the files you wanted it to delete and you're more likely to end up with extra files than removing files you didn't intend to.

Do it once, make it your muscle memory - it's really hard for me to learn things by heart, but even I could do it :), and then you can forget about scp as well

rsync unfortunately doesn't do relinking at all, so I can't use it as a generic replacement for cp.

Relinking?

I assume they typoed reflinking, a way of doing CoW-based copying of file contents.

I was under the impression it could do that, I think I build a snapshotting mechanism using this.

rsync does not have the ability to copy a file using the filesystem's copy-on-write feature. This is unlike cp, which has the --reflink flag. Here's the bug report on GitHub which the developers closed as "won't fix for now":

https://github.com/RsyncProject/rsync/issues/119#issuecommen...

yes thank you!