The sheer force between a gold and a graphite sample and an approaching nea
r-field optical probe using tuning fork detection is studied in detail. The
adiabatic and dissipative contributions are clearly distinguished by monit
oring the amplitude as well as the phase of the tip vibration when approach
ing the surfaces. Their relative strengths vary differently but characteris
tically with the distance. The interaction starts in case of graphite at a
much larger distance. The adiabatic contribution is larger in the case of g
old, whereas graphite shows mostly dissipative interaction. Measurements at
various temperatures are performed using a gold sample, showing a dependen
ce of the shear force on the temperature.