Created
April 3, 2017 12:32
-
-
Save Tester2009/0d7b12bd8524c007d517582a18a245cd to your computer and use it in GitHub Desktop.
Free RAM 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
# source: http://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/ | |
# Clear PageCache, dentries, and inodes | |
# Sync will flush the filesystem buffer. | |
# Chmod this file to 755 | |
sync; echo 3 > /proc/sys/vm/drop_caches | |
echo "Syncing..." | |
# Clear Swap Space | |
swapoff -a && swapon -a | |
echo "RAM Cache and Swap cleared" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment