2 ms·
Weird! I never noticed that. Indeed, it does! cd "$( mktemp -d )" mkdir a b c touch a/f1 a/f2 a/f3 cp -r a/ b/ ls b Resulting content of directory
by codetrotter 3y ago
Weird! I never noticed that.
Indeed, it does!
cd "$( mktemp -d )"
mkdir a b c
touch a/f1 a/f2 a/f3
cp -r a/ b/
ls b
Resulting content of directory b on one my FreeBSD machines
f1 f2 f3
Guess I usually
1. Don’t use cp -r so often, and
2. When I do use cp -r apparently I don’t put a trailing slash
Cause I only ever had problems when trying to use rsync, not when using cp or mv :S