Authorities say a Clarendon County deputy shot a man who pulled a knife on the officer while he was writing a speeding ticket for a different person.