5

I have directories like ~Work ~School ~Movies. Is it possible to search for files in only one of those directories with tracker-search-tool (or with tracker in general)?

1

2 Answers 2

2

I asked in IRC and it is not possible with tracker-search-tool but it is possible on the CLI:

The tracker search tool is pretty simple (and I am not very familiar with it) but at the least this can be done using command line tools (or custom queries in general). For instance, to find all the images under a specific directory (or actually the url of which starts with that specific directory) that Full-Text-Search match the string testi can be obtained with

tracker-sparql -q "SELECT ?uri nfo:fileName(?uri) WHERE {?uri a nfo:Image . ?uri fts:match 'testi' . ?uri nie:url ?url FILTER(fn:starts-with(?url, 'file:///home/masi/Pictures/Wallpapers')) }"
1

Tracker Search is a frontend for tracker that allows filtering the search results by file path. However, the paths must be entered in the configuration file ~/.config/tracker_search/settings.conf before starting the program. Each path entered will appear in the GUI as a checkbox.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .