#! /usr/bin/env bash
#
# df <path>
#
# Returns:  <fs> <fs-size-kB> <fs-used-kB> <fs-avail-kB>

. `dirname $0`/../zeekctl-config.sh

if [ ! -d "$1" ]; then
    echo "not a directory: $1"
    exit 1
fi

df -kP "$1" | awk '{print $1, $2, $3, $4}' | tail -1 | awk -v def_factor=1024 -f "${helperdir}/to-bytes.awk"
