Categories: Linux

Vider proprement les fichiers logs sur son serveur

Pour vider proprement les logs sur votre serveur, vous pouvez lancer la commande suivante depuis votre terminal:

for i in /var/logs/*; do cat /dev/null > $i; done #Vide tous les fichiers dans le dossier /var/logs
for i in /dossier1/*.log; do cat /dev/null > $i; done #Vide tous les fichiers ayant l'extension ".log"
The GrimmChester

Share
Published by
The GrimmChester

Recent Posts

How to set up a SIP trunk with FreePBX and Twilio

FreePBX Server Requirements FreePBX 14.0 Asterisk 13 1 Twilio Number Mine will be (579)123-1234 Notes:…

8 years ago

Automated Web Hosting Solution (AWHS)Panel

Requirements For now, AWHSPanel only supports Debian 8 but its architecture allows easy new implementations.…

9 years ago

How to install ioncube on Debian & Ubuntu

ionCube installation What is ionCube: ionCube helps you to protect your PHP code from being…

10 years ago

Comment rediriger un site HTTP vers HTTPS

RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]

10 years ago

How To Install Linux, Nginx, MySQL, PHP (LEMP) on Debian 8

Files Structure: /srv /mydomain.com /.socks /www /cgi-bin /logs /public_html /ssl /tmp /blog /cgi-bin /logs /public_html…

10 years ago

How To automate Horde Groupware Webmail installation

Prerequisites: - 1 database (mysql) - 1 user associated with the database - Follow this…

10 years ago