Previous Topic: Example: Count Entries in a Distributed Directory

Next Topic: Example: Count the Entries at the Base Level

Example: Count Entries at a Single Level in a Single DSA

This is a one-level search, which means that the filter is applied to the entries immediately below the base object, but not to the base object itself.

To count how many top-level department names in the Democorp DSA include the letter C

  1. Run the following search:
    dxsearch -h computer-name -p 19389 -s one -b "o=DEMOCORP,c=AU" (ou="*c*") dxEntryCount
    

    In this search, computer-name is the computer that contains the Democorp DSA.

  2. Check the following result for the number of entries:
    o=DEMOCORP,c=AU
    dxEntryCount=6
    

    This search result indicates that 6 of the top-level department names contain the letter c.