Last active
December 14, 2021 16:01
-
-
Save GuyPaddock/dd5ce0c1775f1fe9ddcd0c4c40dd4d10 to your computer and use it in GitHub Desktop.
Get sizes of files in a folder in CSV format
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
#!/usr/bin/env bash | |
echo "filename,size_bytes" | |
find "${1}" -type f | while read filename; do | |
stat --format="%n,%s" "${filename}"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment