More of a general Linux question, but since openSUSE is my distribution I’m asking here. Like I said I’m moving from Windows 7 to SUSE, and inevitably comparing many things on the way. Something I’m slightly confused about is the way Linux chooses to mark hidden files / folders compared to Win. While in Windows you right-click them and mark them as ‘hidden’, in Linux they are marked this way by putting a dot in the file / folder name (eg: “.something” instead of “something”).
I’m slightly confused as to why the name is being used to mark things as hidden. One feature in Linux compared to Windows (positive I’d say) is being able to use mime types instead of extensions, making them optional. Yet for hidden files it’s the other way around… you need to rename instead of being able to use a different kind of mark. At a first look, it doesn’t seem optimal for one thing… since the name is being used to toggle a feature / setting instead of just being that file or folder’s name.
The real issue I’m imagining is that if you’re using a file or folder as part of a full path, then want to mark it as hidden later on (say you don’t want to see it all the time in Dolphin) its path would change. So if you have the location /foo/bar (where bar is a file and foo a folder) and you wanna make foo a hidden folder, the path would then become /.foo/bar and would need to be updated in any script or application relating to it. Not sure if the Linux path system can automatically translate this (ignore the . and use the old path, or the other way around) which would offer an advantage. Also, would this allow items with the same name to exist in the same folder (filename and .filename)?
What are the benefits of hiding things this way, and are there alternative ways to mark files and folders as hidden? Note that I’m not trying to “make Linux be like Windows” nor mind how it works. Others know better why it was done this way, but I’m trying to learn why this option was chosen and is still used in Linux at this day.