Open this paste on another device
The QR code contains the clean paste URL. It contains no password or delete token.
bashRead-only
1
#!/usr/bin/env bash
set -euo pipefail
log_dir="${1:-./logs}"
archive_dir="${2:-./archive}"
mkdir -p "$archive_dir"
find "$log_dir" -type f -name '*.log' -mtime +7 -print0 |
while IFS= read -r -d '' file; do
gzip -c "$file" > "$archive_dir/$(basename "$file").gz"
rm "$file"
done
Paste details
- Visibility
- Public
- Size
- 292 bytes
- Protection
- Standard link access
- Retention
- No automatic expiry
Share with confidence
Unlisted links are not searchable, but anyone with the URL can open them. Never paste live credentials or personal data.