Skip to content

Instantly share code, notes, and snippets.

@fxpires
Created October 26, 2018 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fxpires/90b0ce0e31d10cd1987bf3cdca32d08a to your computer and use it in GitHub Desktop.
Save fxpires/90b0ce0e31d10cd1987bf3cdca32d08a to your computer and use it in GitHub Desktop.
JBoss/Wildfly Log compression. Compress both server.log and access_log (if exists). Ignores already compressed logs in gz or xz formats
# Server log compression
find /opt/jboss/standalone/log -maxdepth 1 -type f -name 'server.log.*' -not -name '*xz' -not -name '*gz' -exec xz -3 {} \;
# default-host log compression
test -d /opt/jboss/standalone/log/default-host && find /opt/jboss/standalone/log/default-host -type f -mtime +0 -not -name '*xz' -exec xz -3 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment