观察差异:
ryan@DevPC-LX:~/stuff/nana$ time find . -name libnana.a
./libnana.a
real 0m0.215s
user 0m0.005s
sys 0m0.017s
ryan@DevPC-LX:~/stuff/nana$ time find . -name libnana.a
./libnana.a
real 0m0.008s
user 0m0.004s
sys 0m0.004s
ryan@DevPC-LX:~/stuff/nana$
谷歌快速发现这,这表明有 的缓存dirent
。问题是:我该如何清除它?
答案1
sudo bash -c 'echo 3 > /proc/sys/vm/drop_caches'