Hi,
you cannot use wildcards in deletes as per my understanding. You can, however, use wildcards in search filters.
If you are on a Unix-like system, you can feed the output of a search with a bit of transformation into ldapmodify.
You may want to try something like this (I ran this on Linux):
ldapmodify -f <(ldapsearch -b "dc=ALCATEL,dc=FR" "(cn=Parveen30*)" | grep dn: | sed 's/$/\nchangetype:delete\n'/)
Regards,
tamás
2016-06-08 14:24 keltezéssel, Parveen Verma írta:
Hello All,
Is there a Way to delete multiple LDAP entries by using some wildcards or regular expression. Like I have below entries. dn: cn=Parveen20,dc=ALCATEL,dc=FR dn: cn=Parveen200,dc=ALCATEL,dc=FR dn: cn=Parveen201,dc=ALCATEL,dc=FR dn: cn=Parveen202,dc=ALCATEL,dc=FR dn: cn=Parveen203,dc=ALCATEL,dc=FR dn: cn=Parveen204,dc=ALCATEL,dc=FR dn: cn=Parveen205,dc=ALCATEL,dc=FR dn: cn=Parveen206,dc=ALCATEL,dc=FR dn: cn=Parveen207,dc=ALCATEL,dc=FR dn: cn=Parveen208,dc=ALCATEL,dc=FR dn: cn=Parveen209,dc=ALCATEL,dc=FR dn: cn=Parveen30,dc=ALCATEL,dc=FR dn: cn=Parveen300,dc=ALCATEL,dc=FR dn: cn=Parveen301,dc=ALCATEL,dc=FR dn: cn=Parveen302,dc=ALCATEL,dc=FR dn: cn=Parveen303,dc=ALCATEL,dc=FR dn: cn=Parveen304,dc=ALCATEL,dc=FR dn: cn=Parveen305,dc=ALCATEL,dc=FR dn: cn=Parveen306,dc=ALCATEL,dc=FR dn: cn=Parveen307,dc=ALCATEL,dc=FR dn: cn=Parveen308,dc=ALCATEL,dc=FR dn: cn=Parveen309,dc=ALCATEL,dc=FR
I want to delete entries with 301,302,303.... So how can I give this, except putting all these in a LDIF file.
or how can below work
cn=Parveen30*,dc=ALCATEL,dc=FR