Splunk Cloud

Search Reference

Download manual as PDF

Download topic as PDF



Returns the last N number of specified results. The events are returned in reverse order, starting at the end of the result set. The last 10 events are returned if no integer is specified


tail [<N>]

Required arguments


Optional arguments

Syntax: <int>
Description: The number of results to return.
Default: 10


Example 1:

Return the last 20 results in reverse order.

... | tail 20

See also

head, reverse


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


This documentation applies to the following versions of Splunk Cloud: 7.0.11, 7.0.13, 7.1.3, 7.1.6, 7.2.4, 7.2.6, 7.2.7, 7.2.8, 7.2.9, 8.0.2001


Woodcock - Yes the tail command is essentially the same as using the " | reverse | head " commands. I will communicate your request to the product team. Please also file an enhancement request through the support portal so we can track it properly.

Lstewart splunk, Splunker
May 4, 2018

So essentially this is an alias for "| reverse | head" which seems silly. It is too late now to have it not reverse by default. It would be nice if we could do "tail -10" to keep all but the first 10 lines (the opposite of "tail 10").

April 25, 2018

Was this documentation topic helpful?

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

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

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