Seite 1 von 1

Bestimmte Dateien leeren

Verfasst: 08.04.2014, 11:38
von localhorst
Um bestimmte Dateien in einem Verzeichnis zu leeren, bietet sich folgender Befehl an:

Code: Alles auswählen

find /var/log/ -name '*.*' -not -type d -print0 | xargs -0i sh -c "cat /dev/null > "{}""