Guest User

Untitled

a guest
Mar 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # Delete files matching a regex
  4. ls | grep "^regex$" | xargs -d"\n" rm
  5.  
  6. # List largest folders
  7. du -hs * | sort -rh | head -5
  8.  
  9. # Show inode usage
  10. df -i
  11. ## Current folder
  12. for i in `find . -type d `; do echo `ls -a $i | wc -l` $i; done | sort -n
  13.  
  14. # Show disk usage of current folder
  15. du -h ./* | sort -h | tail -n 40
  16.  
  17. # Show file system disk space usage
  18. df -h
Add Comment
Please, Sign In to add comment