Splunk® Enterprise

Search Reference

Acrobat logo Download manual as PDF

Splunk Enterprise version 6.x is no longer supported as of October 23, 2019. See the Splunk Software Support Policy for details. For information about upgrading to a supported version, see How to upgrade Splunk Enterprise.
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Acrobat logo Download topic as PDF


Beginning with version 7.0.0, support for the the crawl command is removed. See the 7.0.0 Release Notes.


Crawls the file system to discover new sources to index, using built-in settings.


| crawl [ files | network ] [<crawl-option>...]

Optional arguments

Syntax: <string>=<string>
Description: Overrides the settings in the crawl.conf file.


The default crawl settings are found in the crawl.conf file. If you have Splunk Enterprise, you can view a log of crawl operations in the $SPLUNK_HOME/var/log/splunk/crawl.log file. This command is generally used in conjunction with the input command.

The crawl command is a generating command and should be the first command in the search. Generating commands use a leading pipe character.

When you add the crawl command to a search, the search returns only data that is generated from the crawl command. The search does not return any data generated before the crawl command.


Example 1:

crawl root and home directories and add all possible inputs found. Adds configuration information to "inputs.conf".

| crawl root="/;/Users/" | input add

Example 2:

Crawl bob's home directory.

| crawl root=/home/bob

Example 3:

Add all sources found in bob's home directory to the 'preview' index.

| crawl root=/home/bob | input add index=preview

Example 4:

Use the default settings defined in the crawl.conf file.

| crawl

See also



Have questions? Visit Splunk Answers and see what questions and answers the Splunk community has using the crawl command.

Last modified on 04 April, 2019

This documentation applies to the following versions of Splunk® Enterprise: 6.5.7

Was this documentation topic helpful?

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters