Export data using the CLI

The Command Line Interface (CLI) is easy to script, can handle automation, and can process volumes of data faster and more efficiently than Splunk Web. To access Splunk Enterprise through the CLI, you either need shell access to a Splunk Enterprise server, or permission to access the correct port on a remote Splunk server. If you have Splunk Cloud, you do not have shell access to your Splunk Cloud deployment, so cannot use the CLI to export data.

By default, you can export a maximum of 100 events. To increase this number, use the -maxout argument. For example, if you include -maxout 300000 you can export 300,000 events. Set -maxout to 0 to export an unlimited number of events.

To learn more about the Splunk Enterprise CLI, read About the CLI in the Admin Manual.

CLI output command example

This CLI example takes events from the _internal index that occur within the time range specified by the search string and outputs 200,000 of them in raw data format to the file test123.dmp.

Comments

Enter your email address, and someone from the documentation team will respond to you:

Send me a copy of this feedback

Please provide your comments here. Ask a question or make a suggestion.

Feedback submitted, thanks!

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

Your Comment Has Been Posted Above

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website.
Learn more (including how to update your settings) here »