summaryrefslogtreecommitdiff
path: root/bin/common/drop_cache
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-11 01:40:07 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-11 01:40:07 +0200
commit9ea96079102d7c1e68338565c964b68456908d34 (patch)
tree16956cff839dba5d5faf0876766644d0d3d7a011 /bin/common/drop_cache
parentf65783947a1d92738f4c3544bec94be94bd6e27c (diff)
added drop_cache script
Diffstat (limited to 'bin/common/drop_cache')
-rwxr-xr-xbin/common/drop_cache8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/common/drop_cache b/bin/common/drop_cache
new file mode 100755
index 0000000..4833597
--- /dev/null
+++ b/bin/common/drop_cache
@@ -0,0 +1,8 @@
+#!/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."