  Formation of femtosecond sawtooth pulses by high harmonic generation from
relativistic oscillating mirrors is studied. For oblique incidence of
$p$-polarized laser pulse, one can efficiently control the intensity of the
first few harmonics by modifying the plasma density gradient at the
plasma-vacuum interface. With appropriate choice of the laser amplitude and
incidence angle, the generated harmonics can form a millijoule femtosecond
sawtooth pulse. The scheme does not rely on phase manipulation and/or pulse
synchronization as in the state-of-art methods. It is also shown that such a
sawtooth pulse can boost the generation of ultrashort terahertz pulses in
laser-plasma interaction by one order of magnitude, as compared with that from
the conventional two-color laser pulse.
