A bash script to clean RAM cache and Swap
- 2022年11月08日
- 技術情報
Today, I would like to share a bash script to clean RAM cache and Swap. Let’s take a look at the following script.
echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Cleared Ram-cache and Swap'
Save the above codes as a file with .sh extension.
And give an execution permission to that file. Then you can clean RAM cache and swap by running that file.
Hope you enjoy that.
By Asahi
waithaw at 2022年11月08日 10:00:00