Most earwigs are nocturnal and inhabit small crevices, living in small amounts of debris, in various forms such as bark and fallen logs. Species have been found to be blind and living in caves, or cavernicolous, reported to be found on the island of Hawaii and in South Africa. Food typically consists of a wide array of living and dead plant and animal matter. For protection from predators, the species Doru taeniatum of earwigs can squirt foul-smelling yellow liquid in the form of jets from scent glands on the dorsal side of the third and fourth abdominal segment. It aims the discharges by revolving the abdomen, a maneuver that enables it simultaneously to use its pincers in defense. Under exceptional circumstances, earwigs form swarms and can take over significant areas of a district. In August 1755 they appeared in vast numbers near Stroud, Gloucestershire, UK, especially in the cracks and crevices of "old wooden buildings...so that they dropped out oftentimes in such multitudes as to literally cover the floor." A similar "plague" occurred in 2006, in and around a woodland cabin near the Blue Ridge Mountains, U.S.; it persisted through winter and lasted at least two years.
Read more, here.