HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

Example 28 Usage example:
ldapsearch -D "cn=Directory Manager" -w secret \
-b " cn=Account,ou=Groups,dc=example,dc=com" \
-E 'deref=member:telephonenumber, cn' "(objectclass=*)"
The above command fetches the telephonenumber and cn for every member of the group
cn=Account in a single search operation.
This feature is supported only with the OpenLDAP client.
B.7 Simple paged results
Simple paged results control breaks the results into smaller number of pages of a certain length,
where the user specifies the page size. The simple paged results control sets the number of entries
to be displayed at a time. The results can be scrolled through, a page at a time that makes the
results easier to analyze.
For paged results, use the following option with ldapsearch command:
-E pg=size
The size value is either the page size or the number of entries to be included per page.
Consider the following example of the simple paged results:
The first request sends the paged results control containing the page size 2 (pg=2), then 2 entries
are returned. Next, the request with page size 3 is sent, and 3 entries are returned. Then, page
size 1 is sent, and one entry is returned.
ldapsearch -D "cn=Directory Manager" -w secret \
-b "ou=People,dc=example,dc=com" -E pg=2 "(objectclass=*)" cn
dn: uid=BSeabrook6465,ou=People,dc=example,dc=com
cn : Bernie Seabrook
dn: uid=MSeager4825,ou=Product Testing,dc=example,dc=com
cn : Micky Seager
next page size (2): 3
dn: uid=KSeagle2713,ou=Accounting,dc=example,dc=com
cn : Khanh Seagle
dn: uid=YSeagle5532,ou=Product Development,dc=example,dc=com
cn : Yelena Seagle
dn: uid=JSeagrove7967,ou=Human Resources,dc=example,dc=com
cn : Jacenta Seagroves
next page size (3): 1
dn: uid=JSeagrove5000,ou=Product Development,dc=example,dc=com
cn : Jolyn Seagroves
next page size (1):
Directory Server supports server side sorting control. Paged results control is combined with the
server side sorting as follows:
ldapsearch -D "cn=Directory Manager" -w secret \
-b "ou=People,dc=example,dc=com" -E pg=2 -S "sn givenname" "(objectclass=*)" "dn cn"
This feature works only with LDAP clients that support simple paged results. For example, OpenLDAP
command-line tools version 2.4.18 and Perl Net::LDAP.
B.7 Simple paged results 569