Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- [ "$1" = '' ] && fs=/ || fs=$1 # Use specific dir if provided
- echo "Available block devices:"
- sudo fdisk -l | grep -E '^Disk /dev'
- echo
- echo "Available filesystems:"
- sudo blkid
- echo
- echo "Current disk usage:"
- sudo df -Tm | grep -v tmpfs
- echo
- echo "Files and directories using 1000M+ on $fs:"
- sudo du -xma --max-depth=4 $fs | grep -E '^[0-9]{4}' | sort -n
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement