“He who knows when he can fight and when he cannot will be victorious.”
Source: The Art of War, Chapter III · Strategic Attack
Original
知可战与不可战者胜。
Help us to complete the source, original and additional information
Sun Tzu 68
ancient Chinese military general, strategist and philosophe… -543–-495 BCRelated quotes

The Art of Poetry on a New Plan (1761), vol. ii. p. 147.
The saying "he who fights and runs away may live to fight another day" dates at least as far back as Menander (ca. 341–290 B.C.), Gnomai Monostichoi, aphorism #45: ἀνήρ ὁ ϕɛύγων καὶ ράλίν μαχήɛṯαί (a man who flees will fight again). The Attic Nights (book 17, ch. 21) of Aulus Gellius (ca. 125–180 A.D.) indicates it was already widespread in the second century: "...the orator Demosthenes sought safety in flight from the battlefield, and when he was bitterly taunted with his flight, he jestingly replied in the well-known verse: The man who runs away will fight again".

“He, therefore, who desires peace, should prepare for war. He who aspires to victory, should spare no pains to form his soldiers. And he who hopes for success, should fight on principle, not chance. (Book 3, Foreword)”
Igitur qui desiderat pacem, praeparet bellum; qui uictoriam cupit, milites inbuat diligenter; qui secundos optat euentus, dimicet arte, non casu.
De Re Militari (also Epitoma Rei Militaris), Book III, "Dispositions for Action"
Variant: Si vis pacem para bellum. ("If you want peace, prepare for war.")

St. 11.
The Battle of Blenheim http://www.poetry-archive.com/s/the_battle_of_blenheim.html (1798)

Samuel Butler's Notebooks http://books.google.com/books?id=cjk3AAAAIAAJ&q=%22One+of+the+first+businesses+of+a+sensible+man+is+to+know+when+he+is+beaten+and+to+leave+off+fighting+at+once%22&pg=PA186#v=onepage (1951)