Created
July 27, 2020 14:31
-
-
Save felipekm/e6253eba2c75ee162c5436f7b04abe20 to your computer and use it in GitHub Desktop.
Linux Clear Cache Shell Script
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 | |
# Clear PageCache only | |
sync; echo 1 > /proc/sys/vm/drop_caches | |
# Clear dentries and inodes | |
sync; echo 2 > /proc/sys/vm/drop_caches | |
# Clear PageCache, dentries and inodes | |
sync; echo 3 > /proc/sys/vm/drop_caches |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment