We consider the model of hashing with linear probing and we establish the moderate and large deviations for the total displacement in sparse tables. In this context, Weibull-like-tailed random variables appear. Deviations for sums of such heavy-tailed random variables are studied in \cite{Nagaev69-1,Nagaev69-2}. Here we adapt the proofs therein to deal with conditioned sums of such variables and solve the open question in \cite{TFC12}. By the way, we establish the deviations of the total displacement in full tables, which can be derived from the deviations of empirical processes of i.i.d.\ random variables established in \cite{Wu94}..