{"id":313,"date":"2014-05-19T11:44:52","date_gmt":"2014-05-19T16:44:52","guid":{"rendered":"http:\/\/www.popmartian.com\/tipsntricks\/?p=313"},"modified":"2014-05-23T12:09:21","modified_gmt":"2014-05-23T17:09:21","slug":"how-to-flush-the-linux-file-cache","status":"publish","type":"post","link":"https:\/\/www.popmartian.com\/tipsntricks\/2014\/05\/19\/how-to-flush-the-linux-file-cache\/","title":{"rendered":"HOW TO Flush The Linux File Cache"},"content":{"rendered":"<p>You can&#8217;t prevent Linux from using the file cache and you don&#8217;t want to.  However, on occasion you may want to flush it.  Here&#8217;s how:<\/p>\n<p>First, flush your filesystems to disk.  Just run the command <code>sync<\/code><\/p>\n<p>Then, echo 1, 2 or 3 in to \/proc\/sys\/vm\/drop_caches.  It breaks down like this:<\/p>\n<ol>\n<li>free pagecache: <code>echo 1 > \/proc\/sys\/vm\/drop_caches<\/code><\/li>\n<li>free dentries and inodes: <code>echo 2 > \/proc\/sys\/vm\/drop_caches<\/code><\/li>\n<li>free pagecache, dentries and inodes: <code>echo 3 > \/proc\/sys\/vm\/drop_caches<\/code><\/li>\n<\/ol>\n<blockquote><p>Did you find this post useful or have questions or comments?  Please let  me know!<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>You can&#8217;t prevent Linux from using the file cache and you don&#8217;t want to. However, on occasion you may want to flush it. Here&#8217;s how: First, flush your filesystems to disk. Just run the command sync Then, echo 1, 2 &hellip; <a href=\"https:\/\/www.popmartian.com\/tipsntricks\/2014\/05\/19\/how-to-flush-the-linux-file-cache\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,27],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-how-to-do-stuff","category-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":2,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/313\/revisions\/315"}],"wp:attachment":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}