oneliners/bash/biggest_dir_on_same_fs.sh

5 lines
195 B
Bash
Raw Normal View History

2021-01-24 15:48:33 +01:00
#!/bin/bash
# find biggest directories in a given path without leaving the current filesystem
2021-06-16 16:27:27 +02:00
dir="$1"; for i in $(ls $dir); do mountpoint -q $dir/$i || du -shx $dir/$i ; done | sort -rh | head