Linux Scroll

Just another WordPress.com site

Linux clear cache

You can clear memory cache in linux:

As root:

$ sync
$ echo 3 > /proc/sys/vm/drop_caches

OR

Create a script to run as commnad.
In Terminal:

$ sudo cat <> /user/sbin/clearcache     (No space inside <>)
> #!/bin/sh
> # The script to clear memory cache.
> sync
> echo 3 > /proc/sys/vm/drop_caches
> eof
$ sudo chmod +x /user/sbin/clearcache.sh

Save and Close

In terminal:

$ sudo clearcache
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: