I wanted to ask is there any reason not to use
rsync for everything and abandon
I wasn't aware of
rsync and now I don't know why
cp is ever needed.
Strictly speaking yes, you can always use
man rsync (emphasis mine):
Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be
copied. It is famous for its delta-transfer algo‐ rithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destina‐ tion. Rsync is widely used for backups and mirroring and as an improved copy command for everyday use.
Now, sometimes it is just not worth typing those few extra characters just to use a tank to kill a fly. Also,
rsync is often not installed by default so
cp is nice to have.
Rsync can be slower than
cp in some situations. For example when the destination exists and rsync ends up doing some expensive comparisons for each block, does not find equal blocks and copies the complete source file anyways.
Also when destination files don't exist, rsync does not provide any advantage above cp.
rsync doesn't handle copying sparse file in a straightforward manner.
cp by default handles that very well.
cp flag is lacking in rsync:
-i, --interactive prompt before overwrite (overrides a previous -n option)