purge file system cache on Linux

sync; echo 3 > /proc/sys/vm/drop_caches
## or
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"