For example, why do you say "как узнать сказал ли он правду" and not "как знать" although you ask for the general rules of knowing that someone spoke the truth and not just in one certain situation?
If you want to say something meaning
I don't knowand you don't want to know exactly, if he said the truth, you may say
Как знать, сказал ли он правду
If you are interested to know exactly if he said the truth or not, you may say
Как узнать, сказал ли он правду, meaning you need an bunch of steps to detect, did he said the truth and you rather going to perform them.
knowing that someone spoke the truth and not just in one certain situation?
Note that you have two verbs here. The verb "сказать" (or "говорить") shows if you talk of a single instance or of many ones. But the verb "знать" (or "узнать") is about what exactly you want to know.
Mentioning some "general rule" implies that your knowledge should be as much independent on actual situation as possible. So it's only natural to use perfective to show this.
But actually in Russian there are very few restrictions on what you can't say. So let's put it this way (shuffling words a little to get rid of secondary meanings):
А мне как знать говорит он правду или нет?
This sentence uses imperfective "знать" and is perfectly OK. But as you may see it's not about "general rules". It's rather a rhetorical question which could be transformed into simple "I don't know".
That's because imperfective verb "mixes" into all "situations", so you are not talking about any "positive general knowledge" anymore.
So to put it short, the choice of verb is nearly always about semantics, and not about grammar rules.