The behaviour of the velocity and pressure fluctuations in the logarithmic and outer layers of turbulent flows is analysed using spectral information and probability density functions from channel simulations at Reτ≤2000. Comparisons are made with experimental data at higher Reynolds numbers. It is found, in agreement with previous investigations, that the intensity profiles of the streamwise and spanwise velocity components have logarithmic ranges that are traced to the widening spectral range of scales as the wall is approached. The same is true for the pressure, both theoretically and observationally, but not for the normal velocity or for the tangential stress cospectrum, although even those two quantities have structures with lengths of the order of several hundred times the wall distance. Because the logarithmic range grows longer as the Reynolds number increases, variables which are ‘attached’ in this sense scale in the buffer layer in mixed units. These results give strong support to the attached-eddy scenario proposed by Townsend (1976), but they are not linked to any particular eddy model. The scaling of the outer modes is also examined. The intensity of the streamwise velocity at fixed y/h increases with the Reynolds number. This is traced to the large-scale modes, and to an increased intensity of the ejections but not of the sweeps. Several differences are found between the outer structures of different flows. The outer modes of the spanwise and wall-normal velocities in boundary layers are stronger than in internal flows, and their streamwise velocities penetrate closer to the wall. As a consequence, their logarithmic layers are thinner, and some of their logarithmic slopes are different. The channel statistics are available electronically at http://torroja.dmt.upm.es/ftp/channels/.