coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: df wishlist


From: Eric Blake
Subject: Re: df wishlist
Date: Sat, 16 Mar 2019 12:44:14 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 3/16/19 11:07 AM, Bruce Dubbs wrote:
> It would be helpful to add a --terse option to df such that a user could
> do something like:
> 
> DF=$(df -k --terse --output=used $PWD)
> 
> Right now I see no method of omitting the header or to collapse the
> spaces between values to a single space.  This can be done of course
> with tools like awk, cut, sed, grep, tail, etc, but would be a lot
> cleaner if done inside df.

The philosophy behind Unix tools is that each tool should do one thing
well, and make it easy to string multiple tools together in pipelines to
accomplish larger tasks.  Bloating df to add to it something that you
can already get with existing tools is counter to that philosophy; and
even if we did extend df, you still would have to wait for that feature
to become popular in the distro you use, vs. the ability you already
have today to use existing tools.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]