Libraries often subscribe to databases such as these and may offer additional electronic resources with city directories that are free for patrons.
The FamilySearch Library has a comprehensive collection, including pre-1860 directories—search the catalog by [STATE], [COUNTY], [TOWN] – DIRECTORIES or click on the state name at the bottom of their United States Directories page. Ancestry, Fold 3, and other genealogy subscription services have more limited but useful collections of city directory records. Libraries often subscribe to databases such as these and may offer additional electronic resources with city directories that are free for patrons. Consult a reference librarian locally for more resources available to you.