vi Cached.sh

编写shell脚本

   #! /bin/bash  
    # cache释放:  
    # To free pagecache:  
    sync  
    sync  
    #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 

然后保存

crontab -e

编写定时任务执行

posted on 2017-03-23 09:57  阡陌客  阅读(235)  评论(0编辑  收藏  举报