It's incredible how many confusing posts you can find on stackoverflow and superuser concerning themselves with the "cp" and "mv" commands. Posters are like, "how to use 'cp'?" To which people post "cp" syntax, yet nobody ever states, WHICH version of "cp" or "mv" they are actually using. FYI, there are TWO utility suites, one by Berkeley, another by GNU, and they behave very differently, so it would really help if people actually stated what version they are talking about, otherwise it's like Blind talking to Deaf.
So people will tell you to use the "-R, -r, --recursive" flag to copy a folder, just look above, but this didn't work for me:
cp -av "/System/Library/Carrier Bundles/iPhone/EPlus_de.bundle/" /work/EPlus1/
cp -R "/System/Library/Carrier Bundles/iPhone/EPlus_de.bundle/" /work/EPlus1/
Instead of copying the folder "EPlus_de.bundle" to "/work/EPlus", all files inside "EPlus_de.bundle" are copied to "/work/EPlus1/", so the structure is:
Now, somebody will test my command and claim, "It DOES work!" Yeah, it's working on your GNU version, but will NOT work as intended on the Berkeley version, so the poster above mentioning the recursive flag is not particurly helpful, then again, the original poster never mentioned, what version he' talking about.
Berkeley: if the FromFolder has a front slash ("/") at the end, it will be interpreted as:
so basically, Berkeley "cp" is told to copy all files in the FromFolder to ToFolder, NOT the FromFolder itself.
If the source_file ends in a /, the contents of the directory are copied rather than the directory itself.
Then again, you search the net on how to copy a folder, people will tell you:
cp -avr ...
of course, this throws on the Berkeley version, so people are like, "You are wrong, it's not working! Yes, it does!" arguing past each other, because they are talking about completely different programmes. Why GNU hasn't called their apps "cp2" or something is beyond me.