Language:
كتاب الحج
25  
Hajj (Pilgrimage)
(127)
Chapter: To shave the head and to have the head-hair cut short on finishing the Ihram
(127)
باب الْحَلْقِ وَالتَّقْصِيرِ عِنْدَ الإِحْلاَلِ
Sahih al-Bukhari 1727

Narrated `Abdullah bin `Umar:

Allah's Messenger (ﷺ) said, "O Allah! Be merciful to those who have their head shaved." The people said, "O Allah's Messenger (ﷺ)! And (invoke Allah for) those who get their hair cut short." The Prophet (ﷺ) said, "O Allah! Be merciful to those who have their head shaved." The people said, "O Allah's Messenger (ﷺ)! And those who get their hair cut short." The Prophet (ﷺ) said (the third time), "And to those who get their hair cut short." Nafi` said that the Prophet (ﷺ) had said once or twice, "O Allah! Be merciful to those who get their head shaved," and on the fourth time he added, "And to those who have their hair cut short."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، أَخْبَرَنَا مَالِكٌ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ ـ رضى الله عنهما ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏ اللَّهُمَّ ارْحَمِ الْمُحَلِّقِينَ ‏"‏‏.‏ قَالُوا وَالْمُقَصِّرِينَ يَا رَسُولَ اللَّهِ قَالَ ‏"‏ اللَّهُمَّ ارْحَمِ الْمُحَلِّقِينَ ‏"‏‏.‏ قَالُوا وَالْمُقَصِّرِينَ يَا رَسُولَ اللَّهِ قَالَ ‏"‏ وَالْمُقَصِّرِينَ ‏"‏‏.‏ وَقَالَ اللَّيْثُ حَدَّثَنِي نَافِعٌ ‏"‏ رَحِمَ اللَّهُ الْمُحَلِّقِينَ ‏"‏ مَرَّةً أَوْ مَرَّتَيْنِ‏.‏ قَالَ وَقَالَ عُبَيْدُ اللَّهِ حَدَّثَنِي نَافِعٌ وَقَالَ فِي الرَّابِعَةِ ‏"‏ وَالْمُقَصِّرِينَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1727
In-book reference : Book 25, Hadith 205
USC-MSA web (English) reference : Vol. 2, Book 26, Hadith 785
  (deprecated numbering scheme)