Will Clarke

cp works different in BSD and Linux


BSD and Linux work differently. That’s not much of a surprise. BSD started in 1977 and Linux only started in 1991. There are loads of historical reasons for this difference.

What did surprise me recently, though, was something as trivial as

cp -R a/ b/

will behave totally differently on the two systems.

Spoiler Alert: You’ve got to use dots (.) to make them work the same.

cp -R a/. b/.


linux bsd shell