Created
June 5, 2024 08:18
-
-
Save muhamad-ridwant-tech/04bd25ac65dd845658b7876f3e99e573 to your computer and use it in GitHub Desktop.
Log Rotation & Management in Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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