Docker Cleanup Preview
Show reclaimable Docker space, then prune only with an explicit flag.
$ webtoolist --script find-large-files
Locate files above a size threshold and show them largest first.
filesdiskfindcleanupDependencies: find, sort, numfmt
#!/usr/bin/env bash
set -euo pipefail
root="${1:-.}"
min="${2:-100M}"
limit="${LIMIT:-25}"
[[ -d "$root" ]] || { echo "not a directory: $root" >&2; exit 1; }
find "$root" -xdev -type f -size +"$min" -printf '%s\t%p\n' 2>/dev/null \
| sort -nr \
| head -n "$limit" \
| while IFS=$'\t' read -r bytes path; do
printf '%s\t%s\n' "$(numfmt --to=iec "$bytes")" "$path"
done
./find-large-files /var 500M
LIMIT=50 ./find-large-files /home 1G
-xdev prevents crossing into mounted filesystems.Related scripts
Show reclaimable Docker space, then prune only with an explicit flag.
Delete rotated log files older than a set number of days, with a dry-run first.
Move files untouched for N days into a dated archive directory.
Rename files matching a glob using a pattern, with a dry-run preview.