Skip to content

Commit

Permalink
Add compress_logs script
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar committed Oct 28, 2024
1 parent a1f48c8 commit c933420
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions maintenance/compress_logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

LOGS_DIR=$(dirname "$SCRIPT_DIR")/results/logs

pushd "$LOGS_DIR" || exit 1

# Compress older-than-one-week files
find . -mtime +7 -name '*.log' -print0 \
| xargs -0 -P 4 gzip

0 comments on commit c933420

Please sign in to comment.