JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Directory Server Enterprise Edition Man Page Reference 11g Release 1 (11.1.1.5.0)
search filter icon
search icon

Document Information

Preface

User Commands

authrate(1)

dsmlmodify(1)

dsmlsearch(1)

entrycmp(1)

fildif(1)

insync(1)

ldapcmp(1)

ldapcompare(1)

ldapdelete(1)

ldapmodify(1)

ldappasswd(1)

ldapsearch(1)

ldapsubtdel(1)

ldif(1)

ldifxform(1)

logconv(1)

makeldif(1)

mmldif(1)

modrate(1)

pwdhash(1)

repldisc(1)

searchrate(1)

Administration Commands

Directory Server Configuration

Directory Proxy Server Configuration

File Formats

LDAP Schema Collections

LDAP Schema Attribute Types

LDAP Schema Object Classes

Index

ldapsubtdel

- recursively delete a subtree of LDAP entries

Synopsis

install-path/dsrk/bin/ldapsubtdel 
-b baseDN [options]

Description

The ldapsubtdel command attempts recursively to delete a subtree of LDAP entries under the entry having the distinguished name (DN) specified as a parameter to the -b option. You must bind as a user having access to delete the entries specified.

Options

The ldapsubtdel command supports the following options:

-b DN

Delete entries under the entry with the specified DN.

Default is to delete entries under the specified entry, but not to delete the specified entry itself. Use the -r option to delete the specified entry as well.

-D bindDN

Use the specified bind DN to authenticate to the directory.

If the bind DN is not specified, the ldapsubtdel command attempts anonymous authentication.

-H

Display a usage message.

-h hostname

Connect to the directory on the specified host.

Default is to connect to the local host on the loopback address, 127.0.0.1.

-j filename

Use the bind password in the specified file to authenticate to the directory.

-M

Manage referrals, deleting the entries containing referrals instead of the entries obtained by following referrals.

Default is to follow referrals and delete the entries to which the entries in the subtree refer.

-n

Display what would be done, but do not carry out any deletions.

Default is to carry out the deletions.

-p port

Connect to the directory on the specified port.

Default is to connect to the default simple authentication port for LDAP, 389.

-r

Also delete the entry having the DN specified as the parameter to the -b option.

Default is not to delete the entry specified.

-V LDAPVersion

Use the specified LDAP version, either 2 or 3.

Default is to use version 3.

-v

Display verbose output, including information about each deletion performed.

-w password

Use the specified bind password to authenticate to the directory.

-w -

Prompt for the bind password so it does not appear on the command line.

Examples

The example in this section uses the following conventions:

Example 1 ldapsubtdel: Deleting an Entire Subtree

The following command demonstrates deletion of an entire test subtree of LDAP entries:

$ ldapsubtdel -h host -D uid=hmiller,ou=people,dc=example,dc=com -w - \ -b ou=test,dc=example,dc=com -r -v
Enter bind password:
Processing subtree ou=test,dc=example,dc=com
Deleting entry uid=test0,ou=test,dc=example,dc=com
…
Deleting entry uid=test99,ou=test,dc=example,dc=com

Deleting entry ou=test,dc=example,dc=com

Successfully deleted subtree ou=test,dc=example,dc=com

If you read Example.ldif, you see that hmiller's password is hillock.

Exit Status

The ldapsubtdel command exits with status 0 if it completes successfully. Otherwise it exits with non-zero status.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
Zip distribution only
Stability Level
Evolving