diff --git a/cleaning/logs-delete.v1.sh b/cleaning/logs-delete.v1.sh index 27e962c..cd9dbe5 100644 --- a/cleaning/logs-delete.v1.sh +++ b/cleaning/logs-delete.v1.sh @@ -5,18 +5,18 @@ # Autor: Patrick Asmus # Web: https://www.media-techport.de # Git-Reposit.: https://git.media-techport.de/scriptos/linux-helferlein-scripte.git -# Version: 1.0 +# Version: 1.0.1 # Datum: 02.03.2024 -# Modifikation: file changed to new header +# Modifikation: wording adapted ##################################################### -# Set variables +# Variablen LOG_DIR="/var/log" DAYS_TO_KEEP=60 -# Delete old log files +# lösche alte Log Files find "$LOG_DIR" -type f -mtime +"$DAYS_TO_KEEP" -delete -# Delete empty log directories +# lösche Verzeichnisse, falls leer find "$LOG_DIR" -type d -empty -delete exit \ No newline at end of file