Skip to content

Instantly share code, notes, and snippets.

@prasincs
Last active August 29, 2015 14:16
Show Gist options
  • Save prasincs/79174d3762450a59ac7a to your computer and use it in GitHub Desktop.
Save prasincs/79174d3762450a59ac7a to your computer and use it in GitHub Desktop.
bash hacks
  • Finding the size in MB
function s3_dir_size {
  s3cmd du $1 | cut -d' ' -f 1 | { read a; echo $a "/ (1024 * 1024 ) "; } | bc -l | { read a; echo "$a M $1"; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment