New log format - how to delete?
-
This post is deleted! -
Found it - truncate -s 0 does the trick. FYI for anyone interested - here is what you can do to dump, save, clear the current and old logs:
tail -100 /var/log/filter.log | cp /var/log/filter.log /var/log/oldfilterlogs/filter_
date +"%Y%m%d_%H%M"
.log | truncate -s 0 /var/log/filter.log | find /var/log/oldfilterlogs/ -type f -mtime +30d -delete
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.