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)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay