Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jun 2022 19:53:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 264420] [PATCH] du: Add '-b' flag for displaying bytes
Message-ID:  <bug-264420-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264420

            Bug ID: 264420
           Summary: [PATCH] du: Add '-b' flag for displaying bytes
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: obiwac@gmail.com
                CC: obiwac@gmail.com

Created attachment 234396
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D234396&action=
=3Dedit
Patch for du -b

Adds a '-b' flag to the du(1) utility (in /usr.bin/du) for displaying the t=
otal
number of bytes in a file/directory, like the coreutils equivalent.

I'm doing this simply by separating out a curbytes value from curblocks, and
using that for operations when bflag is set.

I'm aware the wc(1) utility offers similar functionality with the '-c' flag,
but there are a few limitations that that solution carries (e.g. not being =
able
to count total bytes of entire directories recursively).

I've updated the manual page (along with adding the '-g' flag to places whe=
re
it was missing), and also created a new testcase for it.

(I have read UPDATING.)

Good evening ;)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264420-227>