this one should work regardless the linux distribution you are running. You need to cover the redirection when running sudo.
$ sudo sh -c "$(which echo) 3 > /proc/sys/vm/drop_caches"
Credits: http://unix.stackexchange.com/a/148442/101951https://unix.stackexchange.com/a/148442/101951
(i added the which echo part though)