Skip to content

Instantly share code, notes, and snippets.

@muhamad-ridwant-tech
Created June 5, 2024 08:18
Show Gist options
  • Save muhamad-ridwant-tech/04bd25ac65dd845658b7876f3e99e573 to your computer and use it in GitHub Desktop.
Save muhamad-ridwant-tech/04bd25ac65dd845658b7876f3e99e573 to your computer and use it in GitHub Desktop.
Log Rotation & Management in Linux
find /path/to/log -name ‘*.log’ -mtime -30 days | awk ‘{print “rm -r “$0}’ > "/path/to/output_file_$(date +%F)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment