effect of strip(1) on du(1)

From: Subbsd <subbsd_at_gmail.com>
Date: Thu, 2 Mar 2017 22:29:46 +0300
Hi,

Not sure for FreeBSD < 12, but i found interesting behavior strip
effect(1) on du(1) command:

--
%  strip /bin/pax && sleep 4 && du -sh /bin/pax
 65K    /bin/pax
% strip /bin/pax && sleep 3 && du -sh /bin/pax
 65K    /bin/pax
% strip /bin/pax && sleep 2 && du -sh /bin/pax
512B    /bin/pax
% strip /bin/pax && sleep 3 && du -sh /bin/pax
 65K    /bin/pax
--

During some interval after strip call, du will show 512B for any file.
If execute du(1) after strip(1) without delay, this behavior is reproduced 100%:

% strip /bin/sh && du /bin/sh
1       /bin/sh

What such behavior is connected with?
Received on Thu Mar 02 2017 - 18:29:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:10 UTC