Commandline reference

You can control tracker using the tracker commandline tool. The various commands are documented below.

This documentation is also available on your computer using the man command.

Note

This documentation is for the latest in-development version of Tracker.

tracker daemon

Name

tracker-daemon — Start, stop, restart and list daemons responsible for indexing content

Synopsis

tracker daemon [options...]
tracker daemon -s | -t [daemons] | -k [daemons] | -l
tracker daemon -f | -w [ontology]
tracker daemon --miner <miner> --pause[-for-process] <reason>
tracker daemon --miner <miner> --resume <cookie>

DESCRIPTION

Tracker indexes content with daemon processes that run in the background. The tracker daemon command allows for control of these components. This ranges from starting, stopping and killing processes to pausing and resuming them.

In addition to all this, there are ways to follow or watch what is happening in real time from a top level and right down where the SPARQL commits are happening too.

If no arguments are provided this command will show the current status of all Tracker data miners.

The data miners can be paused or resumed using this command and you can also list miners running and available.

OPTIONS

-p, --list-processes
This lists all Tracker processes in the system.
*-k, --kill
This uses SIGKILL to stop all Tracker processes found matching the parameter, if no extra parameter is passed, "all" will be assumed. This is not advised unless you are having problems stopping Tracker in the first place. This GUARANTEES death.
*-t, --terminate=
This uses SIGTERM to stop all Tracker processes. This is recommended over --kill because it gives the processes time to shutdown cleanly.
-s, --start
Starts all miners.
-f, --follow
Follow status changes to daemons as they happen. This is a top level view of what is happening. You will see the name for each daemon and a state with the progress in that state.

This requires Ctrl+C to stop and return to the command line. Each new status is put on a new line.

-w, --watch=[ontology]
Watch changes that happen to the database in real time. This requires Ctrl+C to stop and return to the command line.

If ontology is unspecified, all updates are shown. The ontology can be a comma separated list of shorthand or long hand ontology properties. For example:

    $ tracker-daemon -w nie:url,nie:mimeType,nfo:fileSize,nie:dataSource
    Now listening for resource updates to the database
    All nie:plainTextContent properties are omitted

    Press Ctrl+C to stop

    'nfo:Document'
       'nfo:fileSize' = '1770'
       'nie:dataSource' = 'http://tracker.api.gnome.org/ontology/v3/tracker#extractor-data-source'
       'nie:mimeType' = 'text/plain'
       'nie:url' = 'file:///home/martyn/.bash_aliases'
    'nfo:Document'
       'nie:dataSource' = 'http://tracker.api.gnome.org/ontology/v3/tracker#extractor-data-source'

    ...
--list-common-statuses
This will list statuses most commonly produced by miners and the store. These statuses are not translated when sent over D-Bus and should be translated by each application. These are not considered static and are subject to change at any point.

Additionally, these statuses are not the only ones which may be reported by a miner. There may be other states pertaining to the specific roles of the miner in question.

--list-miners-running
This will list all miners which have responded to a D-Bus call. Sometimes it is helpful to use this command with --list-miners-available.
--list-miners-available
This will list all miners which are available even if they are not running at the moment.
--pause-details
For listing all miners which are paused and the reasons for being paused, you can use this. It will also display the application that requested the pause too.
--miner=<miner>
This argument is used with --pause or --resume to say which miner you want to pause or resume. You can use the full D-Bus name, e.g. "org.freedesktop.Tracker3.Miner.Files" OR you can use the suffix, e.g. "Files".
--pause=<reason>
The reason here is useful to know WHY the miner should be paused. A miner can be paused many times by multiple applications. Only when all pauses have been resumed will it continue. If successful, a cookie will be given to uniquely identify the request. This cookie is used to resume the pause at a later stage.
--pause-for-process=<reason>
This works exactly the same way as --pause with the exception that it only keeps the pause active while the calling process is alive. As soon as you press Ctrl+C the pause is resumed automatically.
--resume=<cookie>
The cookie is given by a successful --pause command. It is a number which identifies each pause request. When all pauses have been resumed, the miner will resume working.

tracker endpoint

Name

tracker-endpoint — Create a SPARQL endpoint

Synopsis

tracker endpoint [--dbus-service | -b] <service_name>
                 [--database-path | -d] <database_path>
                 [[--ontology | -o] <ontology_name> |
                  [--ontology-path | -p] <ontology_path>]
                 [[--system | --session]]

DESCRIPTION

This command allows creating SPARQL endpoints. The endpoint will be able to handle SPARQL select and update queries, and notify about changes in it.

The endpoint is exported via DBus, accessible through the given service_name, either using it in a SERVICE clause, or by creating a dedicated bus-based SPARQL connection.

When creating a database, the ontology_name (or alternatively, a ontology_path) must be provided in order to generate the database. If ontology_name is used, the ontology must exist in $datadir/tracker/ontologies

The database itself will be stored according to database_path.

OPTIONS

-b, --dbus-service=<service_name>
Service name to use on the endpoint.
-d, --database-path=<database_path>
The path where the database will be stored.
-o, --ontology
The name of an ontology in $datadir/tracker/ontologies to use on the constructed database.
-p, --ontology-path
Full path to an ontology to use on the constructed database.
--session
Use the session bus. This is the default.
--system
Use the system bus.

EXAMPLES

Export a Nepomuk endpoint with the org.example.Example1 bus name.

$ tracker endpoint -b org.example.Example1 -o nepomuk -d /tmp/example1

Access this endpoint with the tracker-sparql(1) subcommand.

$ tracker sparql --dbus-service org.example.Example1 -q "
  SELECT ?s ?o
  WHERE {
    ?u a ?o
  }"

SEE ALSO

tracker-sparql(1),

https://www.w3.org/TR/sparql11-query/


tracker export

Name

tracker-export — Export all data from a Tracker database.

Synopsis

tracker export [options…]

DESCRIPTION

tracker export exports all data stored in a Tracker database, in Turtle format.

The output is intended to be machine-readable, not human readable. Use a tool such as rapper(1) to convert the data to different formats.

OPTIONS

-g, --show-graphs

Tracker can separate data into multiple graphs. This feature is used by the filesystem miner to separate different types of content. This flag causes the releveant GRAPH statements to be output along with the data.

In this mode the output is TriG syntax rather than Turtle, due to
the extra GRAPH statements. Some tools which understand Turtle do not
understand TriG.

EXAMPLES

Export all data from Tracker Index and prettify the output using rapper(1).::

$ tracker export -b org.freedesktop.Tracker1.Miner.Files | rapper - -I . -i turtle -o turtle

SEE ALSO

tracker-import(1), tracker-sparql(1).


tracker extract

Name

tracker-extract — Extract metadata from a file.

SYNOPSYS

tracker extract FILE

DESCRIPTION

tracker extract reads the file provided and extracts any metadata it can from this file, then displays the metadata on standard output.

The metadata is displayed as a SPARQL update command, that can be run against a SPARQL endpoint to update its copy of the metadata.

The actual extraction is done by a separate process. This is done to isolate the calling process from any memory leaks or crashes in the libraries Tracker uses to extract metadata.

For more information see the libtracker-extract reference documentation.

OPTIONS

-o, --output-format=<FORMAT>
Choose which format to use to output results. Supported formats are sparql, turtle and json-ld.

EXAMPLES

Using command line to extract metadata from a file
$ tracker extract /path/to/some/file.mp3

ENVIRONMENT

G_MESSAGES_DEBUG
Controls verbose log output from GLib-based code. Use G_MESSAGES_DEBUG=Tracker to see only Tracker-related logs, or G_MESSAGES_DEBUG=all to see everything.
TRACKER_DEBUG

Enables more specialized debug output. Pass a comma-separated list of one or more keywords:

config
extractor configuration
statistics
show statistics about how many files were processed
status
log the status messages that are published over D-Bus

SEE ALSO

tracker-sparql(1), tracker-stats(1), tracker-info(1).

  • /usr/lib/tracker-1.0/extract-modules/
  • /usr/share/tracker/extract-rules/

tracker import

Name

tracker-import — Import data into a Tracker database.

Synopsis

tracker import FILE.ttl

DESCRIPTION

tracker import imports data into a Tracker database.

The data must conform to the existing ontology of the database.

The data must be in Turtle format. You can use a tool such as rapper(1) to convert the data from other formats to Turtle.

SEE ALSO

tracker-export(1), tracker-sparql(1).


tracker index

Name

tracker-index — List, pause, resume and command data miners indexing content

Synopsis

tracker index --reindex-mime-type <mime1> [[-m [mime2]] ...]
tracker index --file <file1> [[file2] ...]
tracker index --import <file1> [[file2] ...]
tracker index --backup <file> | --restore <file>

DESCRIPTION

This command perform actions on the current index. The "index" holds a snapshot of the working tree in a database.

The index command allows some level of control on existing data indexed, such as re-indexing content from a specific demographic - e.g. all JPEG images, or simply reindexing an existing or non-existent file.

It may be a good idea to backup your index before an upgrade in case there is data loss (which should never happen). In those cases, the backup command is made available and of course the restore command will import an older data set (or index) into an empty index.

Finally, there is an import feature which makes testing or applying a "base" data set for use much easier.

OPTIONS

-m, --reindex-mime-type=<mime1> [[-m [mime2]] …]
Re-index files which match the mime type supplied. This is usually used when installing new extractors which support mime types previously unsupported. This forces Tracker to re-index those files. You can use --reindex-mime-type more than once per mime type.
-f, --index=<file1> [[file2] …]
(Re)index a file matching the file name(s) supplied.
-b, --backup=<file>
Begins backing up the Tracker databases and save it to the file given.
-o, --restore=<file>
Begins restoring a previous backup from the file which points to the location of the backup generated by --backup.
i, --import=<file1> [[file2] …]
Allows data to be imported into the index / database by providing files with Turtle content.

Multiple file arguments can be provided to import data from multiple files.

The file argument can be either a local path or a URI. It also does not have to be an absolute path.

SEE ALSO

tracker(1). Turtle.


tracker info

Name

tracker-info — Retrieve all information available for a certain file.

Synopsis

tracker info [options…] <file1> [[file2] …]

DESCRIPTION

tracker info asks for all the known metadata available for the given file.

Multiple file arguments can be provided to retrieve information about multiple files.

The file argument can be either a local path or a URI. It also does not have to be an absolute path.

OPTIONS

-f, --full-namespaces
By default, all keys and values reported about any given file are returned in shortened form, for example, nie:title is shown instead of http://tracker.api.gnome.org/ontology/v3/nie#title. This makes things much easier to see generally and the output is less cluttered. This option reverses that so FULL namespaces are shown instead.
-c, --plain-text-content
If the resource being displayed has nie:PlainTextContent (i.e. information about the content of the resource, which could be the contents of a file on the disk), then this option displays that in the output.
-i, --resource-is-iri
In most cases, the file argument supplied points to a URL or PATH which is queried for according to the resource associated with it by nie:url. However, in cases where the file specified turns out to be the actual URN itself, this argument is required to tell "tracker info" not to do the extra step of looking up the URN related by nie:url.

For example, consider that you store URNs by the actual URL itself and use the unique nie:url in another resource (which is quite reasonable when using containers and multi-resource conditions), you would need this argument to tell "tracker info" that the file supplied is actually a URN not URL.

-t, --turtle
Output results as Turtle RDF. If -f is enabled, full URIs are shown for subjects, predicates and objects; otherwise, shortened URIs are used, and all the prefixes Tracker knows about are printed at the top of the output.

SEE ALSO

tracker-store(1), tracker-sparql(1).

http://nepomuk.semanticdesktop.org/ http://www.w3.org/TR/rdf-sparql-query/


tracker miner-fs

Name

tracker-miner-fs — Used to crawl the file system to mine data.

Synopsis

tracker-miner-fs [OPTION…]

DESCRIPTION

tracker-miner-fs is not supposed to be run by the user since it is started by its .desktop file when the user logs in. It can also be started manually of course for debugging purposes. You can not run more than one instance of this at the same time.

tracker-miner-fs mines information about applications and files only.

OPTIONS

-?, --help
Show summary of options.
-V, --version
Returns the version of this binary.
-s, --initial-sleep=SECONDS
Sets the initial sleep time before crawling the file system is started. If the --no-daemon option is used, this option is ignored.
-n, --no-daemon
Tells the miner to exit once all indexing has finished and the database is up to date. This is not the default mode of operation for the miner, usually it stays around acting like a daemon to monitor file updates which may occur over time. This option renders the --initial-sleep option moot.
-e, --eligible=FILE
Checks if FILE is eligible for being mined based on the current configuration rules. In addition to this, it will check if FILE would be monitored for changes. This works with non-existing FILE arguments as well as existing FILE arguments.

ENVIRONMENT

G_MESSAGES_DEBUG
Controls verbose log output from GLib-based code. Use G_MESSAGES_DEBUG=Tracker to see only Tracker-related logs, or G_MESSAGES_DEBUG=all to see everything.
TRACKER_DEBUG

Enables more specialized debug output. Pass a comma-separated list of one or more keywords:

config
miner configuration
miner-fs-events
internal processing of tracker-miner-fs
monitors
change events from filesystem monitors
statistics
show statistics about how many files were processed
status
log the status messages that are published over D-Bus

SEE ALSO

tracker-info(1).


tracker miner-rss

Name

tracker-miner-rss — Used to populate Tracker with RSS feed data.

Synopsis

tracker-miner-rss [OPTION…]

DESCRIPTION

tracker-miner-rss is not supposed to be run by the user since it is started by its .desktop file when the user logs in. It can also be started manually of course for debugging purposes. You can not run more than one instance of this at the same time.

tracker-miner-rss mines information about RSS feeds only.

OPTIONS

-?, --help
Show summary of options.
-V, --version
Returns the version of this binary.
-a, --add-feed=URL
Adds a feed to be indexed. This must be used with --title option. An examples of such a URL would be:

http://planet.gnome.org/atom.xml

http://newsrss.bbc.co.uk/rss/sportplayer_uk_edition/motorsport/rss.xml

You can use tracker-search --feeds to get the latest feed information.

-t, --title=STRING
The title to use when adding a feed (see the --add-feed option).

ENVIRONMENT

G_MESSAGES_DEBUG
Controls verbose log output from GLib-based code. Use G_MESSAGES_DEBUG=Tracker to see only Tracker-related logs, or G_MESSAGES_DEBUG=all to see everything.

SEE ALSO

tracker-info(1), tracker-search(1).


tracker reset

Name

tracker-reset — Reset the index and configuration

Synopsis

tracker reset [--filesystem | --rss] [--file FILE]

DESCRIPTION

The reset command will change either your configuration or index irreversibly and should be used with care. Other than tags, actual data (e.g. files) should not be affected by this command.

The "index" is a link between your content (either locally or remotely) and how it can be found quickly using a number of different queries. Under the hood, this is done using a database.

Removing all data and starting again from the beginning with an empty data set (which is a common use of this command) is done by using the hard reset option. This behaves as if Tracker was just installed.

OPTIONS

--filesystem
Removes data stored by tracker-miner-fs(1). The miner will automatically recreate its cache from the filesystem when it restarts.
*--rss
Removes data stored by tracker-miner-rss(1).
-f, --file FILE
Resets all indexed information about FILE, works recursively for directories. Nothing will be done if FILE is not currently indexed. After deletion, a request to reindex this data will be immediately issued.

SEE ALSO

tracker-daemon(1). tracker-miner-fs(1), tracker-miner-rss(1).


Name

tracker-search — Search for content by type or across all types

Synopsis

tracker search [options…] [[expression1] …]

DESCRIPTION

tracker search searches all indexed content for expression. The resource in which expression matches must exist (see --all for more information). All results are returned in ascending order. In all cases, if no expression is given for an argument (like --folders for example) then ALL items in that category are returned instead.

expression
One or more terms to search. The default operation is a logical AND. For logical OR operations, see -r.

OPTIONS

-f, --files
Search for files of any type matching expression (optional).
-s, --folders
Search for folders matching expression (optional).
-m, --music
Search for music files matching expression (optional).
--music-albums
Search for music albums matching expression (optional).
--music-artists
Search for music artists matching expression (optional).
-i, --images
Search for images matching expression (optional).
-v, --videos
Search for videos matching expression (optional).
-t, --documents
Search for documents matching expression (optional).
-e, --emails
Search for emails matching expression (optional). Returns a list of subjects for emails found.
-c, --contacts
Search for contacts matching expression (optional). Returns a list of names and email addresses found.
--software
Search for software installed matching expression (optional). Returns a list of desktop files and application titles found.
--software-categories
Search for software categories matching expression (optional). Returns a list of urns and their categories (e.g. Settings, Video, Utility, etc).
--feeds
Search through RSS feed information matching expression (optional). Returns a list of those found.
-b, --bookmarks
Search through bookmarks matching expression (optional). Returns a list titles and links for each bookmark found.
-l, --limit=<limit>
Limit search to limit results. The default is 10 or 512 with --disable-snippets.
-o, --offset=<offset>
Offset the search results by offset. For example, start at item number 10 in the results. The default is 0.
-r, --or-operator
Use OR for search terms instead of AND (the default)
-d, --detailed
Show the unique URN associated with each search result. This does not apply to --music-albums and --music-artists.
-a, --all
Show results which might not be available. This might bebecause a removable media is not mounted for example. Without this option, resources are only shown if they exist. This option applies to all command line switches except
--disable-snippets
Results are shown with snippets. Snippets are context around the word that was searched for in the first place. This gives some idea of if the resource found is the right one. Snippets require Full Text Search to be compile time enabled AND to not be disabled with --disable-fts. Using --disable-snippets only shows the resources which matched, no context is provided about where the match occurred.
--disable-fts
If Full Text Search (FTS) is available, this option allows it to be disabled for one off searches. This returns results slightly using particular properties to match the search terms (like "nie:title") instead of looking for the search terms amongst ALL properties. It is more limiting to do this, but sometimes searching without FTS can yield better results if the FTS ranking is off.
--disable-color
This disables any ANSI color use on the command line. By default this is enabled to make it easier to see results.

SEE ALSO

tracker-stats(1), tracker-tag(1), tracker-info(1).


tracker sparql

Name

tracker-sparql — Use SparQL to query the Tracker databases.

Synopsis

tracker sparql -q <sparql> [-u] | -f <file>
tracker sparql -t [class] [-s <needle>] [-p]
tracker sparql [-c] [-p] [-x] [-n [class]] [-i [property]] [-s <needle>]
tracker sparql [--get-longhand <class>] [--get-shorthand <class>]

DESCRIPTION

This command allows probing of the current database schema (also known as ontology) and running low level queries or updates on the data set. In terms of the database ontology, it’s easy to find out what properties are indexed for speed, or notified on changes, what classes are available and the properties belonging to those classes. There are also visual tools to display an ascii tree layout of the classes and their relationships to each other.

When the caller runs a query, the query is in RDF and SPARQL. This can be done two ways. Either by providing a file with the query or by providing a string with the sparql query.

The file argument can be either a local path or a URI. It also does not have to be an absolute path.

OPTIONS

-f, --file=<file>
Use a file with SPARQL content to query or update.
-q, --query=<sparql>
Use a sparql string to query the database with.
-u, --update
This has to be used with --query. This tells "tracker sparql" to use the SPARQL update extensions so it knows it isn’t a regular data lookup request. So if your query is intended to change data in the database, this option is needed.
-c, --list-classes
Returns a list of classes which describe the ontology used for storing data. These classes are also used in queries. For example, http://www.w3.org/2000/01/rdf-schema#Resource is one of many classes which should be returned here.
-x, --list-class-prefixes
Returns a list of classes and their related prefixes. Prefixes are used to make querying a lot simpler and are much like an alias. For example, http://www.w3.org/2000/01/rdf-schema#Resource has the prefix rdfs so queries can be cut down to:

"SELECT ?u WHERE { ?u a rdfs:Resource }"

-p, --list-properties=[class]
Returns a list of properties which pertain to a class. You can use both formats here for the class, either the full name http://tracker.api.gnome.org/ontology/v3/nfo#Video or the shortened prefix name nfo:Video.

This gives the following result:

$ tracker sparql -p nfo:Video

Properties: 2
  http://tracker.api.gnome.org/ontology/v3/nfo#frameRate
  http://tracker.api.gnome.org/ontology/v3/nfo#frameCount

These properties nfo:frameRate and nfo:frameCount can then be used in queries.

See also --tree and --query.

-n, --list-notifies=[class]
Returns a list of classes which are notified over D-Bus about any changes that occur in the database. The class does not have to be supplied here. This is optional and filters the results according to any argument supplied. With no class, all classes are listed.
-i, --list-indexes=[property]

Returns a list of properties which are indexed in the database. Indexes improves query speed but also add an indexing penalty. The property does not have to be supplied here. This is optional and filters the results according to any argument supplied. With no property, all properties are listed.

  • -g, --list-graphs:: List all the named graphs in the database. These are used by the filesystem miner to separate metadata so that apps can only see the information relevant to them.
-t, --tree=[class]
Prints a tree showing all parent classes of class in the ontology. The class can be provided in shorthand or longhand (see --get-shorthand and --get-longhand for details). For example:
$ tracker sparql -t nmo:MMSMessage
ROOT
  +-- rdfs:Resource (C)
  |  +-- nie:InformationElement (C)
  |  |  +-- nfo:Document (C)
  |  |  |  +-- nfo:TextDocument (C)
  |  |  |  |  `-- nmo:Message (C)
  |  |  |  |  |  +-- nmo:PhoneMessage (C)
  |  |  |  |  |  |  `-- nmo:MMSMessage (C)

If no class is given, the entire tree is shown.

The --search command line option can be used to highlight parts of the tree you’re looking for. The search is case insensitive.

The --properties command line option can be used to show properties for each class displayed, for example:

$ tracker sparql -t nfo:FileDataObject -p
ROOT
  +-- rdfs:Resource (C)
  |  --> http://purl.org/dc/elements/1.1/contributor (P)
  |  --> http://purl.org/dc/elements/1.1/coverage (P)
  |  --> http://purl.org/dc/elements/1.1/creator (P)
  |  --> http://purl.org/dc/elements/1.1/date (P)
  |  --> http://purl.org/dc/elements/1.1/description (P)
  |  --> http://purl.org/dc/elements/1.1/format (P)
  |  --> http://purl.org/dc/elements/1.1/identifier (P)
  |  --> http://purl.org/dc/elements/1.1/language (P)
  |  --> http://purl.org/dc/elements/1.1/publisher (P)
  |  --> http://purl.org/dc/elements/1.1/relation (P)
  |  --> http://purl.org/dc/elements/1.1/rights (P)
  |  --> http://purl.org/dc/elements/1.1/source (P)
  |  --> http://purl.org/dc/elements/1.1/subject (P)
  |  --> http://purl.org/dc/elements/1.1/title (P)
  |  --> http://purl.org/dc/elements/1.1/type (P)
  |  --> nao:deprecated (P)
  |  --> nao:hasTag (P)
  |  --> nao:identifier (P)
  |  --> nao:isRelated (P)
  |  --> nao:lastModified (P)
  |  --> nao:numericRating (P)
  |  --> rdf:type (P)
  |  --> rdfs:comment (P)
  |  --> rdfs:label (P)
  |  --> tracker:added (P)
  |  --> tracker:damaged (P)
  |  --> tracker:modified (P)
  |  +-- nie:DataObject (C)
  |  |  --> nfo:belongsToContainer (P)
  |  |  --> nie:byteSize (P)
  |  |  --> nie:created (P)
  |  |  --> nie:dataSource (P)
  |  |  --> nie:interpretedAs (P)
  |  |  --> nie:isPartOf (P)
  |  |  --> nie:lastRefreshed (P)
  |  |  --> nie:url (P)
  |  |  --> tracker:available (P)
  |  |  +-- nfo:FileDataObject (C)
  |  |  |  --> nfo:fileCreated (P)
  |  |  |  --> nfo:fileLastAccessed (P)
  |  |  |  --> nfo:fileLastModified (P)
  |  |  |  --> nfo:fileName (P)
  |  |  |  --> nfo:fileOwner (P)
  |  |  |  --> nfo:fileSize (P)
  |  |  |  --> nfo:hasHash (P)
  |  |  |  --> nfo:permissions (P)
-s, --search=<needle>
Returns a list of classes and properties which partially match needle in the ontology. This is a case insensitive match, for example:
$ tracker sparql -s text

Classes: 4
  http://tracker.api.gnome.org/ontology/v3/nfo#TextDocument
  http://tracker.api.gnome.org/ontology/v3/nfo#PlainTextDocument
  http://tracker.api.gnome.org/ontology/v3/nfo#PaginatedTextDocument
  http://tracker.api.gnome.org/ontology/v3/nmm#SynchronizedText

Properties: 4
  http://tracker.api.gnome.org/ontology/v3/tracker#fulltextIndexed
  http://tracker.api.gnome.org/ontology/v3/nie#plainTextContent
  http://tracker.api.gnome.org/ontology/v3/nmo#plainTextMessageContent
  http://tracker.api.gnome.org/ontology/v3/scal#textLocation

See also --tree.

--get-shorthand=<class>
Returns the shorthand for a class given by a URL. For example:
$ tracker sparql --get-shorthand http://tracker.api.gnome.org/ontology/v3/nmo#plainTextMessageContent
nmo:plainTextMessageContent
--get-longhand=<class>
Returns the longhand for a class given in the form of CLASS:PROPERTY. For example:
$ tracker sparql --get-longhand nmm:MusicPiece
http://tracker.api.gnome.org/ontology/v3/nmm#MusicPiece

EXAMPLES

List all classes
$ tracker sparql -q "SELECT ?cl WHERE { ?cl a rdfs:Class }"
List all properties for the Resources class (see --list-properties)
$ tracker sparql -q "SELECT ?prop WHERE {
    ?prop a rdf:Property ;
    rdfs:domain <http://www.w3.org/2000/01/rdf-schema#Resource>
}"
List all class namespace prefixes
$ tracker sparql -q "SELECT ?prefix ?ns WHERE {
    ?ns a tracker:Namespace ;
    tracker:prefix ?prefix
}"
List all music files
$ tracker sparql -q "SELECT ?song WHERE { ?song a nmm:MusicPiece }"
List all music albums, showing title, track count, and length in seconds.
$ tracker sparql -q "SELECT ?title COUNT(?song)
                    AS songs
                    SUM(?length) AS totallength
                    WHERE {
    ?album a nmm:MusicAlbum ;
    nie:title ?title .
    ?song nmm:musicAlbum ?album ;
    nfo:duration ?length
} GROUP BY ?album"
List all music from a particular artist
$ tracker sparql -q "SELECT ?song ?title WHERE {
    ?song nmm:performer [ nmm:artistName 'Artist Name' ] ;
    nie:title ?title
}"
Set the played count for a song
$ tracker sparql -u -q "DELETE {
    <file:///home/user/Music/song.mp3> nie:usageCounter ?count
} WHERE {
    <file:///home/user/Music/song.mp3> nie:usageCounter ?count
} INSERT {
    <file:///home/user/Music/song.mp3> nie:usageCounter 42
}"
List all image files
$ tracker sparql -q "SELECT ?image WHERE { ?image a nfo:Image }"
List all image files with a specific tag
$ tracker sparql -q "SELECT ?image WHERE {
    ?image a nfo:Image ;
    nao:hasTag [ nao:prefLabel 'tag' ]
}"
List all image files created on a specific month and order by date
$ tracker sparql -q "SELECT ?image ?date WHERE {
    ?image a nfo:Image ;
    nie:contentCreated ?date .
    FILTER (?date >= '2008-07-01T00:00:00' &&
            ?date <  '2008-08-01T00:00:00')
} ORDER BY ?date"

SEE ALSO

tracker-sql(1), tracker-store(1), tracker-info(1).

http://nepomuk.semanticdesktop.org/ http://www.w3.org/TR/rdf-sparql-query/


tracker sql

Name

tracker-sql — Use SQL to query the Tracker databases.

Synopsis

tracker sql -q <sql> | -f <file>

DESCRIPTION

This command allows probing of the current database. When using commands like tracker sparql, the SPARQL used is translated into SQL before being run on the database. This allows direct use of the database using SQL avoiding the SPARQL engine entirely.

The caller can run a query two ways, either by providing a file with the query or by providing a string with the sql query.

The file argument can be either a local path or a URI. It also does not have to be an absolute path.

OPTIONS

-f, --file=<file>
Use a file with SPARQL content to query. Don’t forget to end all queries with a semicolon (;) and also to use quotes around table names. The quotes are important because most tables are named after ontology classes like "nfo:Document" and queries will fail without the quotes.
-q, --query=<sql>
Use a sql string to query the database with.

EXAMPLES

Show first 10 "nfo:Document" entries where the TOC is not NULL
$ tracker sql -q 'SELECT * FROM "nfo:Document" WHERE "nfo:tableOfContents" NOT NULL LIMIT 10;'

SEE ALSO

tracker-sparql(1), tracker-store(1), tracker-info(1).

http://en.wikipedia.org/wiki/SQL


tracker status

Name

tracker-status — Provide status and statistics on the data indexed

Synopsis

tracker status
tracker status --stat [-a] [[expression1]...]
tracker status --collect-debug-info

DESCRIPTION

Display the status of the current index and data set.

With the --stat option, displays statistics about the RDF classes and how many of each exist for data set that has been indexed. For example, "10 Folders".

This command also provides a way to collect information for debug purposes using the --collect-debug-info option.

OPTIONS

--stat[=expression]
By default, only common and useful classes are shown, e.g. "nfo:Document" or "nfo:Folder", for a full set of statistics, see the --all option.

If one or more expression arguments is given, the statistics returned are filtered to only show information those RDF types matching expression (case folded and matching accented variants). The RDF classes are detailed by the Nepomuk otology specification. A list of possible classes matching expression, see tracker sparql -c.

-a, --all
Display statistics about ALL RDF classes that exist in the database. Without this option only the common RDF classes will be shown, for example "nfo:Document" and "nfo:FileDataObject".

This option is implied if search terms are provided to filter ALL possible statistics.

--collect-debug-info
Useful when debugging problems to diagnose the state of Tracker on your system. The data is output to stdout. Useful if bugs are filed against the project itself.

Data collected includes Tracker version in use, disk space available, size of the databases on the disk, the configuration in use, states of the index (e.g. last filesystem crawl, data set locale, etc.) and finally statistics about the data in the database (e.g. how many "nfo:FileDataObject" resources exist).

SEE ALSO

tracker-daemon(1), tracker-sparql(1), tracker-info(1).

  • http://nepomuk.semanticdesktop.org/
  • http://www.w3.org/TR/rdf-sparql-query/

tracker tag

Name

tracker-tag — Add, remove and list tags.

Synopsis

tracker tag FILE1 [FILE2 ...] [-l <limit>] [-o <offset>] [-r]
tracker tag -t [[TAG1] [TAG2] ...] [-s] [-r]
tracker tag -a <TAG> [-e <description>]
tracker tag -d <TAG>

DESCRIPTION

List tags for local files or by the tag labels themselves if -t is used.

It’s also possible to manage tags with the -a and and -d options.

The FILE argument can be either a local path or a URI. It also does not have to be an absolute path.

OPTIONS

-t, --list
List all tags. Results include the number of files associated with that tag and the tag’s unique identifier. You can show the files associated with each tag by using --show-files.

The TAG arguments are optional. If no TAG argument is specified, all tags are listed. If one or more TAGs are given, either matching tags are listed (OR condition). For example, this will match any tags named either foo, bar or baz:

$ tracker-tag -t foo bar baz
-s, --show-files
Show the files associated with each tag. This option is ONLY available WITH the --list option.
-a, --add=TAG
Add a tag with the name TAG. If no FILE arguments are specified, the tag is simply created (if it didn’talready exist) and no files are associated with it. Multiple FILE arguments can be specified.
-d, --delete=TAG
Delete a tag with the name TAG. If no FILE arguments are specified, the tag is deleted for ALL files. If FILE arguments are specified, only those files have the TAG deleted.
-e, --description=STRING
This option ONLY applies when using --add and provides a description to go with the tag label according to STRING.
-l, --limit=N
Limit search to N results. The default is 512.
-o, --offset=N
Offset the search results by N. For example, start at item number 10 in the results. The default is 0.
-r, --and-operator
Use AND operator for search terms instead of OR (the default). For example:
$ tracker-tag -s -t sliff sloff

Should show files in the database that have both the sliff and sloff tags.

SEE ALSO

tracker-sparql(1), tracker-search(1), tracker-info(1).


tracker writeback

Name

tracker-writeback — Used to write metadata set in Tracker back to physical files.

Synopsis

tracker-writeback [OPTION…]

DESCRIPTION

tracker-writeback is not supposed to be run by the user since it is started by its .desktop file when the user logs in. It can also be started manually of course for debugging purposes. You can not run more than one instance of this at the same time.

tracker-writeback writes metadata from the Tracker database back into files only. Currently support is limited to XMP metadata (which covers PNG, JPEG, TIFF, MP4 and 3GPP formats), play lists (which covers MPEGURL, SCPLS and IRIVER formats) and taglib supported mime types (which covers MP3, MP4, OGG, WAV, FLAC and some Windows media formats).

Data is only written back if write-back is enabled in the tracker-miner-fs configuration.

OPTIONS

-?, --help
Show summary of options.
-V, --version
Returns the version of this binary.
-d, --disable-shutdown
Disable shutting down after 30 seconds of inactivity.

SEE ALSO

tracker-miner-fs(1). tracker-extract(1).