usage: ldapsearch -b basedn [options] filter [attributes...]
       ldapsearch -b basedn [options] -f file [attributes...]
where:
    basedn	base dn for search
		(if the environment variable LDAP_BASEDN is set,
		then the -b flag is not required)
    filter	RFC-1558 compliant LDAP search filter
    file	file containing a sequence of LDAP search filters to use
    attributes	whitespace-separated list of attributes to retrieve
		(if no attribute list is given, all are retrieved)
options:
    -n		show what would be done but don't actually do it
    -v		run in verbose mode (diagnostics to standard output)
    -h host	LDAP server name or IP address
    -p port	LDAP server TCP port number
    -V n	LDAP protocol version number (2 or 3; default is 3)
    -Z		make an SSL-encrypted connection
    -P pathname	path to SSL certificate database
    -N		name of certificate to use for SSL client authentication
    -K pathname	path to key database to use for SSL client authentication
    -m pathname	path to security module database
    -W		SSL key password
    -Q [token][:certificate name]	PKCS 11
    -X pathname	FORTEZZA compromised key list (CKL)
    -I pin	card password file
    -D binddn	bind dn
    -w passwd	bind passwd (for simple authentication)
    -R		do not automatically follow referrals
    -O hop lim	maximum number of referral hops to traverse
    -M		manage references (treat them as regular entries)
    -i charset	character set for command line input (default is locale)
    -k dir	conversion routine directory (default is .)
    -y proxydn	DN used for proxy authentication
    -H		display usage information
    -t		write values to files in /tmp
    -u		include User Friendly entry names in the output
    -o		print entries using old format (default is LDIF)
    -T		don't fold (wrap) long lines (default is to fold)
    -A		retrieve attribute names only (no values)
    -B		print non-ASCII values even if old format (-o) is used
    -x		performing sorting on server
    -F sep	print `sep' instead of `=' between attribute names and values
    -S attr	sort the results by attribute `attr'
    -s scope	one of base, one, or sub (search scope)
    -a deref	one of never, always, search, or find (alias dereferencing)
    -l time lim	time limit (in seconds) for search
    -z size lim	size limit (in entries) for search
    -G before:after:index:count | before:after:value where 'before' and
		'after' are the number of entries surrounding 'index.'
		'count' is the content count, 'value' is the search value.
