Find Large Files Over 100MB - Linux Bash Command
- Category Shell
- Type Command
- Platform Linux
- Language Bash
- Price Free
- Copy 85 548
- Comments 0
Find Large Files Over 100MB - Linux Bash Command
#!/usr/bin/env bash
# Find files larger than 100MB in the current directory
# Usage: ./find-large.sh [path]
MIN_SIZE="100M"
SEARCH_PATH="${1:-.}"
find "$SEARCH_PATH" -type f -size +"$MIN_SIZE" -print0
| xargs -0 du -h
| sort -rh
| head -n 20
Free snippet — copy & paste!
Copy this snippet for free on Clayi Code. One click — no account required.
There are no comments yet :(