If you don't have time to flick open your knife(and it can happen even with an auto!) by all means use it closed and hit the sob. I am talking kutoban(sp) style here not as a fist load. I closed knife is too irregular an object and one can break a finger punching while holding it. There are exceptions of course.
Now, my paranoid nature just kicked in... Why do you ask? No, you cannot use your closed knife to DOINK some idiot on the head no matter how much he needs it

If you want to avoid legal issues after defending yourself...FORGET IT! After ANY fight you need to contact the police FIRST thing. Remember, if someone attacks you and losses the fight, well let me state that grown men can be very immature and that most lawsuits are of the "spoil sport" nature. "If I can't win, I'll make you pay/suffer/regret it!"
As for just slapping away an attacker... Steet fights are not like schoolyard brawls (schoolyard brawls aren't like schoolyard brawls anymore for that matter! But try tell that to a jury.) If someone wants to hurt you, either run or drop the sob... HARD. One punch and he may go down, but in three seconds he is back on his feet and pissed off. So run or follow up the assualt(legal note: you can only PREVENT him from attacking again, i.e. keep him down. Courts frown on hitting people on the ground. Ain't I just full of good news.) The reason many women don't fight back in rape situations is because they known that half-a$$ed fighting back WILL backfire.(I not saying they are right, just what their pre-formed ideas are. In the case of rape, fighting has more to offer than otherwise IMO, but that me.)
Now that my non-linear thought process has you wondering just what my point is...
If you are going to fight someone, YOU NEED TO FIGHT HIM TO THE LIMIT OF YOUR ABLITY. Of course, one always needs to include moral judgement and legal responsiblity.