Skip to content

Instantly share code, notes, and snippets.

@vitaly-zdanevich
Created November 1, 2015 07:48
Show Gist options
  • Save vitaly-zdanevich/cc3fb5dc04b9c77e108d to your computer and use it in GitHub Desktop.
Save vitaly-zdanevich/cc3fb5dc04b9c77e108d to your computer and use it in GitHub Desktop.
Bash script that print like ll, but: name, size & md5 (http://unix.stackexchange.com/questions/240023/md5sum-for-every-file-with-ll#240028)
for f in * .*; do
[ -f "$f" ] && \
printf "%s %s %s\n" "$f" $(du -h -- "$f" | cut -f1) $(md5sum -- "$f" | cut -d' ' -f1)
done
@vitaly-zdanevich
Copy link
Author

Result:

argparser.py 20K 94dd6cd73ec0e52eed0be19d842f5046
config.py 4.0K 1b6751217224084e9c88a3d33b6c23f5
editor.py 12K c78c03fdfaabb608d432ee62ef4086d0
gclient.py 8.0K 54863aeedb13b2e61dc3447f1a2d4025
geeknote.py 32K d4f52dad1d1ec0471273d3fe5f90cf0b
gnsync.py 12K c57e5abf7e8145aaf41739c4ccef4ea9
oauth.py 12K 18116f3bb5a7e99247da297e77803f05
out.py 8.0K 1bc3c615cb143df8d21891b245ae8283
storage.py 12K 11dfe7052f22e2fd76199bfa763b0801
tools.py 4.0K 38cceaf21858f79301bb9d20d658a600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment