How long a virus can live depends on the surface.
Cool, moist glass in the shade, for instance, might retain many kinds of rhinovirus or coronavirus for days.
Brass which is dry, sun-baked, and covered with verdigris and zinc compounds, on the other hand, might be germ-free within half an hour of being touched.
Such compounds are bad for most microbes, so filthy lucre, especially coins made of copper alloys, is not nearly as horribly germy as one might expect.
By and large, rhinoviruses are the most common causes of colds. They are picornaviruses, which are generally only moderately stable. Desiccation and ultraviolet light in open sunshine should render most surfaces safe quite quickly.
A cozy damp pocket handkerchief, though, might harbor the germs for days, unless it is infested with decay bacteria that digest viruses along with the nutritious secretions donated by the owner.
To avoid infection in a viral epidemic, it makes sense to avoid touching your face as much as possible and to wash your hands before doing so.