Last active
May 6, 2022 12:19
-
-
Save thingsiplay/f3bf25b07d5aa2ddd3ceaecebccc92b6 to your computer and use it in GitHub Desktop.
biggest - list biggest files and folders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# biggest - list biggest files and folders | |
# | |
# Usage: | |
# biggest | |
# biggest *.png | |
du --apparent-size --all --max-depth 1 --one-file-system "$@" \ | |
| sort --numeric-sort --ignore-leading-blanks --reverse \ | |
| head --lines $(( $# + 10 )) | |
| tac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment