Hidden Files on UNIX
Everyone knows how to create hidden files in the UNIX/Linux world: just start the file name with a dot (.). But this feature wasn’t always there.
According to Rob Pike in a Google+ post that is now only available on archive.org, around version 2 of UNIX, while the Unix file system design was being worked on, the “.” and “..” entries appeared to make directory navigation easier. This probably happened in version 2, when the file system became hierarchical.
But when you listed files with the ls command, those two entries showed up. So Ken Thompson or Dennis Ritchie added a simple test: if the first byte of the file name was a dot, the program would ignore the entry.
This solved the problem of hiding both “.” and “..”, but it accidentally caused any file starting with . to be hidden.
It’s a classic case of a bug that is now a feature, and it has caused several problems over time, including a large number of hidden files in your home directory that you probably have no idea what they’re for.
When you design your programs, use the XDG Base Directory Specification.
As far as I researched, the concept of hidden files didn’t even exist up to that point, and it seems its appearance was entirely accidental.
Other operating systems have similar bugs. Although MS-DOS had an attribute system that allowed you to mark a file as hidden, it would still be visible in applications like File Explorer. But if you named the file with the ASCII character 255, it wouldn’t be shown.