# Select duplicate values from a list [duplicate]

How can I select the duplicate values in a list?

Example:

{1, 2, 1, 1, 1, 1}

-

## marked as duplicate by Öskå, Leonid Shifrin, m_goldberg, tkott, RunnyKineJun 9 '14 at 16:22

I need to return the duplicate values. –  Developer2000 Jun 9 '14 at 15:07
So in your example what do you need to return? –  Öskå Jun 9 '14 at 15:08
I need to return {1} –  Developer2000 Jun 9 '14 at 15:15
Have you even looked at the link above? It returns {1}. Please make an effort. –  Öskå Jun 9 '14 at 15:17
@Öskå, I am so sorry! thanks –  Developer2000 Jun 9 '14 at 15:20

list = {1, 2, 1, 1, 1, 1}

Select[Split@Sort@list, Length@# > 1 &][[;;,1]]