Created
December 11, 2020 07:23
-
-
Save anilahir/ef92b840f37e4408ed8bd423cae4eda8 to your computer and use it in GitHub Desktop.
Ubuntu : clear ram-cache and swap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
su -c "sync; echo 3 > /proc/sys/vm/drop_caches && printf '\n%s\n' 'Ram-cache Cleared'" root | |
# su -c "sync; echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'" root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment