Skip to content

Instantly share code, notes, and snippets.

@alexcheng1982
Created January 27, 2015 20:45
Show Gist options
  • Save alexcheng1982/0adfcf9cc4497ac5d3c1 to your computer and use it in GitHub Desktop.
Save alexcheng1982/0adfcf9cc4497ac5d3c1 to your computer and use it in GitHub Desktop.
Flush Linux system memory cache
free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m
Flush daily using crontab:
0 0 * * * sudo free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment