Any implementations of unix with “flat”, tag-based file systems

filesystems

As I understand, files in Unix are all stored in a "flat" structure in the hard drive — the file system is merely links from directories to other directories and eventually to leaves/nodes/files. Many hard links may point to the same file (but not the same directory/branch)

Has there been any approaches to this where there are essentially no folders at all — all of the files are in one giant folder, and instead of folders you have tags? Your home directory might then not be files in folders but instead merely lists of tags/folders, where a file may be found in more than one?

And also some sort of software faculty to do more complicated tag queries, like filtering.

Best Answer

It's true that file's data is "flat" on the actual disk drive. Most (all?) modern disk drives have "LBA" (Logical Block Addressing), which means that even to the kernel, a disk is a great big line of blocks. The blocks containing a file's data might be interrupted, because inodes, etc, get spaced out throughout the line of disk blocks. So "flat" is a bit deceptive as a description.

It's also true that the "hierarchy" part is just a fiction: folders (better referred to as "directories") and their membership get their arrangement from the kernel "making it so" by reading file names and matching inode numbers from a directory's data.

But a hierarchical arrangement of data is pretty useful. As long ago as 1991, people were arguing about that, and getting refuted soundly. See Brent Welch's The File System Belongs In The Kernel for a better argument than I can compose.

I also feel compelled to note that Microsoft has embarked on a file-system-as-database at least twice in the last 20 years, and abandonded it both times, but maybe I'm interpreting what Google says incorrectly.

Related Question