The hair of the Holy Prophet (Sallallahu Alaihi Wa Sallam) was in length up to the middle of his ears. In other traditions his hair was in line with the ears and in a third tradition his hair reached the lobes of his ears. Yet there are traditions according to which his hair came down to the shoulders or near the shoulders. [Shamail-e-Tirmizi]
All these traditions can be reconciled if it is taken that when he applied oil or combed it, the hair looked longer, alternatively, the traditions represent the position before and after trimming.
In Mawahib and also in Majma’ul Bihar it has been mentioned that if there was long interval after trimming the hair, it would grow long and after trimming it would be short.
This indicates that the Holy Prophet (Sallallahu Alaihi Wa Sallam) used to have his hair trimmed and not shaved. About shaving (halq), the Holy Prophet (Sallallahu Alaihi Wa Sallam) has himself mentioned that excepting the occasions of Hajj and Umra, he did not have the hair shaved. [Madrij-un-Nubawah}
The Holy Prophet (Sallallahu Alaihi Wa Sallam) used to comb his hair very often. Whenever he saw anyone with disheveled and untidy hair, he would express his dislike and say: Has any one of you seen him, indicating him to be a devil. In like manner he did not approve of men who indulged much in self-adornment or had very long hair. He loved moderation. [Madarij-un-Nubawah]