Tagxfs is a semantic file system. It extends the user space file system to a tag based hierarchy.


Imagine that you want to add a new folder to your existing folder structure. But semantically it belongs into more locations, e.g. you have the trailer for the movie 'Indiana Jones 4' and existing a folder structure (ref.1.1). It belongs in the folder Adventure and also in 2000s (production year 2008).

what you can do ?

  1. hold two copies, first in the adventure folder and second in 2000s ... no way !!!
  2. hold only one copy in the adventure folder, and symbolic link in 2000s ... that's a better solution, but maintaining symbolic links in case you add/remove folder/category, will be a pain.
  3. use a file system extension which will solve this problem for you.

Why is it good to categorize items ?

;) ... That's not exactly a soup question, is it? Try wiki categories.


Extension consists of links, tags and node hierarchy.


Tags represent unique categories and can be of the following types:

Location /Movies/Genre/Scifi filters content by two categories: Movies and Scifi. Genre is used as a helper tag, which groups genre tags into one folder.


Link is a symbolic representation of the folder which we want to categorize. It's represented by a unique short name and full path on base file system. We can mark links with a set of tags, later used as filters at node hierarchy. For our concept we stick only with folders. Files are too small an entity and mostly in big quantities, to manage them by tags. They can be organized by the default file system.

Node hierarchy

  • Node
    • Node
      • Leaf
      • Leaf
    • Node
      • Node
        • Leaf
        • Leaf
      • Node
        • Leaf
        • Leaf
  • Tag
    • Tag
      • Link
      • Link
    • Tag
      • Tag
        • Link
        • Link
      • Tag
        • Link
        • Link

Node hierarchy is our tag representation in a tree folder structure. It consists of nodes (Hierarchy nodes), and leaves (Links). For each node we can setup one tag, set of sub-nodes, mode, and unique position in the existing node hierarchy. The mode of hierarchy node defines which links will be listed.

Hierarchy node modes:

The first mode, All lists all links available in our hierarchy under the targeted node. There are no filter criteria applied. The second mode, Links lists links filtered by tags from path corresponding to the targeted node. In other words - only those links are listed which contain all tags assigned to tag nodes on the path from root node to targeted node. And the last, third mode None doesn't list any links at targeted node.

  • Tag1
    • Tag2
      • Link1
      • Link2
    • Tag3
      • Tag2
        • Link1
        • Link3
      • Tag4
        • Link3
        • Link4
  • Link1: Tag1, Tag2, Tag3
  • Link2: Tag1, Tag2
  • Link3: Tag1, Tag2, Tag3, Tag4
  • Link4: Tag1, Tag3, Tag4, Tag5
  • /Tag1 - (None)
  • /Tag1/Tag2 - (Links)
  • /Tag1/Tag3/Tag2 - (Links)
  • /Tag1/Tag3/Tag4 - (Links)

How to use it:


Tagxfs supports help for all commands and subcommands through the help command.

  • $ tagxfs help [<command> [<subcommand> ...]

Repository location

Node hierarchy is stored in sql3lite repository. We have two ways how to define it's location.

  • $ export TAGXFS_REPOSITORY=./test_repository.tagfs
  • $ tagxfs --repository=./test_repository.tagfs <commands>

Creating repository

After we setup a repository path, we need to create an instance. We can do that using the database create command.

  • $ tagxfs database create

Adding tags

Before we can create a node hierarchy, it's necessary to define tags. For operations with tags we have these commands available: tag add|list|remove

  • $ tagxfs tag add movie genre scifi adventure horror year 2010s 2000s 1990s music

Choosing void/filter tags

We need to separate void tags from filter tags. Newly added tags are filter tags by default. We can change that using the tag set filter command.

  • $ tagxfs tag set filter 0 genre year

Creating node hierarchy

After we have added the tags we can create a node hierarchy. We will create hierarchy nodes by assigning tags to specific locations. For operations with hierarchy nodes we have following commands available: hierarchy add|remove|copy|move|list|tree

  • $ tagxfs hierarchy add / movie
  • $ tagxfs hierarchy add / music
  • $ tagxfs hierarchy add /movie genre
  • $ tagxfs hierarchy add /movie year
  • $ tagxfs hierarchy add /movie/genre scifi
  • $ tagxfs hierarchy add /movie/genre adventure
  • $ tagxfs hierarchy add /movie/genre horror
  • $ tagxfs hierarchy add /movie/year 2010s
  • $ tagxfs hierarchy add /movie/year 2000s
  • $ tagxfs hierarchy add /movie/year 1990s

Setting up mode for hierarchy nodes

To list links we need to define a collection mode for each hierarchy node it applies to. By default the hierarchy node doesn't list any. We setup a collection mode using the hierarchy mode command.

  • $ tagxfs hierarchy mode /movie/genre/scifi links
  • $ tagxfs hierarchy mode /movie/genre/adventure links
  • $ tagxfs hierarchy mode /movie/genre/horror links
  • $ tagxfs hierarchy mode /movie/year/2010s links
  • $ tagxfs hierarchy mode /movie/year/2000s links
  • $ tagxfs hierarchy mode /movie/year/1990s links

Adding links

Now we can put links into our repository. By entering short name, we will override a default link name extraction from the original path. We can add links using the link add command.

  • $ tagxfs link add <your_media_folder>/movie/the.5th.element
  • $ tagxfs link add <your_media_folder>/movie/aliens
  • $ tagxfs link add <your_media_folder>/movie/event.horizon
  • $ tagxfs link add <your_media_folder>/movie/Indiana.Jones.4 indiana.jones.4

Adding tags to links

Finally we'll categorize newly added links. We'll use the link tag add command.

  • $ tagxfs link tag add the.5th.element movie scifi 2000s
  • $ tagxfs link tag add aliens scifi movie horror 1990s
  • $ tagxfs link tag add event.horizon movie scifi horror 2000s
  • $ tagxfs link tag add indian.jones.4 movie adventure 2010s

Mounting filesystem

We created repository and filled with the data. Let's mount it.

  • $ tagxfs mount <mount_destination>
Valid XHTML 1.0 Strict
Valid XHTML 1.0 Strict