Sahih Muslim Book 7, Hadith Number 2989.

Chapter : It is preferable to get one’s hair cut (as a ritual of pilgrimage) but clipping is also permissible.

Yahya b. al-Husain reported on the authority of his grandfather that Allah’s Apostle (may peace be upon him) invoked blessing on the occasion of the Farewell Pilgrimage three times for those who got their heads shaved and once for those who got their hair clipped. In the narration transmitted by Waki’ there is no mention of the Farewell Pilgrimage.