Pages

02 August, 2024

fast search across large files

I have the need to search through large ldif files ( 8-10 GB ) for certain dns and print the entire entry associated with that dn.
For now I am using awk to search through the file and print the needed information . But it is slow .
Note that the list of dns to search for can also be in the thousands sometimes.


Is there a better method? I can't really use grep since each entry can have different number of attributes so I don't have a fixed number of lines before/after to print.


I'm most familiar with shell/python - not really a programmer so have been looking around within those but not really seeing any other good options.


I am using awk but it's slow - trying to find a faster option

No comments:

Post a Comment

Thanks