I come from Linux. I keep making mistakes when I do
cp -R /dir/ . instead of
cp -R /dir .. These two commands are identical in Linux world, but different in MacOS. In
If the source_file ends in a /, the contents of the directory are copied rather than the directory itself.
Since I always use
Tab autocomplete the directory name and it always has
/ in the end, I really mean copying the directory, not the contents of the directory. I don't always remember to delete the
/ suffix. How do MacOS developers avoid these kind of mistakes? Thanks.