From ee823305a1b8c618ecd8676945c73375da8be665 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 25 Jan 2016 13:22:36 +1100 Subject: [PATCH] FIX: Allow for large free disk space reported via @envygeeks shift multiplication of free space out of awk and into rube awk on some systems appears to be converting stuff to floats. --- lib/disk_space.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/disk_space.rb b/lib/disk_space.rb index 18f4d1a9f..7a9734843 100644 --- a/lib/disk_space.rb +++ b/lib/disk_space.rb @@ -57,7 +57,7 @@ class DiskSpace protected def self.free(path) - `df -Pk #{path} | awk 'NR==2 {print $4 * 1024;}'`.to_i + `df -Pk #{path} | awk 'NR==2 {print $4;}'`.to_i * 1024 end def self.used(path)