DEV Community

Discussion on: MacOS vs Linux — the cp command will trip you up!

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

One thing that wasted me a lot of time: macOS filenames are not case sensitive. So on linux you can have "file and "File" next to each other, on macOS you are going to have a bad time.

$ touch TEST
$ ls
TEST
$ touch test
$ ls
TEST
Enter fullscreen mode Exit fullscreen mode

I would never in million years figure it out if i didnt encounter it myself. Couldn't believe this :x

Collapse
 
moopet profile image
Ben Sinclair

That's why I don't really like these shells that do tab-completion in a "smart" case way.

It's actually worse than this. Macs keep metadata in files with... the same names as the original. Or at least they did up until a couple of years ago. That used to mean that when someone sent an email with an attachment to someone on a non-Mac, their naive client had a 50/50 chance of detaching the correct file or a zero-byte piece of nonsense.

Don't get me started on __MACOSX directories and the fact that they end up in zip files and repositories and and and...