$ echo 3 > /proc/sys/vm/drop_caches
bash: /proc/sys/vm/drop_caches: Permission denied
Tried with the system password. But still failing.
$ echo 3 > /proc/sys/vm/drop_caches
bash: /proc/sys/vm/drop_caches: Permission denied
Tried with the system password. But still failing.
Execute the shell as root:
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
Or redirect the input to a process that will write to file as root:
echo 3 | sudo tee /proc/sys/vm/drop_caches
You should do it with root user. Or atleast should use sudo then command.
sync; echo 3 > /proc/sys/vm/drop_caches