Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    New log format - how to delete?

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 1 Posters 238 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mlines
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • M
        mlines
        last edited by mlines

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.