USC-MSA web (English) : Book 51, Hadith 7
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
أَلَيْسَ هَذَا خَيْرًا مِنْ أَنْ يَأْتِيَ أَحَدُكُمْ ثَائِرَ الرَّأْسِ كَأَنَّهُ شَيْطَانٌ "
Yahya related to me from Malik from Zayd ibn Aslam that Ata ibn Yasar told him that the Messenger of Allah (ﷺ) was in the mosque when a man came in with dishevelled hair and beard. The Messenger of Allah. may Allah bless him and grant him peace, motioned with his hand that he should be sent out to groom his hair and beard. The man did so and then returned. The Messenger of Allah (ﷺ) said, "Isn't this better than that one of you should come with his head dishevelled, as if he were a shaytan?"
Full reference and source
USC-MSA web (English) : Book 51, Hadith 7 Arabic : Book 51, Hadith 1739
View source on Sunnah.com (opens in a new tab)