lib/cli_tools/system.rb
def fs_disk_free( path )
  result = `df -P -k #{path}`.split("\n")[1]
  device, d_size, d_usage, d_free = result.split(" ")[0..3]

  d_free.to_i*1024 # in bytes
end
# Returns the amount in bytes of free disk space in the specified folder.
#
Returns the amount in bytes of free disk space in the specified folder.
Returns the amount in bytes of free disk space in the specified folder .
def fs_disk_free( path )
  result = `df -P -k #{path}`.split("\n")[1]
  device, d_size, d_usage, d_free = result.split(" ")[0..3]
  d_free.to_i*1024 
end
def fs_disk_free ( path ) result = ` df -P -k  #{ path } ` . split ( "\n" ) [ 1 ] device , d_size , d_usage , d_free = result . split ( " " ) [ 0 .. 3 ] d_free . to_i * 1024 end
Returns the amount in bytes of free disk space in the specified folder.
Returns the amount in bytes of free disk space in the specified folder .
# in bytes
path