Shaving the head is preferrable to cutting the hair, although cutting the hair is permissible
وَحَدَّثَنِي أُمَيَّةُ بْنُ بِسْطَامَ، حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، حَدَّثَنَا رَوْحٌ، عَنِ الْعَلاَءِ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم بِمَعْنَى حَدِيثِ أَبِي زُرْعَةَ عَنْ أَبِي هُرَيْرَةَ.
A hadith like this is narrated on the authority of Abu Huraira.