Hacker News new | ask | show | jobs
by jeddy3 1687 days ago
> 2. Create a directory in a well-known place called `tags/` or whatever you want.

> 3. For every tag `<name>`, create a directory `tags/<name>/`

> 4. Hard-link all files you want to tag under each tag directory that apply.

Does this only give you one level of tags? (i.e you can't combine tags when exploring)

2 comments

It does, unfortunately. But you probably could implement finding something with two tags with some command-line fu.

My first crack at it is this:

    find -L tags/tag1 tags/tag2 -xtype l | sort | uniq -d
I don't know if that would work (on mobile; can't test), but from reading the man pages, it seems like it would do the trick.
Replying again to give you a command that I've tested:

    find -L tags/tag1 tags/tag2 -xtype l | xargs readlink -f | sort | uniq -d