How to Find and List Large Files Using Linux Bash
- Category Shell
- Type Command
- Platform Linux
- Language Bash
- Price Free
- Copy 85 553
- Comments 0
How to Find and List Large Files Using Linux Bash
#!/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 :(