Advertisement
Guest User

Untitled

a guest
Oct 6th, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. [ "$1" = '' ] && fs=/ || fs=$1 # Use specific dir if provided
  4.  
  5. echo "Available block devices:"
  6. sudo fdisk -l | grep -E '^Disk /dev'
  7. echo
  8. echo "Available filesystems:"
  9. sudo blkid
  10. echo
  11. echo "Current disk usage:"
  12. sudo df -Tm | grep -v tmpfs
  13. echo
  14. echo "Files and directories using 1000M+ on $fs:"
  15. sudo du -xma --max-depth=4 $fs | grep -E '^[0-9]{4}' | sort -n
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement