DEV Community

Bady
Bady

Posted on • Edited on

It's not a bug, it's a feature! :D

Originally there was no concept of a hidden file. But every directory in Linux has two special directories inside it . (current directory) and .. (the parent directory). These are not useful to list as they exist everywhere, so they were filtered out of output. But the code to do so was too aggressive in an attempt to to both checks in a single line, effectively matching every file that begins with a dot. People found out and abused it to hide files, the bug was never fixed and people came to think of it as a feature.

Source: https://libredd.it/r/linux/comments/at05xh/why_do_hidden_files_in_unix_begin_with_a_dot/egxuvwh

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more