Skip to content

Instantly share code, notes, and snippets.

@Graham42
Created April 11, 2017 12:58
Show Gist options
  • Save Graham42/fe4ee1225f1e2d993e1b5a415c9c430d to your computer and use it in GitHub Desktop.
Save Graham42/fe4ee1225f1e2d993e1b5a415c9c430d to your computer and use it in GitHub Desktop.
One-liner to list files in a directory with actual byte size
DIR=path/to/wherever/; stat -c%n $DIR/* | xargs -I'{}' bash -c "printf \"%-40s\" {}; stat -c%s {} | xargs printf \"%'10.f\n\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment