The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 9,519     Votes:  3 
Tags: permissions   lubuntu   cache  
Link: 🔍 See Original Answer on Ask Ubuntu 🔗

URL: https://askubuntu.com/q/1098062
Title: Which is the right way to drop caches in Lubuntu?
ID: /2018/12/03/Which-is-the-right-way-to-drop-caches-in-Lubuntu_
Created: December 3, 2018
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


The easiest way is with a script lifted here:

#!/bin/bash
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi
sync; echo 1 > /proc/sys/vm/drop_caches
sync; echo 2 > /proc/sys/vm/drop_caches
sync; echo 3 > /proc/sys/vm/drop_caches

Call the script drop-caches.

Mark it as executable using chmod a+x drop-caches

Call it using sudo ./drop-caches

If you place the script in /usr/local/bin you can call it using sudo drop-caches

⇧ How can I install the util linux version of the column command in 18.04? No option to mirror Displays on 18.04 - DELL M3800  ⇩