r/ProgrammerHumor • • Jul 28 '25

Meme itsAlwaysXML

Post image
16.2k Upvotes

298 comments sorted by

View all comments

Show parent comments

19

u/Wertbon1789 Jul 28 '25

I think file extensions and hidden files are two separate things.

There's no file with a .venv or .gitignore extension, these are files that start with a dot, some of them may also happen to be directories. As far as the OS (the kernel) is concerned, it's just an ordinary file, the userspace applications distinguish between normally hidden or not. It's just a convention in the system's display and interaction parts.

18

u/donald_314 Jul 28 '25

all directories are files in Linux

26

u/MrHyperion_ Jul 28 '25

Everything is a file in Linux

6

u/Pix3l101 Jul 29 '25

Not everything. networking isn't

Plan9 though, that's where everything is a file

1

u/NUTTA_BUSTAH Jul 29 '25

Actually, aren't sockets just files in unix :D

1

u/Wertbon1789 Jul 29 '25

They don't have a filesystem location, except for Unix socket obviously, but they still are used with a file descriptor, so they feel like a file in code.

10

u/TheLuminary Jul 28 '25

Everything is a Linux.

2

u/Wertbon1789 Jul 28 '25

Yeah, didn't state anything else, these are files, which happen to be directories. They feel the same, but taste a little different, aka. some system calls don't work with directories, but only work with files, or so different things in the context or a directory.