Nowadays we have computers to search with, or in more recent history, we've had organization methods like the Dewey Decimal System to help find books. But I wonder, how did people locate books/writings in ancient libraries?
How ancient are we talking here? Medieval libraries kept their own catalogs for reference, and slightly-less-than modern systems such as the Robert Cotton Collection sometimes had unique filling systems.
The library of Ashurbanipal is probably the oldest extant, and was probably organized in a rational manner, i.e. by subject or referencing a particular location in the library.