Comment by hilsdev

21 hours ago

If you use a trailing slash on the source it copies from the directory, if you omit the trailing slash it copies the directory itself. AFAIK this is pretty standard across POSIX tools

It's not, for example cp -R doesn't change behavior on the basis of a trailing slash on directory names.

  • I was implementing something recently and stumbled across that cp difference. ugh.

    the trailing slash is pretty convenient.