#!/bin/sh if [ "$(id -u)" -ne 0 ] then echo "Please run as root." exit 1 fi echo 3 | tee /proc/sys/vm/drop_caches >/dev/null echo "cache cleared."