Classical Japanese (文語) traces alive in C2 modern prose: べからず, ざる, たりとも and ごとし
Recognise ざる, べからず, たりとも, ごとし, ゆえに and んがため in modern formal Japanese, and choose unmarked alternatives for ordinary conversation.

In short
Modern 文語 survivals carry recognisable meanings: ざる negates a modifier, べからず prohibits, たりとも excludes even a minimum, and ごとし makes a comparison. Read ゆえに as formal consequence and 〜んがため as literary purpose; use neutral equivalents unless the genre warrants the elevated tone.
Six constructions that survive in written Japanese
許されざる行為An inexcusable act
Focus: Negative attributive
Classical negative attributive ざる; modern 許されない.
記録の改竄は許されざる行為である。 — Falsifying records is an inexcusable act.
立ち入るべからずDo not enter
Focus: Prohibition
Dictionary form + べからず; compare 立ち入ってはならない.
許可なく保管庫に立ち入るべからず。 — Do not enter the vault without permission.
一歩たりともNot even one step
Focus: Minimal amount + negative predicate
Quantity + たりとも + negation.
ここから一歩たりとも退くつもりはない。 — I have no intention of retreating even one step.
夢のごとしLike a dream
Focus: Literary simile
Noun + の + ごとし (predicate); ごとき (attributive); ごとく (adverbial).
夢のごとき光景が広がった。 — A dreamlike sight unfolded.
それゆえにFor that reason
Focus: Consequence
ゆえに connects a reason to a consequence; compare そのため.
資料が断片的である。それゆえに断定は避ける。 — The materials are fragmentary; hence we avoid a definitive conclusion.
真相を明かさんがためIn order to uncover the truth
Focus: Elevated expression of purpose
Verb irrealis stem + んがため; する becomes せんがため.
真相を明かさんがため、彼は資料を集め続けた。 — To uncover the truth he continued collecting materials.
In actual prose, the negative ざる belongs to particular formal constructions rather than a productive casual ending. With the verb する the classical shape is せざる (not しざる); 予期せざる結果 is a familiar expression. A prohibition in a contemporary workplace manual is usually clearer with 〜てはならない or 〜ないでください rather than the inscription-like べからず. Do not assume that every legal text uses classical forms. Literary comparison with ごとき can also convey disdain in a construction such as 私ごとき; that meaning is not present in every simile.
本来の目的を達せんがための措置が、かえって目的を損なうこともある。
である体 writtenA measure intended to achieve the original aim can instead undermine it.
達する in this literary construction becomes 達せん. The concessive contrast is carried by かえって, not by the purpose marker.