[389-users] Deleting entries that are not modified recently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kimmo Koivisto wrote:
> Hello
>
> This was what I needed to search entries:
>
> ldapsearch -x -b xx -D xxx -w xxx
> "(&(cn=*)(modifytimestamp<=2009092513000000Z)(objectclass=person))"
>
> But then, how to pipe ldapsearch and ldapdelete to delete the result
> dn's of ldapsearch?
>   
specify "dn" as the attribute to return - just add it to the end of the 
command line - also add -LLL to the ldapsearch command line to make it 
less verbose
you will then have output like
dn: somedn
blank line
repeat.....

You will have to use sed/awk/perl to strip the "dn: " from the DNs, and 
ignore the blank lines
> Regards,
> Kimmo
>
> 2009/9/25 Kimmo Koivisto <koippa at gmail.com>:
>   
>> Hello
>>
>> Thanks for your answer.
>>
>> I know about those timestamps, but I don't know if I can compare
>> timestamps with ldapsearch.
>>
>> So, is it possible to compare or search entries older that defined
>> timestamp, for example:
>>
>> ldapsearch "(objectClass=*)" * modifyTimestamp>20090801000000Z
>>
>> or how I could do this?
>>
>> Regards,
>> Kimmo
>>
>>
>> 2009/9/25 Juan Asensio S?nchez <okelet at gmail.com>:
>>     
>>> Hi
>>>
>>> All entries in the directory have some operational attributes called
>>> createTimestamp, modifiTimestamp, creatorsName and modifiersName. With
>>> them, you can check when an entry has been created or modified, and
>>> who did it. I think this is what you are looking for.
>>>
>>> Those attributes, thar are operational, are not returned when you ask
>>> for all attributes, you must specify their names manually:
>>>
>>> ldapsearch ...... "(objectClass=*)" * createTimestamp
>>>
>>> Regards
>>>
>>> 2009/9/25 Kimmo Koivisto <koippa at gmail.com>:
>>>       
>>>> Hello
>>>>
>>>> I'm using fedora-ds-1.0.4-1.RHEL4 and I have an application that
>>>> creates and modifies entries located in FDS.
>>>> Application does not remote old entries, and I cannot change how
>>>> application works.
>>>>
>>>> I would like to delete entries that are not modified recently with
>>>> either plain ldapsearch+ldapdelete or using some FDS tools, perl scipt
>>>> etc.
>>>>
>>>> So, my question is, what is the easiest way to delete entries, for
>>>> example older that 3 months?
>>>>
>>>> Regards,
>>>> Kimmo
>>>>
>>>> --
>>>> 389 users mailing list
>>>> 389-users at redhat.com
>>>> https://www.redhat.com/mailman/listinfo/fedora-directory-users
>>>>
>>>>         
>>> --
>>> 389 users mailing list
>>> 389-users at redhat.com
>>> https://www.redhat.com/mailman/listinfo/fedora-directory-users
>>>
>>>       
>
> --
> 389 users mailing list
> 389-users at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-directory-users
>   


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3258 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/389-users/attachments/20090925/715798de/attachment.bin 


[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux