git: du - Add an option to generate results based on file size

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Dec 13 11:15:11 PST 2019


commit 19541c34c23743ea625f0377174e3e57ca79623d
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Dec 13 11:06:34 2019 -0800

    du - Add an option to generate results based on file size
    
    * By default du generates results based on st_blkcnt, the actual
      number of blocks used on-media.  This value might be smaller than
      the file size due to filesystem-level compression, or possibly
      larger due to the filesystem also counting overhead for indirect
      blocks.
    
    * Add the -t option.  This option generates results based simply
      on the file size (st_size), and assumes a 512-byte media
      granularity.
    
      This option gives you an idea of the transmittable bytes if you
      were to copy the file elsewhere.

Summary of changes:
 usr.bin/du/du.1 | 11 +++++++++++
 usr.bin/du/du.c | 33 +++++++++++++++++++++++++--------
 2 files changed, 36 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/19541c34c23743ea625f0377174e3e57ca79623d


-- 
DragonFly BSD source repository


More information about the Commits mailing list