1. 使用 free -h查看空间

2.执行

执行之前可以执行下sync

 作用:Linux 系统中欲写入硬盘的资料有的时候为了效率起见,会写到 filesystem buffer 中,这个 buffer 是一块记忆体空间,如果欲写入硬盘的资料存于此 buffer 中,而系统又突然断电的话,那么资料就会流失了,sync 指令会将存于 buffer 中的资料强制写入硬盘中。

To free pagecache, use
echo 1 > /proc/sys/vm/drop_caches

to free dentries and inodes, use
echo 2 > /proc/sys/vm/drop_caches

to free pagecache, dentries and inodes, use
echo 3 >/proc/sys/vm/drop_caches

清理缓冲

cache变小

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐