RECOMMENDED ARTICLES
DELETING SYSTEM LOGS to save space
Logs are placed in /var/log directory (following Filesystem Hierachy Standard FHS).
Some applications need log files or directories to exist or some error will happen, so we are going to convert all log files into zero byte length files:
/usr/bin/find /var/log -type f | /usr/bin/xargs -I log_file /bin/bash -c "/bin/echo -n \"\" > \"log_file\""