كتاب الحج
15  
The Book of Pilgrimage
(55)
Chapter: Shaving the head is preferrable to cutting the hair, although cutting the hair is permissible
(55)
باب تَفْضِيلِ الْحَلْقِ عَلَى التَّقْصِيرِ وَجَوَازِ التَّقْصِيرِ ‏‏
Sahih Muslim 1302 a

Abu Huraira reported Allah's Messenger (ﷺ) as having said:

O Allah, grant pardon to those who got their heads shaved. They (Companions of the Holy Prophet) said: Messenger of Allah, (what about those) who get their hair cut? He said: O Allah, grant pardon to those who get their heads shaved. They said: Messenger of Allah, (what about those) who got their hair clipped? He said: O Allah, grant pardon to those who get their heads shaved. They said: Messenger of Allah, (what about those) who get their hair clipped? He said: (O Allah, grant pardon to) those who get their hair clipped.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَزُهَيْرُ بْنُ حَرْبٍ، وَابْنُ، نُمَيْرٍ وَأَبُو كُرَيْبٍ جَمِيعًا عَنِ ابْنِ فُضَيْلٍ، - قَالَ زُهَيْرٌ حَدَّثَنَا مُحَمَّدُ بْنُ فُضَيْلٍ، - حَدَّثَنَا عُمَارَةُ، عَنْ أَبِي زُرْعَةَ، عَنْ أَبِي، هُرَيْرَةَ قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ اللَّهُمَّ اغْفِرْ لِلْمُحَلِّقِينَ ‏"‏ ‏.‏ قَالُوا يَا رَسُولَ اللَّهِ وَلِلْمُقَصِّرِينَ قَالَ ‏"‏ اللَّهُمَّ اغْفِرْ لِلْمُحَلِّقِينَ ‏"‏ ‏.‏ قَالُوا يَا رَسُولَ اللَّهِ وَلِلْمُقَصِّرِينَ قَالَ ‏"‏ اللَّهُمَّ اغْفِرْ لِلْمُحَلِّقِينَ ‏"‏ ‏.‏ قَالُوا يَا رَسُولَ اللَّهِ وَلِلْمُقَصِّرِينَ قَالَ ‏"‏ وَلِلْمُقَصِّرِينَ ‏"‏‏.‏
Reference : Sahih Muslim 1302a
In-book reference : Book 15, Hadith 352
USC-MSA web (English) reference : Book 7, Hadith 2987
  (deprecated numbering scheme)