Hacker News new | ask | show | jobs
by dundarious 35 days ago
You can't sudo echo and redirect from the non-sudo shell like that.

    echo 3 | sudo tee /proc/sys/vm/drop_caches
or

    sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
Also fixed your typo in /proc...
3 comments

Also try:

     sudo sysctl -w vm.drop_caches=3
Or more simply, use

   su -c 'echo 3 > /proc/sys/vm/drop_caches'
echo 3 | sudo tee /proc/sys/vm/drop_caches
thanks. copy pasting from the github via my phone, and should have taken the extra few mins
No worries, overall a very useful summary comment.