ldifdiff
Prev | Directory Server Tools | Next

## Name

ldifdiff — compare small LDIF files

## Synopsis

`ldifdiff` source target

## Description

This utility can be used to compare two LDIF files and report the differences in LDIF format.

If standard input is used to specify source or target, end your input with EOF (Ctrl+D on UNIX, Ctrl+Z on Windows).

## Options

The ldifdiff command takes the following options:

Command options:

`-o | --outputLDIF {file}`

  Write differences to {file} instead of stdout.

  Default: stdout

Utility input/output options:

`-t | --wrapColumn {wrapColumn}`

  Maximum length of an output line (0 for no wrapping).

  Default: 0

General options:

`-V | --version`

  Display Directory Server version information.

  Default: false

`-H | --help`

  Display this usage information.

  Default: false

## Exit Codes

0

  No differences were found.

1

  Differences were found.

other

  An error occurred.

## Examples

The following example demonstrates use of the command with two small LDIF files.

    $ cat /path/to/newuser.ldif
    dn: uid=newuser,ou=People,dc=example,dc=com
    uid: newuser
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: top
    cn: New User
    sn: User
    ou: People
    mail: newuser@example.com
    userPassword: changeme

    $ cat /path/to/neweruser.ldif
    dn: uid=newuser,ou=People,dc=example,dc=com
    uid: newuser
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: top
    cn: New User
    sn: User
    ou: People
    mail: newuser@example.com
    userPassword: secret12
    description: A new description.

    $ ldifdiff -s /path/to/newuser.ldif -t /path/to/neweruser.ldif
    dn: uid=newuser,ou=People,dc=example,dc=com
    changetype: modify
    add: userPassword
    userPassword: secret12
    -
    delete: userPassword
    userPassword: changeme
    -
    add: description
    description: A new description.

Prev | Up | Next
ldapsearch | Home | ldifmodify