4 ms·
Thank you for the detailed explanation. So any interaction with the file would put it in memory will do. Of course assuming that you interact with the whole fi
by Foivos 6y ago
Thank you for the detailed explanation.
So any interaction with the file would put it in memory will do. Of course assuming that you interact with the whole file.
So if you have a big file and use "head", I guess it will not be enough. But you use "less" and scroll the whole thing you achieve the same result as in the command above right?
- dspillett 6y agoBasically, yes. There are some complications: * If the file is large then blocks at the start will be dropped from cache as you move further in, or will quickly be pushed out by IO activity elsewhere on your system. * Some commands open files with options that inhibit caching, so not everything will have this effect. > Of course assuming that you interact with the whole file. Reading some of the file will have the effect for that portion of the file, so if subsequent commands only touch the same parts then the effect is the same.
- Foivos 6y agoGreat explanation! Thank you!