Question: On several of the newer hard rives that I’ve used, I’ve noticed that they will often stop spinning when not in use – presumably to save energy and to prolong its life. Interestingly, however, I’ve also observed that when a drive isn’t spinning, I’m still able to get a directory listing from the top level of the drive – and folders below it. The drive will spin up when I then open an actual file – but how is it possible for a directory listing to be provided when the drive isn’t physically spinning?

Answer: Caching.

Both the operating system and drive have caches that buffer recently used drive data. If data is in the cache then it does not need to go direct to the disk platter.

Directory listing data will be quite likely to be buffered, especially if you have recently been to that directory.

Modern spinning drives have caches up to 64MB, while your operating system has almost all the memory not currently used by programs.