Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyone have a suggestion for a tagging filesystem that is maintained? Or if not a filesystem, something that at least works? I still feel like this is the best way to organize personal photos and media, and while https://www.tagsistant.net/ is pretty good it hasn't been updated in 6 years and is fairly buggy.


Dr. Karl Voit did his dissertation designing a tag-based file system. I don't know what the status is today, but the dissertation itself may be a decent place to start your search.

https://karl-voit.at/tagstore/en/papers.shtml


I haven't tried it yet but https://tmsu.org/ is actively maintained and looks nice.


MacOS has tags. Right click any file in finder, select "Tags..."

No idea if they are implemented at a filesystem level but there are various tools for finding things by tag


Edit: ok, wow I didn't even check the link before writing my suggestion but it's kinda freaky how similar they are. Even used a scifi movie as the example.

I have a horrible idea that I haven't actually tried out, and I don't know how many filesystems it would work on anyway, but hard links...

Create a directory that holds your files. Organise them however you like - some arbitrary subdirectory structure using dates, names etc.

Create another top-level directory called "Tags", and build a directory structure that supports your needs.

Write a stupid "tag" shell script and a shell tab-completion script for it that lets you tag any item in the "real" directory structure using tab completion on the original file name and the tag. When you hit the return key the script creates a hard link for the original file in the chosen tag directory.

Example: tag "files/movies/the matrix.mkv" "tags/movies/sci-fi"

Now you can browse 'tags/movies/sci-fi'.

No "real" coding skills needed. You reorganize your tag directories and files by moving them around, and if you've done your shell scripts properly it shouldn't care as long as the top-level directories don't change. Limits? On Linux an inode can have up to 65000 hard links so I don't think it'll be an issue.

The many problems I see are name clashes, directories not supported (by hard links), cross file system links not supported (by hard links) and file deletions (don't work as expected). The tag script could handle the former. For deletions, you could create a "delete" that gets the file inode and deletes tags first, using 'find $tagsdir -inum $inode -delete'


> The many problems […]

…, hard-links are incompatible with programs that attempt "atomic" file saves instead of rewriting a file in-place, …


I just gave up and mimicked tags with symlinks and subfolders. ie "foo" is tagged "todo" if there's a symlink to it in "Tags/todo/".

It works surprisingly well, since I can manage it with standard shell scripting.


Interestingly, this is effectively a tag hierarchy (orthogonal to the content), which is also a DAG.

https://twitter.com/mikeybtags/status/1582509479806980096?s=...

I wonder what disadvantages such a tag hierarchy has?

I imagine enforcing the acyclicity is hard/effortful.

Using (inherently hierarchical) folders (with no symlinks for folders) enforces the acyclicity constraint, and avoids diamond issues, so that’s neat.


Directory Opus embeds labels into the file system:

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/...


unix has tags, they are known as hardlinks.


You can misuse them as such (I've done it myself, albeit on Windows), but they're not really made-to-measure for that use case. E.g. deleting files that have been "tagged" that way becomes more cumbersome (because to the OS all hardlinks are created equal, so deleting the "primary" file doesn't automatically delete the tags, too), it's incompatible with any program that uses "atomic" files saves instead of modifying files in-place, the UI for viewing and editing "tags" is not really there, …




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: