I've been trying to find a definitive answer on this for a couple of days now to no avail. When you run hosts -h, you get this:

msf > hosts -h
Usage: hosts [ options ] [addr1 addr2 ...]

OPTIONS:
-a,--add Add the hosts instead of searching
-d,--delete Delete the hosts instead of searching
-c <col1,col2> Only show the given columns (see list below)
-h,--help Show this help information
-u,--up Only show hosts which are up
-o <file> Send output to a file in csv format
-R,--rhosts Set RHOSTS from the results of the search

Available columns: address, address6, arch, comm, comments, created_at, info, mac, name, os_flavor, os_lang, os_name, os_sp, purpose, state, updated_at


What interested me was the "Set RHOSTS from the results of the search" description, as well as the "instead of searching" on the add and delete options. This implies that there is a mechanism to search hosts with this command. For the life of me I can't figure out how. How, for instance, would I display all windows 2000 hosts that I've collected in my database?