The short answer is yes, for practical purposes. The long answer ... It's complicated.
Finding the file stream ultimately calls lseek () in the base file descriptor, the performance of which depends on the kernel.
The uptime depends on which file system you are using and how large the files are. As files grow larger, random queries require the pursuit of more βindirectβ indexing blocks. But even for files up to 2 ^ 64 bytes in size, the number of levels is only a few.
So, in theory, the search is probably O (log n); but in practice it is essentially constant for a modern file system.
source share