Tell the linux kernel to put a file in the disk cache?
Posted
by
Rory
on Server Fault
See other posts from Server Fault
or by Rory
Published on 2012-07-10T09:14:43Z
Indexed on
2012/07/10
9:16 UTC
Read the original article
Hit count: 204
Is there any command to for a file to be read in and loaded into the linux disk cache? This is on an up-to-date debian system.
I know in the general case, it's better to let the linux kernel figure this out. But I have an edge case. I have a laptop that has an NFS director mounted, and i want to play a long video file, but I don't want to have a network problem interrupt the playnig. I know that (largeish) file will be read in it's entirety later on. I know that nothing else (really) will be running while playing this video. There is enough free memory to store this file.
(I know I could just copy the file into a new tmpfs filesystem, but I'm curious if there's an even shorter way to do it)
© Server Fault or respective owner