I've long wanted to have a linux filesystem that robustly supported "tags" for files so that I didn't have to rely on the filesystem hierarchy to represent media files etc. e.g. I might want to tag a particular films as "Scifi" and also "Horror". Of course, for films, NFO files are typically used for this kind of metadata, but I'd like a similar facility that could be applied to any type of file.
That is literally what xattrs are for.
Yes, but they seem fairly limited in terms of userspace programs. How would you use xattrs to produce a filesystem hierarchy that say, listed the same file in multiple folders according to the attributes?
The xattrs are for storing the tag metadata, you’d use other tools (easily composed from shell utilities) to find files that match tags. If you really want it to be in multiple locations, you could make a fuse interface that shows directories full of files matching specific tags.
> If you really want it to be in multiple locations, you could make a fuse interface that shows directories full of files matching specific tags
Yeah, that's the kind of thing that I've wanted, but not really had the programming skill/experience/patience to make. There have been a couple of similar projects, but nothing that seems popular enough to be worthwhile spending time using.
ChatGPT can write such a thing for you relatively easily if you specify it in enough detail.
I'm not a fan of LLMs (not that I've actually got any experience with them myself), and I definitely wouldn't want to trust one to generate filesystem code even if it is just a FUSE layer.