Skip to content

Instantly share code, notes, and snippets.

@appplemac
Created June 11, 2013 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save appplemac/5756138 to your computer and use it in GitHub Desktop.
Save appplemac/5756138 to your computer and use it in GitHub Desktop.
One-liner for getting free space on current machine's mounted filesystems
`df`.split("\n").map {|line| line.split(" ")[3].to_i}[1...-1].inject(:+) / (1024*1024)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment