A supersonic flow over a rectangular cavity is known to oscillate at certain predominant frequencies. The present study focuses on the effect of the cavity length-to-depth ( / ) ratio on the frequency for a free-stream Mach number of 1.7. The pressure oscillations are measured by changing the / ratio from 0.5 to 3.0, and the power spectral density is calculated from the temporal pressure signals for each / ratio. The results demonstrate that the spectral peaks for an / ratio of less than ∼1 and greater than ∼2 are accounted for by the feedback mechanisms of the transverse and longitudinal oscillations, respectively. The results also demonstrate that the spectral peaks in the transition (1 <∼ / <∼ 2) are accounted for by either of the two feedback mechanisms of transverse and longitudinal oscillations; that is, the flows under the transition regime oscillate both transversely and longitudinally.