Searching file notes

I am using Ubuntu Mate 16.10 with Caja 1.16.0. I want to organize my files to find any file with ease. I see I can add notes to any file. The question is how can I find a file by it’s note? I would like this approach because I did not find any tool to tag and find my files based on their tags.

The Caja Notes pane in the file Properties window uses gfvs file attributes. Files notes created through Caja are stored on the gfvs database.

To access this information you can run the gvfs-info command after adding a note to a file. The attribute name specific to the Notes is metadata::annotation, so the following command will display any notes for the file named ‘myfile’

$ gvfs-info -a metadata::annotation myfile
uri: file:///home/marfig/Documents/myfile
attributes:
  metadata::annotation: This my my test note.

Unfortunately this is the only way to access that information programmatically and I know of no GUI application that facilitates this. So in order to search files based on notes you created through Caja, you need a to pipe and combine the commands find, grep and gvfs-info in a single command line.

Note:
Linux ext4 supports extended attributes. By default this functionality isn’t installed on MATE and requires a change to fstab. But you will still have the same problem since the find command doesn’t support extended attributes. So again you’d need to combine find and grep, this time with the getfattr command.

1 Like

Thank you for the detailed answer. Linux is fast and attractive but it seems it is without any OS-level tagging system or any quick way to organize (method or application) files efficiently. Linux partitions seems to have the same problem with the file name max length, there is no application to manage sidecar (which contain metainfo) files. Windows also has this problem. Anyway thank you for the help.