USC-MSA web (English) : Book 20, Hadith 247
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 Humayd bin Qays from Mujahid Abu 'l Hajjaj from Ibn Abi Layla from Kab ibn Ujra that the Messenger of Allah (ﷺ) said to him, "Perhaps your pests are troubling you?" He replied that indeed they were, and the Messenger of Allah (ﷺ) said, "Shave your head and fast three days or feed six poor men or sacrifice a sheep."
Full reference and source
USC-MSA web (English) : Book 20, Hadith 247 Arabic : Book 20, Hadith 944
View source on Sunnah.com (opens in a new tab)