Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)?

share|improve this question
Hm, seems this is a duplicate of… - but that one did not really get answered. – sup May 28 '11 at 11:35
up vote 1 down vote accepted

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')) }"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.