22.16.99. salt.modules.locate

Module for using the locate utilities

salt.modules.locate.locate(pattern, database='', limit=0, **kwargs)

Performs a file lookup. Valid options (and their defaults) are:

basename=False
count=False
existing=False
follow=True
ignore=False
nofollow=False
wholename=True
regex=False
database=<locate's default database>
limit=<integer, not set by default>

See the manpage for locate(1) for further explanation of these options.

CLI Example:

salt '*' locate.locate
salt.modules.locate.stats()

Returns statistics about the locate database

CLI Example:

salt '*' locate.stats
salt.modules.locate.updatedb()

Updates the locate database

CLI Example:

salt '*' locate.updatedb
salt.modules.locate.version()

Returns the version of locate

CLI Example:

salt '*' locate.version

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.16.98. salt.modules.localemod

Next topic

22.16.100. salt.modules.logadm

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.