Splunk Search

How to search for the most common word used?

NoisyClip
Engager

Hi,

I've a file which contains a chunk of words. What I wanted to do is to find the top 10 most common word used from this file. How should my search looks like?

Thanks in advance!

Tags (3)
0 Karma
1 Solution

strive
Influencer

If you can post some sample data, then it will be helpful for splunkers to help you

Check this out if this solves your problem http://answers.splunk.com/answers/62413/how-to-extract-most-popular-words-from-the-source-data

View solution in original post

strive
Influencer

If you can post some sample data, then it will be helpful for splunkers to help you

Check this out if this solves your problem http://answers.splunk.com/answers/62413/how-to-extract-most-popular-words-from-the-source-data

msenebald
Explorer

Hi,
depends a bit how your events look like.
I guess the easiest way is make every word a new event and use top.

Or use just shell script on nix

cat file.txt | sed -r 's/[[:space:]]+/\n/g' | sed '/^$/d' | sort | uniq -c | sort -n | tail -n10

Good luck

Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...