• [^] # Re: Normal

    Posté par . En réponse au message Fichier supprimé mais qui consomme toujours de l'espace disque. Évalué à 7.

    logrotate, qui sert à éviter l’accumulation des logs système, soit compte sur la coopération des logiciels en leur envoyant un signal pour qu’il créent un nouveau fichier (mais ça ne marche qu’avec un logiciel prévu pour), soit les arrête et les relance.

    Logrotate peut aussi copier puis vider le fichier, pour faire une rotation, avec l'option copytruncate :

    Truncate the original log file to zero size in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus might continue writing (appending) to the previous log file forever. Note that there is a very small time slice between copying the file and truncating it, so some logging data might be lost. When this option is used, the create option will have no effect, as the old log file stays in place.