欢迎光临散文网 会员登陆 & 注册

重庆思庄技术分享——Linux 清空缓存命令

2023-07-06 12:09 作者:sizhuang1  | 我要投稿

Linux 清空缓存命令

某些时候需要把linux 的缓存清理一下。使用时需要区分参数的不同

  • 0:不做任何处理,由系统自己管理

  • 1清空pagecache

  • 2清空dentries和inodes

  • 3 清空pagecache、dentries和inodes

To free pagecache:

# echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:

# echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:

echo 3 > /proc/sys/vm/drop_caches

重庆思庄技术分享——Linux 清空缓存命令的评论 (共 条)

分享到微博请遵守国家法律