$ sync && echo 1 > /proc/sys/vm/drop_caches

run sync first to flush useful things out to disk!!!

To free pagecache:

echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

echo 3 > /proc/sys/vm/drop_caches

View this command to comment, vote or add to favourites
View all commands by KeePon

commandlinefu.com

by David Winterbottom (codeinthehole.com)


Tags: