Few–cycle terahertz generation and spectroscopy of nanostructures