"small, flat, single-cut file for trimming the fingernails," by 1819, from nail (n.) + file (n.2).
Entries linking to nail-file
nail n.
Old English negel "tapering metal pin," nægl "fingernail (handnægl), toenail," from Proto-Germanic *naglaz (source also of Old Norse nagl "fingernail," nagli "metal nail;" Old Saxon and Old High German nagel, Old Frisian neil, Middle Dutch naghel, Dutch nagel, German Nagel "fingernail; small metal spike"), from PIE root *(o)nogh "nail of the finger or toe" (source also of Greek onyx "claw, fingernail;" Latin unguis "fingernail, claw;" Old Church Slavonic noga "foot," noguti "fingernail, claw;" Lithuanian naga "hoof," nagutis "fingernail;" Old Irish ingen, Old Welsh eguin "fingernail, claw").
The "fingernail" sense seems to be the original one, but many figurative uses are from the "small metal spike" sense: hard as nails is from 1828. To hit the nail on the head "say or do just the right thing" is by 1520s; in Middle English driven in the nail (c. 1400) was "to drive home one's point, clinch an argument," and smiten the nail on the hed was "tell the exact truth" (mid-15c.). Phrase on the nail "on the spot, exactly" is from 1590s, of obscure origin; OED says it is not certain it belongs to this sense of nail.
As a unit of English cloth measure (about 2 1/4 inches) from late 14c.; perhaps from a nail being used to mark that length on the end of a yardstick.
file n.2
metal tool for abrading or smoothing, Old English feol (Mercian fil) "file," from Proto-Germanic *fihalo "cutting tool" (source also of Old Saxon fila, Old High German fila, Middle Dutch vile, Dutch vijl, German Feile), probably from PIE root *peig- "to cut, mark by incision" (source also of Old Church Slavonic pila "file, saw," Lithuanian piela "file"). Century Dictionary (1906) lists 60 named varieties of them. Nail file (for the fingernails) is by 1819.