hi
When I search a file with find, the subsequent search process takes relatively less time.
Is it cached somewhere in RAM altough the process died?
hi
When I search a file with find, the subsequent search process takes relatively less time.
Is it cached somewhere in RAM altough the process died?
Disk information (including directory contents) that has recently been access is stored in the disk cache in memory by the kernel should it be needed again. Until something overwrites this cache (eg. a newer read on a large file) or the related data on the disk gets changed (the cache pages becomes "dirty") any reads on that data are done in memory.
Also, modern disk hardware caches large amounts of data, which also has an effect like the one pludi explained.
More specifically, any RAM not in use by other things can and will be used by the kernel to cache the disk. Why not? It'd be sitting around doing nothing otherwise, and the kernel still gives it up as willingly as empty RAM when it's needed for something else.