File Name Conventions and Tagging Trees

A couple of days ago, Karl Voit gave a really great talk at Grazer Linuxtage 2018. It was entitled The Advantages of File Name Conventions and Tagging, which is pretty much self-explanatory except for the tagging part.

The first part of the talk discusses Voit’s fine naming conventions and the tools he uses to make dealing with them easier. A typical file in his file system has the form

 2013-05-09T16.17 file name with time stamp -- tag3 finance.csv 

Note that there are several parts to the name. First there’s the date or date/time section that gives the date—and perhaps time—of a file. Next there’s a brief description of the file’s content followed by one or more optional tags separated from the description by “ -​- ”. Finally, there’s the file extension, as usual.

Notice how that convention makes it easy to search for files in any number of ways. If you’re searching for photographs taken on 2018-04-29, you might use something like

find . -name "2018-04-29*.jpg" 

to locate them no matter where they’re stored. Similarly, you could search for one or more tags.

The meat of the talk for me is the notion of Tag Trees. The idea is that the files are kept in a single storage area and then indexed by their tags. If we’re trying to find the file 2013-05-09T16.17 file name with time stamp -- tag3 finance.csv, we can look for all the files in the Tag Tree with the tag tag3 or for all the files with the tag finance but there might be many such files. In the branch of the Tag Tree for tag3 there’s a subtree for finance, which has all the files with a tag of both tag3 and finance. Similarly, the Tag Tree branch finance/tag3 contains a link to the file.

I’ve given a very brief description here, so be sure to take a look at the talk for the details. The video is 45 and a half minutes, so plan accordingly. If you’d like to get your file system organized and make files easy to find, you really need to watch this video.

This entry was posted in General and tagged . Bookmark the permalink.