🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.hackers
Article #23

Fwd: [Bug 299361] /bin/stat -h output is not parsable, is not scalable, lacks locking, has no option for listing data sections

#23
From: Jasmin Dave
Date: Tue, 13 Oct 2026 12:26
54 lines
7598 bytes
---------- Forwarded message ---------
From: <bugzilla-noreply@freebsd.org>
Date: Tue, 13 Oct 2026 at 14:25
Subject: [Bug 299361] /bin/stat -h output is not parsable, is not
scalable, lacks locking, has no option for listing data sections
To: <jasmin.dave.math@gmail.com>


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299361

            Bug ID: 299361
           Summary: /bin/stat -h output is not parsable, is not scalable,
                    lacks locking, has no option for listing data sections
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: jasmin.dave.math@gmail.com

/bin/stat -h output is not parsable, is not scalable, lacks locking, has no
option for listing data sections

Among many issues with the stat -h output is this:
- stat -h produces an endless stream of values in a single line, but standard
/bin/sh and other tools have line length limitations. Writing scripts which can
actually parse this are HARD to write, or trigger hidden limitations in tools
once the number of holes in a sparse file gets longer
- stat -h always starts at file position zero, which renders it unusable in
real world multi-PB sparse files. There should be an option to pass
startpos,endpos to limit the search, allowing scripts to work on only parts of
the file
- stat -h lacks an option to lock the file to prevent modifications by other
tools while it is looking for holes
- stat -h lacks an option to list the positions of data sections

--
You are receiving this mail because:
You reported the bug.


-- 
Thanks, Jasmin
-- 
Jasmin Dave - Math (Quaternions!), Coding, Simulations


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <CAHvsQGM2mqRrsyC8NE4GoBzjRZbkyh57-fkV+AUD5MxJCYRoSg@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <bug-299361-45917@https.bugs.freebsd.org/bugzilla/>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Jasmin Dave <jasmin.dave.math@gmail.com>
Newsgroups: muc.lists.freebsd.hackers
Subject: Fwd: [Bug 299361] /bin/stat -h output is not parsable, is not
 scalable, lacks locking, has no option for listing data sections
Date: Tue, 13 Oct 2026 14:26:13 +0200
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-hackers@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <CAHvsQGM2mqRrsyC8NE4GoBzjRZbkyh57-fkV+AUD5MxJCYRoSg@mail.gmail.com>
References: <bug-299361-45917@https.bugs.freebsd.org/bugzilla/>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="37833"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1791894416; h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:in-reply-to:in-reply-to:
	 references:references:list-id:list-help:list-owner:list-unsubscribe:
	 list-subscribe:list-post; bh=E1d8aOQKLNhnCX5dQAGbZ7khvD/QZOndzlRQq/1DuaQ=;
	b=L76dMuzWksJJQSx6Spdlucl/VtJ7+fdSdYwzZltioXptFljEWswYYMy7cGLocD4rwq/ERN
	uZ6HpDP+nQJhOfoU5Sh9WGQWQcEBpf76i4zLbnF/JkWUct0E/maD9QEgj/EL+7X4UNEBuF
	gSmdFY2Rez4yAxPXYbjAZ4kZKfa97JAyf3tvTPp3c0AB4SYUpQwe63SVx8wTkMJ5Z3vOcQ
	75pJODi8vsJiKRLqMdEnhiUk2ziibs3rw47CW1KI4EOpVx+isG8Ot7waqq7sp5bFcKzBP9
	QCBi9rFvWMH7G7xPt/Hx2OyQQmjf9Bc6KCEgY/KtzXYaBYxpZfPbXmcst8TcJg==
X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
	dkim=pass header.d=gmail.com header.s=20251104 header.b=PT58Hl8z;
	arc=pass ("google.com:s=arc-20260327:i=1");
	spf=pass (mx1.freebsd.org: domain of jasmin.dave.math@gmail.com designates 2607:f8b0:4864:20::22b as permitted sender) smtp.mailfrom=jasmin.dave.math@gmail.com;
	dmarc=pass (policy=none) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1791894411; x=1792499211; darn=freebsd.org;
        h=content-type:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=E1d8aOQKLNhnCX5dQAGbZ7khvD/QZOndzlRQq/1DuaQ=;
        b=PT58Hl8zZleBiY4s04dyt2F16JSGTGQPHzgrlWGawtzIuJBw+JWNsISCRjpU59OLla
         tymVt5LRd0pdER5h8OqLUrhK1kFOO+zl6SgfrEEiceLrZUSZD3vCI1r0rSm7K3AkwgaE
         RKIeH27RVo7mEJkFmTH+6sRsExaJPCDqaLYyp16QpzROwuMeaTDyst0/9fIRXdOpotYc
         K8Vs8wIqGI5ic14026E/YZY7/3F1TOyLUf7fE7vBt8z3SbabwniOuxg2IvGVPk9sJbb0
         /Suc9eLZaugoFVf+UCK43TTUeAjehh+ULVRsMtGJWH/WavWsPF7/4ZC6K5B7sZNcNi2h
         Wd4A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1791894411; x=1792499211;
        h=content-type:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=E1d8aOQKLNhnCX5dQAGbZ7khvD/QZOndzlRQq/1DuaQ=;
        b=xBqjfH0700+2FIbXv/cxiavws1H2bDF0jErEfb9G1KTYndMn/BhAFRYnbvW1F52Pao
         LJ4nFNV6U80AiHP4frlWGLbihc8YRG31uBlU8empJs7G3MlVU6gXhnHxbNuSxX4UgGuZ
         T7QY16eKtLwsiAe2M150fMKIi80g2C3M70VavTwWlh0nRYZAvZL3zbTtktgAu+VcDTc0
         XHtUUjvmkGgi3sIsO69KMtSlPEPQTlekeh4FUtQ4APdIV3RoRySacS5uVb0Z4j4XYzwy
         Yk9+cuTsT++pojn01zJZH69w32V/A17Kzv63K8ptXOJbnHjizOv9J/TFosLWMUf8udix
         VUYA==
X-Gm-Message-State: AFq9FYKbDK7Xfy7tuPHrkU9e4iEphMqYmqHQrJINHlXG9O4pz3F9t0iS
	kW73NLiy0osEn0xPDPCVZsTnQKhJLdfeEWixPC2Zgz6Dg06mSJ1JoSusDmjEaT4vAIZkxKrHcb4
	35nPtwqvbkRMire82LDWzDK1u3nyYsHvbYg==
X-Gm-Gg: AYBFou3y3m/sznyyr2+Wh1sJ2yGkxYFCQiIZO509mNpL1+rqfywaHVpEZq3VWB60iyL
	1ah3MnV7VLRfI3eQW6c5oWaKuA5C3DG0fEPdko5y1o57m3aY9QDvP0+codjuehzp9+hbRMAaDUK
	buPKwyMITOCg2Lsby2e1LggwDa+t5BgchSOnnBrGx/ezJA/cTO4vmYwkGN3MPpTnCF2+pNDr6d6
	nPP9lvcTa12ME0raDoq6ZWyMS1nH6Z9JpteXaHQtMAwyazYj5ku7dIGp6vagd5KEBDX288YrdMT
	r/3S8wSi8t6+O/xIU+of1vQyS/UIuTFJgNR+AiqIswFV7GeHyPMnIFAkgg==
Precedence: list
In-Reply-To: <bug-299361-45917@https.bugs.freebsd.org/bugzilla/>
X-Gm-Features: AclHuK8y6dDydzRx9NRdxEh5A9zR2xcmFidgrqc9_ckeHLxDO9Q7g4lWg4nTdc0
X-Spamd-Bar: --
X-Spamd-Result: default: False [-2.00 / 15.00];
	ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1];
	DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
	R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56];
	R_DKIM_ALLOW(-0.20)[gmail.com:s=20251104];
	MIME_GOOD(-0.10)[text/plain];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
	MIME_TRACE(0.00)[0:+];
	DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
	RCVD_COUNT_ONE(0.00)[1];
	FREEMAIL_FROM(0.00)[gmail.com];
	MISSING_XM_UA(0.00)[];
	MID_RHS_MATCH_FROMTLD(0.00)[];
	MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org];
	ALIAS_RESOLVED(0.00)[];
	FROM_EQ_ENVFROM(0.00)[];
	FREEMAIL_ENVFROM(0.00)[gmail.com];
	FROM_HAS_DN(0.00)[];
	RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::22b:from];
	RCPT_COUNT_ONE(0.00)[1];
	PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org];
	TO_DN_NONE(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	DKIM_TRACE(0.00)[gmail.com:+]
X-Rspamd-Queue-Id: 4j3tqx0QFLz4n6Y
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes