Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 askubuntu.com/questions/30020/… - but that one did not really get answered. –  sup May 28 '11 at 11:35

1 Answer 1

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

 
discard

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.