Skip to content

Instantly share code, notes, and snippets.

@veez21
Last active February 3, 2021 08:23
Show Gist options
  • Save veez21/a7a8483b88fced8af7b8ce59d50f0663 to your computer and use it in GitHub Desktop.
Save veez21/a7a8483b88fced8af7b8ce59d50f0663 to your computer and use it in GitHub Desktop.
bfree=$(free -m | grep Mem | awk '{print $4}')
echo 3 > /proc/sys/vm/drop_caches
afree=$(free -m | grep Mem | awk '{print $4}')
echo "Freed $((afree-bfree)) MB!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment