in reply to using grep on a directory to list files for a single date
If you manage to get all of your information from the 'directory file' only, this can be done in one big read. E. g. you can use an existing naming scheme of the files.
The other thing is to play OS. If you need to read the (still some 1000?) filtered files, I'd stat them first. This requires an inode read. But before processing the files one by one, sort them by inode number. You help the OS to reduce disk seeks and to utilize read ahead caches. In one of my toy programms sorting dramatically changes disk sound from noisy screetching to a quiet toktoktok. And it was a lot faster.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using grep on a directory to list files for a single date
by markkneen (Acolyte) on Dec 02, 2004 at 10:15 UTC | |
by zejames (Hermit) on Dec 02, 2004 at 10:22 UTC |