Maliks Muwatta Book 20, Hadith Number 193.

Section : Shaving the Head.

Yahya related to me from Malik from Nafi from Abdullah ibn Umar that the Messenger of Allah, may Allah bless him and grant him peace, said, “O Allah, have mercy on those who shave their hair.” They said, “And those who shorten (their hair), Messenger of Allah.” He said, “O Allah, have mercy on those who shave.” They said, “And those who shorten, Messenger of Allah.” He said, “And those who shorten.”