Certain simplicial complexes are used to construct a subset D of Fm2n and D, in turn, defines the linear code CD over F2n that consists of (v · d) d∈D for v ∈ Fm2n . Here we deal with the case n = 3, that is, when CD is an octanary code. We establish a relation between CD and its binary subfield code C (2) D with the help of generator matrix. For a given length and dimension, a code is called distance optimal if it has the highest possible distance. With respect to the Griesmer bound, five infinite families of distance optimal codes are obtained, and sufficient conditions for certain linear codes to be minimal are established.