[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Clearing RAM Caches



Timothy M Butterworth <timothy.m.butterworth@gmail.com> writes:

> When I run `sudo echo 1 > /proc/sys/vm/drop_caches` I receive the following error: bash: /proc/sys/vm/drop_caches: Permission denied

Unfortunately, it's your current shell and not root who does the
redirection in this case so no permissions.

For a longer explanation see
https://www.reddit.com/r/linux4noobs/comments/qq76qo/sudo_echo_vs_echo_from_the_root_shell/

A proposed alternative from there is to use tee, like this:

echo 1 | sudo tee /proc/sys/vm/drop_caches


Reply to: