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

Figure 22 Searching for entries
CAUTION:
Do not modify the contents of the o=NetscapeRoot suffix using the Directory tab unless instructed
to do so by HP technical support.
TIP:
For information on using the search form, click Help.
B.2 Using ldapsearch
The ldapsearch command line utility can locate and retrieve directory entries. This tool is located
at the /opt/dirsrv/bin directory. This utility opens a connection to the specified server using
the specified distinguished name and password and locates entries based on a specified search
filter. The search scope can include a single entry, an entry's immediate subentries, or an entire
tree or subtree.
Search results are returned in LDIF format.
This section contains information about the following topics:
“Using special characters” (page 556)
“ldapsearch command-line format” (page 557)
“Commonly used ldapsearch options” (page 557)
“ldapsearch examples” (page 558)
B.2.1 Using special characters
When using the ldapsearch command line utility, it may be necessary to specify values that
contain characters that have special meaning to the command line interpreter, such as space ( ),
asterisk (*), or backslash (\). Enclose the value with the special character in quotation marks ("").
For example:
-D "cn=Barbara Jensen,ou=Product Development,dc=example,dc=com"
Depending on the command line interpreter, use either single or double quotation marks. In general,
use single quotation marks (') to enclose values. Use double quotation marks (") to allow variable
556 Finding Directory Entries