Bash script for clearing caches
Puts filesystem and buffered data which cached in memory (caches) to disk This goes to anywhere in PATH Should be ran by root/with sudo Can be placed in crontab
This commit is contained in:
5
clearcaches
Normal file
5
clearcaches
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
logname="locallogs"
|
||||
|
||||
echo "Clearing caches at $(date +%y-%m-%d/%H:%M:%S)" >> /usr/local/$logname && sync && sysctl vm.drop_caches=1
|
||||
Reference in New Issue
Block a user