Carlos Sainz took a comfortable win on Stage 6 of the Dakar Rally to cut the gap to Stephane Peterhansel in the overall classification.