Find the used and total size of the file system in kilobytes
npm install @financial-times/disk-spacedf -BK (or df -bk if on OS X) command which shows the amount of disk space available on the file system that a given file is stored on. It returns the used size and total size of the file system in kilobytes.``
const diskSpace = require('@financial-times/disk-space');
diskSpace('/' , function(error, data) {
console.log(data); // returns { usedSize: 20, totalSize: 30 } in Kilobytes
});
``