Sunan an-Nasa'i, Book 48, Hadith 27 (Nasa'i 5075)

It was narrated that Wa'il bin Hujr said:

"I came to the Prophet and I had long hair. He said: 'It is not good,' and I thought he meant me, so I went and cut my hair. He said: 'I did not mean you, but this is better.'"