Linux: Free unused cache memory

PHOTO EMBED

Sun Aug 28 2022 01:47:38 GMT+0000 (UTC)

Saved by @marcopinero #bash

$> sudo su

$> sync ; echo 1 > /proc/sys/vm/drop_caches
$> sync ; echo 2 > /proc/sys/vm/drop_caches
$> sync ; echo 3 > /proc/sys/vm/drop_caches
content_copyCOPY

Bash script to free some memory. Useful within cron for keeping clean memory (perhaps a little lost in performance).