File Notes in Nautilus – Is There a Terminal CLI?

filesystemnautilus

Until today, I've avoided using the file Notes feature in Nautilus (Properties), because of portability problems. …but they are just so tantalizingly handy! …Adding notes to a like-named text file works, but requires more juggling that the Notes feature.

So I've decided to give the Notes a try; now that I'm (almost) exclusively using Ubuntu …(I'm past the point of no return 😉

So a couple (or three) questions have come up.

  • Is this Notes feature exclusive to Nautilus?
  • Is there a Terminal CLI for Notes …like the CLI for trash?
  • Is there a tool which can batch extract/convert the Notes into individual similarly named text files (or something similar) for "portability"?

Best Answer

I am not sure about your first and third question but it appears that it is exclusive (by that I mean that nautilus' metadata is not portable) to Nautilus and I couldn't find any tools for extracting Nautilus file annotations, but here are a few examples of how to access file annotations from the command line,

Set the notes for a file:

hello@world:~$ gvfs-set-attribute -t string Hello.txt metadata::annotation "This is a note."

Read the notes for a file:

hello@world:~$ gvfs-info -a metadata::annotation Hello.txt  
attributes:  
  metadata::annotation: This is a note.