Created
August 17, 2016 21:02
-
-
Save aculich/5967df09ae883679338d32373fcf56bc to your computer and use it in GitHub Desktop.
quick way to count up files of different sizes
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/bash | |
| cd /path/to/files | |
| find . -type f | wc -l | |
| find . -type f -size +1M | wc -l | |
| find . -type f -size +10M | wc -l | |
| find . -type f -size +1G | wc -l | |
| find . -type f -size +10G | wc -l | |
| ### or, the quick one-liner way: | |
| for size in +0 +1M +10M +1G +10G ; do echo -ne "$size\t"; find . -type f -size $size | wc -l; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment