Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement du #50

Open
jbenet opened this issue Jul 28, 2015 · 1 comment
Open

implement du #50

jbenet opened this issue Jul 28, 2015 · 1 comment

Comments

@jbenet
Copy link

jbenet commented Jul 28, 2015

this made me sad today

disk_usage() {
    # normalize du across systems
    case $(uname -s) in
        Linux)
            DU="du -sb"
            ;;
        FreeBSD)
            DU="du -s -A -B 1"
            ;;
        Darwin | DragonFly)
            DU="du"
            ;;
    esac
        $DU "$1" | awk "{print \$1}"
}

maybe this project can make a go-du that's the same everywhere :)

@rht
Copy link

rht commented Jul 28, 2015

And go-coreutils already prefers the gnu/linux flags/convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants