Hi, The following code shows that cp a directory into itself still create the tmp directory in the destination. Is better not to create it?
/tmp$ mkdir tmp /tmp$ $(type -P cp) -r tmp tmp /usr/local/opt/coreutils/libexec/gnubin/cp: cannot copy a directory, ‘tmp’, into itself, ‘tmp/tmp’ /tmp$ ls -lgd /tmp/tmp drwxr-xr-x 3 wheel 102 Jun 14 11:05 /tmp/tmp -- Regards, Peng