makeldif
Prev | Directory Server Tools | Next

## Name

makeldif — generate test LDIF

## Synopsis

`makeldif` template-file-path

## Description

This utility can be used to generate LDIF data based on a definition in a template file.

The `template-file-path` can be one of the following:

- A full path to the template file such as `/path/to/opendj/config/MakeLDIF/example.template`.

- A relative path to the template file such as `../../my-test-data.template`.

- A file name that specifies one of the template files that are built into the ${opendj.product.name.full} LDAP Toolkit, such as `example.template`, or `people_and_groups.template`.

The ${opendj.product.name.full} LDAP Toolkit includes these built-in template and data files:

`cities`

  List of more than 200 cities.

`example.template`

  Template to generate a base entry and users in a branch `ou=people,[suffix]`, where the default setting for suffix is `suffix=dc=example,dc=com`.

`first.names`

  List of more than 8000 first names.

`last.names`

  List of more than 13000 last names.

`people_and_groups.template`

  Template to generate a base entry, users, and groups.

`states`

  List of US states by their two-character codes.

`streets`

  List of more than 70 street names.

## Options

The makeldif command takes the following options:

Command options:

`-c | --constant {name=value}`

  A constant that overrides the value set in the template file.

`-o | --outputLDIF {file}`

  The path to the LDIF file to be written.

`-r | --resourcePath {path}`

  Path to look for MakeLDIF resources (e.g., data files).

  The utility looks for resources in the following locations in this order:

  1. The current directory where the command is run.

  2. The resource path directory.

  3. The built-in files.

`-s | --randomSeed {seed}`

  The seed to use to initialize the random number generator.

  Default: 0

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

  The command completed successfully.

1

  An error occurred.

## Examples

The following example uses the default template to generate LDIF.

    $ makeldif -o ../ldif/generated.ldif ../config/MakeLDIF/example.template
    Processed 1000 entries
    Processed 2000 entries
    ...
    Processed 10000 entries
    LDIF processing complete.  10003 entries written

## See Also

makeldif.template(5)

Prev | Up | Next
list-backends | Home | makeldif.template