Data Governance Server Documentation Index
Command-Line Tool Reference Home

ldifsearch

Description
Examples
Arguments

Description

Perform search operations to data in an LDIF file.

This tool is similar to ldapsearch except that the entries searched exist in an LDIF file as opposed to within an LDAP server.

Examples

Print to standard out all entries in the /usr/local/entries.ldif LDIF file under the base DN dc=example,dc=com that match the search filter (l=Austin):
ldifsearch --baseDN dc=example,dc=com --ldifFile /usr/local/entries.ldif \
     "(l=Austin)"


Print to the result.ldif file all entries in either the /usr/local/entries.ldif or /usr/local/entries2.ldif LDIF files that are immediate children of dc=example,dc=com:
ldifsearch --baseDN dc=example,dc=com --searchScope one \
     --ldifFile /usr/local/entries.ldif --ldifFile /usr/local/entries2.ldif \
     --outputFile result.ldif '(objectclass=*)'

Arguments

-V
--version

Description Display Data Governance Server version information

-H
--help

Description Display general usage information

--help-debug

Description Display help for using debug options
Advanced Yes

-l {ldifFile}
--ldifFile {ldifFile}

Description LDIF file containing the data to search. If no files are provided, the data will be read from standard input
Required No
Multi-Valued Yes

--ldifEncryptionPassphraseFile {file}

Description The path to a file that contains the encryption passphrase needed to decrypt the input LDIF file if it is encrypted. If the input LDIF file is encrypted and this argument is not provided, then the tool will interactively prompt for the encryption passphrase. If a passphrase file is provided, then it must contain exactly one line that consists entirely of the passphrase
Required No
Multi-Valued No

-b {baseDN}
--baseDN {baseDN}

Description The base DN for the search. If no base DN is provided, then the root DSE will be used
Default Value
Required No
Multi-Valued Yes

-s {scope}
--searchScope {scope}

Description The scope for the search. It must be one of the following: 'base', 'one', 'sub', or 'subordinate'. If a scope is not provided, then 'sub' will be used by default
Allowed Values base
one
sub
subordinate
Default Value sub
Required No
Multi-Valued No

-f {filterFile}
--filterFile {filterFile}

Description The path to the file containing the search filter(s) to use. If no path is provided, then the filter must be provided on the command-line after the configuration options
Required No
Multi-Valued No

-o {outputFile}
--outputFile {outputFile}

Description The path to the output file to which the matching entries should be written. If no path is provided, then the data will be written to standard output by default
Required No
Multi-Valued No

--compressOutput

Description GZIP-Compress the data written to the output LDIF file

--encryptOutput

Description Encrypt the data written to the output LDIF file. If the --outputEncryptionPassphraseFile argument is provided, then that passphrase will be used to encrypt the file; otherwise, the tool will interactively prompt for the passphrase

--outputEncryptionPassphraseFile {file}

Description The path to a file that contains the encryption passphrase needed to encrypt the output LDIF file if the --encryptOutput argument is provided. If the output is to be encrypted but no passphrase file is provided, then the tool will interactively prompt for the passphrase. If a passphrase file is given, then it must contain exactly one line that consists entirely of the passphrase
Required No
Multi-Valued No

--checkSchema

Description Perform schema validation for entries in the target LDIF file and report errors for any entries that violate schema constraints

-O
--overwriteExisting

Description Any existing output file should be overwritten rather than appended

-T
--dontWrap

Description Long lines should not be wrapped

-z {sizeLimit}
--sizeLimit {sizeLimit}

Description Maximum number of matching entries to return
Lower Bound 0
Default Value 0
Required No
Multi-Valued No

-t {timeLimit}
--timeLimit {timeLimit}

Description Maximum length of time (in seconds) to spend processing
Lower Bound 0
Default Value 0
Required No
Multi-Valued No

--isCompressed

Description The LDIF file is compressed with gzip compression. This argument is no longer necessary, as the tool should automatically detect whether the file is compressed