Created system cache clearing alias

This commit is contained in:
Eriks Karls 2022-11-09 11:51:11 +02:00
parent 15af55e802
commit d398f007c9

View File

@ -78,3 +78,13 @@ colors() {
done
}
drop_cache() {
free -hw
sync
sudo bash -c "echo 1 > /proc/sys/vm/drop_caches"
if [[ $1 ]]; then
sudo swapoff -a
sudo swapon -a
fi
free -hw
}