Could someone explain to me why this script does not delete /var/logmessages and /var/log/wtmp files? I found it on tldp.org tutorial#!/bin/bashLOG_DIR=/var/logcd $LOG_DIRcat /dev/null > messagescat /dev/null > wtmpecho Logs cleaned upexitAfter executing it, I checked /var/log directory and messages and wtmp are still there with the old logs.Why is that happening?
Script to clean log files does not delete them
linux;scripting