6330N/A<?
xml version="1.0" encoding="UTF-8"?>
6330N/A ! This work is licensed under the Creative Commons 6330N/A ! Attribution-NonCommercial-NoDerivs 3.0 Unported License. 6330N/A ! To view a copy of this license, visit 6330N/A ! or send a letter to Creative Commons, 444 Castro Street, 6330N/A ! Suite 900, Mountain View, California, 94041, USA. 6330N/A ! You can also obtain a copy of the license at 6330N/A ! See the License for the specific language governing permissions 6330N/A ! and limitations under the License. 6330N/A ! If applicable, add the following below this CCPL HEADER, with the fields 6330N/A ! enclosed by brackets "[]" replaced with your own identifying information: 6330N/A ! Portions Copyright [yyyy] [name of copyright owner] 6330N/A ! Copyright 2011-2012 ForgeRock AS 6330N/A ! Portions Copyright 2013 Jens Elkner 6330N/A version="5.0" xml:
lang="en" 6330N/A <
refentrytitle><
application>ldifsearch</
application></
refentrytitle>
6330N/A <
xi:
include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
6330N/A <
refname><
application>ldifsearch</
application></
refname>
6330N/A <
refpurpose>search LDIF with LDAP filters</
refpurpose>
6330N/A <
command>ldifsearch</
command>
6330N/A <
arg>-b <
replaceable class="parameter">baseDN</
replaceable></
arg>
6330N/A <
arg>-l <
replaceable class="parameter">searchFile</
replaceable></
arg>
6330N/A <
arg>-f <
replaceable class="parameter">filterFile</
replaceable></
arg>
6330N/A <
arg>-o <
replaceable class="parameter">outfile</
replaceable></
arg>
6330N/A <
arg>-s <
replaceable class="parameter">searchScope</
replaceable></
arg>
6331N/A <
arg>-L <
replaceable class="parameter">seconds</
replaceable></
arg>
6330N/A <
arg>-z <
replaceable class="parameter">entries</
replaceable></
arg>
6330N/A xpointer='xpointer(//para[@name="s-general"]/*)'/>
6330N/A <
arg choice="opt">filter</
arg>
6330N/A <
arg choice="opt" rep="repeat">attribute</
arg>
6330N/AThis utility can be used to perform search operations against data in an LDIF
6330N/AThe filter argument is a string representation of an LDAP search filter as in
6330N/A(cn=Babs Jensen), (&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*))), or
6330N/A(cn:caseExactMatch:=Fred Flintstone).
6330N/AThe optional attribute list specifies the attributes to return in the entries
6330N/Afound by the search. In addition to identifying attributes by name such as cn
6330N/Asn mail and so forth, you can use the following notations, too.
6330N/AReturn all user attributes such as cn, sn, and mail.
6330N/AReturn all operational attributes such as etag and pwdPolicySubentry.
6330N/A <
term>@<
replaceable class="parameter">objectclass</
replaceable></
term>
6330N/AReturn all attributes of the specified object class, where <
replaceable 6330N/A>objectclass</
replaceable> is one of the object classes on the entries returned
6330N/AThe following options are supported.
6330N/A <
term><
option>-b, --baseDN</
option> <
replaceable 6330N/A class="parameter">baseDN</
replaceable></
term>
6330N/ASearch base DN. Multiple files may be specified by providing the option multiple
6330N/A <
term><
option>-l, --ldifFile </
option> <
replaceable 6330N/A class="parameter">file</
replaceable></
term>
6330N/ALDIF file containing the data to search. Multiple files may be specified by
6330N/Aproviding the option multiple times. If no files are provided, the data will
6330N/Abe read from standard input.
6330N/A <
term><
option>-f, --filterFile</
option> <
replaceable 6330N/A class="parameter">file</
replaceable></
term>
6330N/AFile containing a list of search filter strings. If this is not provided, then
6330N/Athe filter must be provided on the command line after all configuration options.
6330N/A <
term><
option>-o, --outputFile</
option> <
replaceable 6330N/A class="parameter">file</
replaceable></
term>
6330N/AWrite search results to <
replaceable>file</
replaceable> instead of stdout.
6330N/A <
term><
option>-O, --overwriteExisting</
option></
term>
6330N/AAny existing output file should be overwritten rather than appending to it.
6330N/A <
term><
option>-s, --searchScope</
option> <
replaceable 6330N/A class="parameter">scope</
replaceable></
term>
6330N/ASearch scope: 'base', 'one', 'sub', or 'subordinate' (Default: sub).
6331N/A <
term><
option>-L, --timeLimit</
option> <
replaceable 6330N/A class="parameter">seconds</
replaceable></
term>
6330N/AMaximum length of time in seconds to allow for the search (Default: 0).
6330N/A <
term><
option>-z, --sizeLimit</
option> <
replaceable 6330N/A class="parameter">entries</
replaceable></
term>
6330N/AMaximum number of matching entries to return from the search (Default: 0).
6331N/A <
term><
option>-t, --dontWrap</
option></
term>
6330N/A <
title>General Options</
title>
6330N/A xpointer='xpointer(//para[@name="l-general"]/*)'/>
6330N/AThe following example demonstrates use of the command.
6330N/A>$ </
prompt><
command>ldifsearch -b dc=example,dc=com -l /
tmp/
Example.ldif uid=bjensen</
command></
literallayout>
6330N/Adn: uid=bjensen,ou=People,dc=example,dc=com
6330N/AobjectClass: organizationalPerson
6330N/Afacsimiletelephonenumber: +1 408 555 1992
6330N/Atelephonenumber: +1 408 555 1862
6330N/AYou can also use @<
replaceable>objectclass</
replaceable> notation in the
6330N/Aattribute list to return the attributes of a particular object class. The
6330N/Afollowing example shows how to return attributes of the
6330N/A<
code>posixAccount</
code> object class.
6330N/A "(uid=bjensen)" @posixaccount</
command></
literallayout>
6330N/Adn: uid=bjensen,ou=People,dc=example,dc=com
6330N/AobjectClass: organizationalPerson
6330N/A <
xi:
include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
6330N/A <
xi:
include href="common.xml" xpointer='xpointer(//refsection[@name="exit-0-gt0"])'/>
6330N/A <
xi:
include href="common.xml" xpointer='xpointer(//refsection[@name="seeAlso"])'/>