Giter Site home page Giter Site logo

1ray-1 / cache-cleaner Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

Aвто очистка линуксовского сервера. A simple bash script to clean Linux Server's cache automatically every X days.

Shell 100.00%
bash cache cleaner script server shell

cache-cleaner's Introduction

Что это?

Простой скрипт на баше который чистит кеш Линукс сервера.

По дефолту скрипт будет ждать 15 дней, и чистить кеш командами:

rm -rf /var/cache/httpd/proxy*
htcacheclean -n -t -p /var/cache/httpd/proxy -110000M -L12000
service httpd restart

И так бесконечно

Реквизиты

1: Доступ к Супер Юзеру (ROOT)

2: Иметь Сервер

О логах

Будут создаваться логи после чистки (чтоб можно было знать когда был очистен кеш) в файле $HOME/.cache_cleaner_log.txt, в директории супер юзера.

Но эту функцыю можно отключить на 15-ой строке.

Учтите

Команды для чистки кеша можно изменить с 19-ой строки в функции 'clean_cache'.

Весь код прокомментирован и очень прост, так что должно быть всё понятно.

cache-cleaner's People

Contributors

1ray-1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.