Posted By

rm1984 on 01/18/17


Tagged

Shell Bash linux free cache sync memory


Versions (?)

Clear buffer cache on GNU/Linux systems


 / Published in: Bash
 

Clear buffer cache on GNU/Linux systems

  1. !#/bin/bash
  2.  
  3. echo '==== BEFORE ===='
  4. free
  5. sync
  6. echo 3 > /proc/sys/vm/drop_caches
  7. echo '==== AFTER ===='
  8. free

Report this snippet  

You need to login to post a comment.