diff --git a/.bash_aliases b/.bash_aliases index a137ebf..d6db176 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -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 +}