3 ms·
'rsync is a capable alternative' except for the fact that rsync has a very weird (to me) behavior with regards to trailing slashes in copying directories. mos
by ur-whale 6y ago
'rsync is a capable alternative'
except for the fact that rsync has a very weird (to me) behavior with regards to trailing slashes in copying directories.
most definitely not a drop-in replacement for scp
- voiper1 6y agoargh trailing slashes can be a pain! I've had to delete/move many times due to differences in trailing slashes.
- adrian_b 6y agoYou are right, but the rsync behavior has good reasons, explained in its man page. Moreover, all UNIX commands have different behavior depending on whether you write or not trailing slashes, at least when the arguments happen to be symbolic links. To avoid mistakes due to the different behaviors, I use for cp and mv aliases that include the option "--strip-trailing-slashes".
- xorcist 6y agoThat's a problem with scp, not with rsync. rsync dir_a server:dir_b Will there be a directory called dir_a on the server? Well, that depends on if dir_b exists. Run the command again and the result may be different. That's not acceptable behaviour for a tool keep a remote directory synced.
- deleted 6y ago[deleted]