Last active
May 24, 2024 00:47
-
-
Save thingsiplay/f3bf25b07d5aa2ddd3ceaecebccc92b6 to your computer and use it in GitHub Desktop.
biggest - list biggest files and folders
This file contains hidden or 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
A beefed up version as a new project: https://github.com/thingsiplay/biggest Does things a bit differently, such as inverted sort (biggest on top) and does not automatically search in directories.