Difference between "not every" and "every ... is not"

You are correct; Karan of the superuser question you referenced made a grammatical error. It should have been as you phrased it:

Not everything in DOS is plain-text

That being said, your understanding in the two examples you posted is slightly off. It should be

Every human is not a man. There is no human being who is a man.

Not every human is a man. There are human beings who are not men.

Such logic mistakes (especially with double negatives) are very common even among native English speakers. The fact that you are able to discern the intended meaning of Karan's comment, even with its incorrect phrasing, and your excellent grammar in this post tells me that you do not at all have a fundamental misunderstanding; on the contrary, your english seems quite good.