0.0.1 • Published 10 years ago

du-multi v0.0.1

Weekly downloads
7
License
-
Repository
github
Last release
10 years ago

du-multi.js

Node.js wrapper for linux "du" command. Used to list usage of folders of a directory.

Install

$ npm install du-multi

Usage

Pass a directory as the first argument, a size type as an optional second argument, and then a callback function. Size type can be 'kb', 'mb', 'gb', etc. or simply 'h' for human readable. The default size type is 'h', and can be emitted entirely if needed.

var du = require('du-multi');

du('/home', 'm', function(err, output) {
    if (err) {throw err;}
    console.log(output);  // array returned containing size info and dirs
});