uniq
uniq
Synopsis
Filters out repeated adjacent results.
Syntax
uniq
Description
The uniq command works as a filter on the search results that you pass into it. It removes any search result if it is an exact duplicate with the previous result. This command does not take any arguments.
Examples
Example 1: Keep only unique results from all web traffic in the past hour.
eventtype=webtraffic earliest=-1h@s | uniqNote: If you have a large dataset, it's more efficient to use the dedup command on the _raw field in place of uniq:
... | dedup _rawSee also
Answers
Have questions? Visit Splunk Answers and see what questions and answers the Splunk community has using the uniq command.
This documentation applies to the following versions of Splunk: 4.1 , 4.1.1 , 4.1.2 , 4.1.3 , 4.1.4 , 4.1.5 , 4.1.6 , 4.1.7 , 4.1.8 , 4.2 , 4.2.1 , 4.2.2 , 4.2.3 , 4.2.4 , 4.2.5 , 4.3 , 4.3.1 , 4.3.2 View the Article History for its revisions.
"If you have a large dataset, it's a better practice to use the dedup command on the _raw field in place of uniq: "
Why? What does "better" mean? More efficient? More reliable? Why ever use "uniq" instead of "dedup _raw"?