Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

He who always plows a straight furrow is in a rut.


aus+uk / uk.comp.sys.mac / Re: How big is a folder?

SubjectAuthor
* How big is a folder?Martin S Taylor
`* Re: How big is a folder?Bruce Horrocks
 `* Re: How big is a folder?Martin S Taylor
  +* Re: How big is a folder?Theo
  |+* Re: How big is a folder?Martin S Taylor
  ||`* Re: How big is a folder?Jaimie Vandenbergh
  || `* Re: How big is a folder?Martin S Taylor
  ||  `* Re: How big is a folder?Bruce Horrocks
  ||   `* Re: How big is a folder?Martin S Taylor
  ||    `* Re: How big is a folder?Bruce Horrocks
  ||     `* Re: How big is a folder?Martin S Taylor
  ||      `* Re: How big is a folder?Martin S Taylor
  ||       `- Re: How big is a folder?Bruce Horrocks
  |`* Re: How big is a folder?TimS
  | `* Re: How big is a folder?Alan B
  |  `* Re: How big is a folder?TimS
  |   `- Re: How big is a folder?Jaimie Vandenbergh
  `- Re: How big is a folder?J. J. Lodder

1
How big is a folder?

<0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21006&group=uk.comp.sys.mac#21006

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: correspondence@mRaErMtOiVnEsTtHaIySlor.com (Martin S Taylor)
Newsgroups: uk.comp.sys.mac
Subject: How big is a folder?
Date: Tue, 27 Feb 2024 14:59:57 +0000
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org>
Reply-To: correspondence@mRaErMtOiVnEsTtHaIySlor.com
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="5c7a65e07cde08f074de4e374f0a1477";
logging-data="3434107"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Ehv9xGawi+SsqtdXW9+urbKATYRilydE="
User-Agent: Hogwasher/5.24
Cancel-Lock: sha1:hCXgXs5o0YyoY9FkAeRBZ+qdTo4=
X-Face: |DM;jr,c64.*AL%fk,trjr%G%Rk"k^n7!U)u+3muHSnI]TL#_QlfWB.Llwu-&?
OPs<vKf|bUu,MX%HK4dh\!=?3F0%.a-\bgj9CquM24/9YmW&4EX%e;!4\Ls*
vcbN>T3[oMA%R/e,-pg'{s,7Qf9GT0bbf>czov>^4f~jPgN
Mail-Copies-To: nobody
 by: Martin S Taylor - Tue, 27 Feb 2024 14:59 UTC

When I back up drives to a backup disk (using Carbon Copy Cloner), the size
of various folders is reported incorrectly. The people at CCC tell me this is
a known bug in MacOS.

How can I find out how much disk space a given folder is taking up? Checking
the Finder's 'Get Info' box confirms the erroneous size reported in the
Finder. There must be a simple Terminal command or something, but I'm not so
good with Terminal. The Unix du command gives reams of data on how much space
every single file is taking up.

Any suggestions? Can I force the Finder to recalculate the size of a folder?

Martin S Taylor

Re: How big is a folder?

<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21009&group=uk.comp.sys.mac#21009

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: 07.013@scorecrow.com (Bruce Horrocks)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Tue, 27 Feb 2024 23:33:42 +0000
Lines: 25
Message-ID: <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net +SdkNcgzcocpmejlsWdXGgngBD+poCybL+KqQNBs0Sgg05/jx/
Cancel-Lock: sha1:IcWHYP4mxHGgLD5tIaawfR8ubWA= sha256:acOmTHG2TaE743EztyrHKqdaDym6q+OgZgB2+LeM/xY=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org>
 by: Bruce Horrocks - Tue, 27 Feb 2024 23:33 UTC

On 27/02/2024 14:59, Martin S Taylor wrote:
> When I back up drives to a backup disk (using Carbon Copy Cloner), the size
> of various folders is reported incorrectly. The people at CCC tell me this is
> a known bug in MacOS.
>
> How can I find out how much disk space a given folder is taking up? Checking
> the Finder's 'Get Info' box confirms the erroneous size reported in the
> Finder. There must be a simple Terminal command or something, but I'm not so
> good with Terminal. The Unix du command gives reams of data on how much space
> every single file is taking up.
>
> Any suggestions? Can I force the Finder to recalculate the size of a folder?
>
> Martin S Taylor
>

In Terminal

$ du -sh ~/Documents

to give the size of the Documents folder only.
--
Bruce Horrocks
Surrey, England

Re: How big is a folder?

<0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21011&group=uk.comp.sys.mac#21011

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: correspondence@mRaErMtOiVnEsTtHaIySlor.com (Martin S Taylor)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Wed, 28 Feb 2024 08:13:29 +0000
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>
Reply-To: correspondence@mRaErMtOiVnEsTtHaIySlor.com
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="156f70f85df82e3b2a28f480b1c94ec5";
logging-data="3948216"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IHrDK4k12QZNC+UDiXPMDn7jgNVMMa3A="
User-Agent: Hogwasher/5.24
Cancel-Lock: sha1:zuHgtgbXMJgisjZ9Vf0oPGh3JAo=
X-Face: |DM;jr,c64.*AL%fk,trjr%G%Rk"k^n7!U)u+3muHSnI]TL#_QlfWB.Llwu-&?
OPs<vKf|bUu,MX%HK4dh\!=?3F0%.a-\bgj9CquM24/9YmW&4EX%e;!4\Ls*
vcbN>T3[oMA%R/e,-pg'{s,7Qf9GT0bbf>czov>^4f~jPgN
Mail-Copies-To: nobody
 by: Martin S Taylor - Wed, 28 Feb 2024 08:13 UTC

On 27 Feb 2024, Bruce Horrocks wrote
(in article<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>):

> > How can I find out how much disk space a given folder is taking up? Checking
> > the Finder's 'Get Info' box confirms the erroneous size reported in the
> > Finder. There must be a simple Terminal command or something, but I'm not so
> > good with Terminal. The Unix du command gives reams of data on how much
> > space
> > every single file is taking up.
> >
> > Any suggestions? Can I force the Finder to recalculate the size of a folder?
> >
> > Martin S Taylor
>
> In Terminal
>
> $ du -sh ~/Documents
>
> to give the size of the Documents folder only.

Thanks - most helpful.

Now, is there a way to force the Finder to display this information, ie. to
recalculate the size of folders and their contents?

MST

Re: How big is a folder?

<3we*Up8Dz@news.chiark.greenend.org.uk>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21014&group=uk.comp.sys.mac#21014

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+news@chiark.greenend.org.uk (Theo)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: 28 Feb 2024 10:49:31 +0000 (GMT)
Organization: University of Cambridge, England
Message-ID: <3we*Up8Dz@news.chiark.greenend.org.uk>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="15211"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Wed, 28 Feb 2024 10:49 UTC

Martin S Taylor <correspondence@mraermtoivnestthaiyslor.com> wrote:
> On 27 Feb 2024, Bruce Horrocks wrote
> (in article<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>):
> > In Terminal
> >
> > $ du -sh ~/Documents
> >
> > to give the size of the Documents folder only.
>
> Thanks - most helpful.
>
> Now, is there a way to force the Finder to display this information, ie. to
> recalculate the size of folders and their contents?

There are two different 'sizes': the sizes of the files being stored, and
the disc space being used to store them. They aren't the same because
storage is measured in blocks (perhaps 4KiB) but files are sized in bytes.
Save a 1 byte file and it'll be rounded up to some number of blocks (eg
4KiB).

Finder's 'Get Info' tells you the number of bytes of the files and 'du'
tells you the amount of storage they occupy. With APFS the latter isn't
clear cut - for example, if you have a snapshot deleting a file may not
free up any space (the file still has to be stored for the snapshot). Also
APFS can transparently compress files, so change a file contents without
changing its length and yet the number of blocks it occupies may vary.

In essence the amount of space some arbitrary set of folders takes up is
increasingly disconnected from what would happen if you changed or deleted
them. So there's limited utility in exposing that to users.

'df -h' can show you disc occupancy by volume, which is another way to look
at this. But don't be surprised if the free space doesn't behave as you
would expect, due to the above.

Theo

Re: How big is a folder?

<0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21016&group=uk.comp.sys.mac#21016

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: correspondence@mRaErMtOiVnEsTtHaIySlor.com (Martin S Taylor)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Wed, 28 Feb 2024 11:52:15 +0000
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk>
Reply-To: correspondence@mRaErMtOiVnEsTtHaIySlor.com
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="156f70f85df82e3b2a28f480b1c94ec5";
logging-data="4069319"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ryEgySHXQ/uwyqnA0e5+eExhPhflmgZ4="
User-Agent: Hogwasher/5.24
Cancel-Lock: sha1:Q6tFVo6998fB/hF9qp8e1oLKFQc=
Mail-Copies-To: nobody
X-Face: |DM;jr,c64.*AL%fk,trjr%G%Rk"k^n7!U)u+3muHSnI]TL#_QlfWB.Llwu-&?
OPs<vKf|bUu,MX%HK4dh\!=?3F0%.a-\bgj9CquM24/9YmW&4EX%e;!4\Ls*
vcbN>T3[oMA%R/e,-pg'{s,7Qf9GT0bbf>czov>^4f~jPgN
 by: Martin S Taylor - Wed, 28 Feb 2024 11:52 UTC

On 28 Feb 2024, Theo wrote
(in article <3we*Up8Dz@news.chiark.greenend.org.uk>):

> There are two different 'sizes': the sizes of the files being stored, and
> the disc space being used to store them. They aren't the same because
> storage is measured in blocks (perhaps 4KiB) but files are sized in bytes.
> Save a 1 byte file and it'll be rounded up to some number of blocks (eg
> 4KiB).

Yes, I know this, but the discrepancy is too big for this to be the cause. I
have perfectly ordinary video files which run properly for half an hour, yet
the finder says they take up 20KB.

(du gives a more realistic figure.)

MST

Re: How big is a folder?

<l48le0Ft1jtU1@mid.individual.net>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21017&group=uk.comp.sys.mac#21017

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: tim@streater.me.uk (TimS)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: 28 Feb 2024 11:57:52 GMT
Lines: 50
Message-ID: <l48le0Ft1jtU1@mid.individual.net>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net uHKg1NCrCwpMd+XaQF4yrQ0rxZ1HGplYC3kMX6OdtTGh6LqgAi
Cancel-Lock: sha1:+4L8h+0QP6FXvc+AbmN5BOTu3UE= sha256:qP/tsw8q/Lq0/9IJiSyhB3EM1wJTrN5QuA+DoXClnUg=
X-Face: "M;\x&0=#cxDW4-*uL~{5d@+P7KmbB:]::l[1_h]^tu#H9yQ#.X4kSbDi;atp9otO=_G|Z2 t<Cay~&S1ru:A{I$SdbF$KS43iuPUwIh,8X"%3L;9=T~]BLW=IKvZ|/}D@Rml{4D#!Uc)|mu`34(e~ x[(n[\3.'{ChZ!"cF'!%M)iM0u~wQ"%,JC}JOhtI;:<EF5?fcf<^2T,{u.&U|?`X%B_eD##Y=ZdC2< Mq_b}MHzYQg8x-N,4)~`n*K*k?No"WVa3]]dntN(76o.nd1`;l}[-O<wJB{MQNv=H^6M`>CL2oMg$~ oW5:YPiBg[-rf40JdIu#K4A+M2gSW<LK5!!SEt:%K0z&:[N:7
User-Agent: Usenapp for MacOS
X-Usenapp: v1.27.2/l - Full License
 by: TimS - Wed, 28 Feb 2024 11:57 UTC

On 28 Feb 2024 at 10:49:31 GMT, "Theo" <theom+news@chiark.greenend.org.uk>
wrote:

> Martin S Taylor <correspondence@mraermtoivnestthaiyslor.com> wrote:
>> On 27 Feb 2024, Bruce Horrocks wrote
>> (in article<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>):
>>> In Terminal
>>>
>>> $ du -sh ~/Documents
>>>
>>> to give the size of the Documents folder only.
>>
>> Thanks - most helpful.
>>
>> Now, is there a way to force the Finder to display this information, ie. to
>> recalculate the size of folders and their contents?
>
> There are two different 'sizes': the sizes of the files being stored, and
> the disc space being used to store them. They aren't the same because
> storage is measured in blocks (perhaps 4KiB) but files are sized in bytes.
> Save a 1 byte file and it'll be rounded up to some number of blocks (eg
> 4KiB).
>
> Finder's 'Get Info' tells you the number of bytes of the files and 'du'
> tells you the amount of storage they occupy. With APFS the latter isn't
> clear cut - for example, if you have a snapshot deleting a file may not
> free up any space (the file still has to be stored for the snapshot). Also
> APFS can transparently compress files, so change a file contents without
> changing its length and yet the number of blocks it occupies may vary.
>
> In essence the amount of space some arbitrary set of folders takes up is
> increasingly disconnected from what would happen if you changed or deleted
> them. So there's limited utility in exposing that to users.
>
> 'df -h' can show you disc occupancy by volume, which is another way to look
> at this. But don't be surprised if the free space doesn't behave as you
> would expect, due to the above.

Is it the case that, with more recent macOS versions, if I duplicate a folder
with lots of files in it (onto the same volume) that occupies some hundreds of
MB, that tasks essentially no space because at this point, all that has
happened is lots more directory entries? I ask this because doing just that
seems to take Finder no time at all. I then assume, that if this is the case,
that if some app wants to modify a block in the middle of such a duplicated
file, then the file is actually copied first and ceases to be just a pointer
to the old file and exists in its own right?

--
Tim

Re: How big is a folder?

<urn8vi$3sl05$1@alanrichardbarker.eternal-september.org>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21018&group=uk.comp.sys.mac#21018

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!alanrichardbarker.eternal-september.org!.POSTED!not-for-mail
From: alanrichardbarker@gmail.com.invalid (Alan B)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Wed, 28 Feb 2024 12:29:38 -0000 (UTC)
Organization: Grumpy Old Men
Lines: 54
Message-ID: <urn8vi$3sl05$1@alanrichardbarker.eternal-september.org>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org>
<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>
<0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org>
<3we*Up8Dz@news.chiark.greenend.org.uk>
<l48le0Ft1jtU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 28 Feb 2024 12:29:38 -0000 (UTC)
Injection-Info: alanrichardbarker.eternal-september.org; posting-host="f2ccf9f5d352bdbfea475e39331c78c8";
logging-data="4084741"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6z0ZBAgmxCl5NUl5gIl0S8Xf+5fXtlNASXS3pSDuMjg=="
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
Cancel-Lock: sha1:s4oyNMa0QmSH5uogBqLO+ngpxss=
sha1:AY7AH+0rQmKGdlV+Eage4mxXyvU=
X-No-Archive: Yes
X-Face: nG6>hdjT^mn!;GSJ^^\ZQOl<Y6ji0*21Sj'u?{'0H""UaDnLW|{</uR5Zkg0\93OsFI.LLS |,nz@w%Vezf1l7MmVVy/J+Z=Dl#quuPgB5)T2awRzA]X\2Sd(RZbxg{3{!mkZr%@@x'[U&VxyY4]sR 0Cwoj."gM#,0AR}|Lx[bvku-1o<yHzB.M`yRkH(,?Ed3&33O@_#B-+<g[3:X45}X)<NZfI+R"2rL3( w6edB|\DO7wks0SKvSp!tC3nmcONA8x
 by: Alan B - Wed, 28 Feb 2024 12:29 UTC

TimS <tim@streater.me.uk> wrote:
> On 28 Feb 2024 at 10:49:31 GMT, "Theo" <theom+news@chiark.greenend.org.uk>
> wrote:
>
>> Martin S Taylor <correspondence@mraermtoivnestthaiyslor.com> wrote:
>>> On 27 Feb 2024, Bruce Horrocks wrote
>>> (in article<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>):
>>>> In Terminal
>>>>
>>>> $ du -sh ~/Documents
>>>>
>>>> to give the size of the Documents folder only.
>>>
>>> Thanks - most helpful.
>>>
>>> Now, is there a way to force the Finder to display this information, ie. to
>>> recalculate the size of folders and their contents?
>>
>> There are two different 'sizes': the sizes of the files being stored, and
>> the disc space being used to store them. They aren't the same because
>> storage is measured in blocks (perhaps 4KiB) but files are sized in bytes.
>> Save a 1 byte file and it'll be rounded up to some number of blocks (eg
>> 4KiB).
>>
>> Finder's 'Get Info' tells you the number of bytes of the files and 'du'
>> tells you the amount of storage they occupy. With APFS the latter isn't
>> clear cut - for example, if you have a snapshot deleting a file may not
>> free up any space (the file still has to be stored for the snapshot). Also
>> APFS can transparently compress files, so change a file contents without
>> changing its length and yet the number of blocks it occupies may vary.
>>
>> In essence the amount of space some arbitrary set of folders takes up is
>> increasingly disconnected from what would happen if you changed or deleted
>> them. So there's limited utility in exposing that to users.
>>
>> 'df -h' can show you disc occupancy by volume, which is another way to look
>> at this. But don't be surprised if the free space doesn't behave as you
>> would expect, due to the above.
>
> Is it the case that, with more recent macOS versions, if I duplicate a folder
> with lots of files in it (onto the same volume) that occupies some hundreds of
> MB, that tasks essentially no space because at this point, all that has
> happened is lots more directory entries? I ask this because doing just that
> seems to take Finder no time at all. I then assume, that if this is the case,
> that if some app wants to modify a block in the middle of such a duplicated
> file, then the file is actually copied first and ceases to be just a pointer
> to the old file and exists in its own right?

It’s all about “Copy on Write” as explained by Howard Oakley.

<https://eclecticlight.co/2020/04/14/copy-move-and-clone-files-in-apfs-a-primer/comment-page-1/>

--
Cheers, Alan

Re: How big is a folder?

<1qpmtwg.1curo2k142ksykN%nospam@de-ster.demon.nl>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21019&group=uk.comp.sys.mac#21019

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@de-ster.demon.nl (J. J. Lodder)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Wed, 28 Feb 2024 13:58:09 +0100
Organization: De Ster
Lines: 36
Message-ID: <1qpmtwg.1curo2k142ksykN%nospam@de-ster.demon.nl>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org>
Reply-To: jjlax32@xs4all.nl (J. J. Lodder)
Injection-Info: dont-email.me; posting-host="243ed165d27fbb219cc12b0da217c971";
logging-data="4095225"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kvANDX7p798YhDCy/ASA+hm0G7GlKrS4="
User-Agent: MacSOUP/2.8.5 (ea919cf118) (Mac OS 10.12.6)
Cancel-Lock: sha1:ERQWsvXPJtD7jnt0fItf+wgWb38=
 by: J. J. Lodder - Wed, 28 Feb 2024 12:58 UTC

Martin S Taylor <correspondence@mRaErMtOiVnEsTtHaIySlor.com> wrote:

> On 27 Feb 2024, Bruce Horrocks wrote
> (in article<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>):
>
> > > How can I find out how much disk space a given folder is taking up?
> > > Checking the Finder's 'Get Info' box confirms the erroneous size
> > > reported in the Finder. There must be a simple Terminal command or
> > > something, but I'm not so good with Terminal. The Unix du command
> > > gives reams of data on how much space every single file is taking up.
> > >
> > > Any suggestions? Can I force the Finder to recalculate the size of a
> > >folder?
> > >
> > > Martin S Taylor
> >
> > In Terminal
> >
> > $ du -sh ~/Documents
> >
> > to give the size of the Documents folder only.
>
> Thanks - most helpful.
>
> Now, is there a way to force the Finder to display this information, ie. to
> recalculate the size of folders and their contents?

Of no use to you probably, but I still have a File Buddy working.
It calculates folder sizes and item counts on demand,
by actualy finding the files and addding the sizes.
It usually returns a smaller folder size than the finder.

Not beyond Sierra...

Jan

Re: How big is a folder?

<l48suiFu58kU1@mid.individual.net>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21021&group=uk.comp.sys.mac#21021

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: tim@streater.me.uk (TimS)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: 28 Feb 2024 14:06:10 GMT
Lines: 62
Message-ID: <l48suiFu58kU1@mid.individual.net>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk> <l48le0Ft1jtU1@mid.individual.net> <urn8vi$3sl05$1@alanrichardbarker.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 1g8HBsKQVv1H32tjqbgWzwLGBgx72HF3+lKCbcYQZ+L1ni8xa1
Cancel-Lock: sha1:W/VAz6DIjrWqNch/rKSsgKemZTI= sha256:RSDsRohnBkDIug21fMxQliCpC9OubID58TvSstYAqDM=
X-Face: "M;\x&0=#cxDW4-*uL~{5d@+P7KmbB:]::l[1_h]^tu#H9yQ#.X4kSbDi;atp9otO=_G|Z2 t<Cay~&S1ru:A{I$SdbF$KS43iuPUwIh,8X"%3L;9=T~]BLW=IKvZ|/}D@Rml{4D#!Uc)|mu`34(e~ x[(n[\3.'{ChZ!"cF'!%M)iM0u~wQ"%,JC}JOhtI;:<EF5?fcf<^2T,{u.&U|?`X%B_eD##Y=ZdC2< Mq_b}MHzYQg8x-N,4)~`n*K*k?No"WVa3]]dntN(76o.nd1`;l}[-O<wJB{MQNv=H^6M`>CL2oMg$~ oW5:YPiBg[-rf40JdIu#K4A+M2gSW<LK5!!SEt:%K0z&:[N:7
User-Agent: Usenapp for MacOS
X-Usenapp: v1.27.2/l - Full License
 by: TimS - Wed, 28 Feb 2024 14:06 UTC

On 28 Feb 2024 at 12:29:38 GMT, "Alan B" <alanrichardbarker@gmail.com.invalid>
wrote:

> TimS <tim@streater.me.uk> wrote:
>> On 28 Feb 2024 at 10:49:31 GMT, "Theo" <theom+news@chiark.greenend.org.uk>
>> wrote:
>>
>>> Martin S Taylor <correspondence@mraermtoivnestthaiyslor.com> wrote:
>>>> On 27 Feb 2024, Bruce Horrocks wrote
>>>> (in article<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>):
>>>>> In Terminal
>>>>>
>>>>> $ du -sh ~/Documents
>>>>>
>>>>> to give the size of the Documents folder only.
>>>>
>>>> Thanks - most helpful.
>>>>
>>>> Now, is there a way to force the Finder to display this information, ie. to
>>>> recalculate the size of folders and their contents?
>>>
>>> There are two different 'sizes': the sizes of the files being stored, and
>>> the disc space being used to store them. They aren't the same because
>>> storage is measured in blocks (perhaps 4KiB) but files are sized in bytes.
>>> Save a 1 byte file and it'll be rounded up to some number of blocks (eg
>>> 4KiB).
>>>
>>> Finder's 'Get Info' tells you the number of bytes of the files and 'du'
>>> tells you the amount of storage they occupy. With APFS the latter isn't
>>> clear cut - for example, if you have a snapshot deleting a file may not
>>> free up any space (the file still has to be stored for the snapshot). Also
>>> APFS can transparently compress files, so change a file contents without
>>> changing its length and yet the number of blocks it occupies may vary.
>>>
>>> In essence the amount of space some arbitrary set of folders takes up is
>>> increasingly disconnected from what would happen if you changed or deleted
>>> them. So there's limited utility in exposing that to users.
>>>
>>> 'df -h' can show you disc occupancy by volume, which is another way to look
>>> at this. But don't be surprised if the free space doesn't behave as you
>>> would expect, due to the above.
>>
>> Is it the case that, with more recent macOS versions, if I duplicate a folder
>> with lots of files in it (onto the same volume) that occupies some hundreds of
>> MB, that tasks essentially no space because at this point, all that has
>> happened is lots more directory entries? I ask this because doing just that
>> seems to take Finder no time at all. I then assume, that if this is the case,
>> that if some app wants to modify a block in the middle of such a duplicated
>> file, then the file is actually copied first and ceases to be just a pointer
>> to the old file and exists in its own right?
>
> It’s all about “Copy on Write” as explained by Howard Oakley.
>
> <https://eclecticlight.co/2020/04/14/copy-move-and-clone-files-in-apfs-a-primer/comment-page-1/>

Ah thanks, that's helpful.

But it does seem to me then that the OP cannot be much more sure that ls in
the Terminal is going to be a better bet than Finder.

--
Tim

Re: How big is a folder?

<l4b34cF9t3dU1@mid.individual.net>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21030&group=uk.comp.sys.mac#21030

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jaimie@usually.sessile.org (Jaimie Vandenbergh)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: 29 Feb 2024 10:03:56 GMT
Lines: 32
Message-ID: <l4b34cF9t3dU1@mid.individual.net>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk> <0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net rMXMkAynspYhTPRMyBnHNAyRuL+MCw6ykKDoqCI2BYej8Nxm7x
Cancel-Lock: sha1:VztEdliyfXkMZ6A6AAEMPWTKN48= sha256:4Ucp5WxUztseyX4EaotfVkEbymBK6HGWeQzo6z1oGlU=
User-Agent: Usenapp for MacOS
X-Usenapp: v1.27.2/l - Full License
 by: Jaimie Vandenbergh - Thu, 29 Feb 2024 10:03 UTC

On 28 Feb 2024 at 11:52:15 GMT, "Martin S Taylor"
<correspondence@mRaErMtOiVnEsTtHaIySlor.com> wrote:

> On 28 Feb 2024, Theo wrote
> (in article <3we*Up8Dz@news.chiark.greenend.org.uk>):
>
>> There are two different 'sizes': the sizes of the files being stored, and
>> the disc space being used to store them. They aren't the same because
>> storage is measured in blocks (perhaps 4KiB) but files are sized in bytes.
>> Save a 1 byte file and it'll be rounded up to some number of blocks (eg
>> 4KiB).
>
> Yes, I know this, but the discrepancy is too big for this to be the cause. I
> have perfectly ordinary video files which run properly for half an hour, yet
> the finder says they take up 20KB.
>
> (du gives a more realistic figure.)
>
> MST

I've been doing some file wrangling today, and it can take upwards of a
minute for Finder to even notice that files have been moved/renamed if
it was done on the command line without Finder's involvement. It's
incredibly poor.

I've not noticed Finder get the wrong file size stuck on things yet, but
I may just not have been looking - I mostly use columns view.

Cheers - Jaimie
--
The truth may be out there, but the lies are inside your head.
-- Terry Pratchett

Re: How big is a folder?

<l4b3alF9u26U1@mid.individual.net>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21031&group=uk.comp.sys.mac#21031

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!nntp.comgw.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jaimie@usually.sessile.org (Jaimie Vandenbergh)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: 29 Feb 2024 10:07:17 GMT
Lines: 77
Message-ID: <l4b3alF9u26U1@mid.individual.net>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk> <l48le0Ft1jtU1@mid.individual.net> <urn8vi$3sl05$1@alanrichardbarker.eternal-september.org> <l48suiFu58kU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net lS2sbWnVbvNkUpKA1fB/bQCswojNucs8TKLUmb3KJn3k1y8Rhv
Cancel-Lock: sha1:8eHr02u8b8icgLrYBqj1RLBqLec= sha256:C4+LY1hUTnZ2Uo6CTcH0+I8LvhF/9vpNYp/tnHgTNYY=
User-Agent: Usenapp for MacOS
X-Usenapp: v1.27.2/l - Full License
 by: Jaimie Vandenbergh - Thu, 29 Feb 2024 10:07 UTC

On 28 Feb 2024 at 14:06:10 GMT, "TimS" <tim@streater.me.uk> wrote:

> On 28 Feb 2024 at 12:29:38 GMT, "Alan B" <alanrichardbarker@gmail.com.invalid>
> wrote:
>
>> TimS <tim@streater.me.uk> wrote:
>>> On 28 Feb 2024 at 10:49:31 GMT, "Theo" <theom+news@chiark.greenend.org.uk>
>>> wrote:
>>>
>>>> Martin S Taylor <correspondence@mraermtoivnestthaiyslor.com> wrote:
>>>>> On 27 Feb 2024, Bruce Horrocks wrote
>>>>> (in article<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>):
>>>>>> In Terminal
>>>>>>
>>>>>> $ du -sh ~/Documents
>>>>>>
>>>>>> to give the size of the Documents folder only.
>>>>>
>>>>> Thanks - most helpful.
>>>>>
>>>>> Now, is there a way to force the Finder to display this information, ie. to
>>>>> recalculate the size of folders and their contents?
>>>>
>>>> There are two different 'sizes': the sizes of the files being stored, and
>>>> the disc space being used to store them. They aren't the same because
>>>> storage is measured in blocks (perhaps 4KiB) but files are sized in bytes.
>>>> Save a 1 byte file and it'll be rounded up to some number of blocks (eg
>>>> 4KiB).
>>>>
>>>> Finder's 'Get Info' tells you the number of bytes of the files and 'du'
>>>> tells you the amount of storage they occupy. With APFS the latter isn't
>>>> clear cut - for example, if you have a snapshot deleting a file may not
>>>> free up any space (the file still has to be stored for the snapshot). Also
>>>> APFS can transparently compress files, so change a file contents without
>>>> changing its length and yet the number of blocks it occupies may vary.
>>>>
>>>> In essence the amount of space some arbitrary set of folders takes up is
>>>> increasingly disconnected from what would happen if you changed or deleted
>>>> them. So there's limited utility in exposing that to users.
>>>>
>>>> 'df -h' can show you disc occupancy by volume, which is another way to look
>>>> at this. But don't be surprised if the free space doesn't behave as you
>>>> would expect, due to the above.
>>>
>>> Is it the case that, with more recent macOS versions, if I duplicate a folder
>>> with lots of files in it (onto the same volume) that occupies some hundreds of
>>> MB, that tasks essentially no space because at this point, all that has
>>> happened is lots more directory entries? I ask this because doing just that
>>> seems to take Finder no time at all. I then assume, that if this is the case,
>>> that if some app wants to modify a block in the middle of such a duplicated
>>> file, then the file is actually copied first and ceases to be just a pointer
>>> to the old file and exists in its own right?
>>
>> It’s all about “Copy on Write” as explained by Howard Oakley.
>>
>> <https://eclecticlight.co/2020/04/14/copy-move-and-clone-files-in-apfs-a-primer/comment-page-1/>
>
> Ah thanks, that's helpful.
>
> But it does seem to me then that the OP cannot be much more sure that ls in
> the Terminal is going to be a better bet than Finder.

Right - the Terminal will also double-count two identical COW-ed files
that aren't actuall using double the bytes of the original. There's no
one-size-fits-all right answer.

As far as I know nothing will be able to run through a directory tree
and tell you how many actual bytes on disk it's *really* using.

'df' will accurately show you disk space that's free, but even that's
not the whole story as a bunch of stuff is purgeable if macOS wants the
space - old TM snapshots for example.

Cheers - Jaimie
--
"It has been said that man is a rational animal. All my life I
have been searching for evidence which could support this" -- Bertrand Russell

Re: How big is a folder?

<0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21033&group=uk.comp.sys.mac#21033

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: correspondence@mRaErMtOiVnEsTtHaIySlor.com (Martin S Taylor)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Thu, 29 Feb 2024 10:58:55 +0000
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk> <0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org> <l4b34cF9t3dU1@mid.individual.net>
Reply-To: correspondence@mRaErMtOiVnEsTtHaIySlor.com
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="94f4ce851ca75c3d8d1f6c46323ec5b7";
logging-data="520284"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+UMGUpFBY0TLb4i7KVR3+IaZzVGZm0Z6g="
User-Agent: Hogwasher/5.24
Cancel-Lock: sha1:HtAQKqAYIsodSewKHZLI0aecAvE=
X-Face: |DM;jr,c64.*AL%fk,trjr%G%Rk"k^n7!U)u+3muHSnI]TL#_QlfWB.Llwu-&?
OPs<vKf|bUu,MX%HK4dh\!=?3F0%.a-\bgj9CquM24/9YmW&4EX%e;!4\Ls*
vcbN>T3[oMA%R/e,-pg'{s,7Qf9GT0bbf>czov>^4f~jPgN
Mail-Copies-To: nobody
 by: Martin S Taylor - Thu, 29 Feb 2024 10:58 UTC

On 29 Feb 2024, Jaimie Vandenbergh wrote
(in article <l4b34cF9t3dU1@mid.individual.net>):

> > Yes, I know this, but the discrepancy is too big for this to be the cause. I
> > have perfectly ordinary video files which run properly for half an hour, yet
> > the finder says they take up 20KB.
> >
> > (du gives a more realistic figure.)
> >
> > MST
>
> I've been doing some file wrangling today, and it can take upwards of a
> minute for Finder to even notice that files have been moved/renamed if
> it was done on the command line without Finder's involvement. It's
> incredibly poor.
>
> I've not noticed Finder get the wrong file size stuck on things yet, but
> I may just not have been looking - I mostly use columns view.

Up to a minute is poor, but is understandable. I've found the Finder get the
size completely wrong and have it stuck there. It seems to be caused by
backup files created by Carbon Copy Cloner. Mike Bombich (Carbon Copy Cloner)
wrote to say:

> That's normal, and very annoying. Finder doesn't have an indication that it's
> working on refreshing that value, so it will gladly present stale and
> incorrect data for a while, and then eventually show the correct value
> unceremoniously. Eventually Finder will
> show the correct value.
I don't know how long his 'eventually' is, but it isn't doing it at all for
me.

Like Jaimie, I mostly use columns view, but when I need to know how big my
backups are, it would be nice if I could do so from the Finder and not have
to check the true value using du.

MST

Re: How big is a folder?

<6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21037&group=uk.comp.sys.mac#21037

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!nntp.comgw.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: 07.013@scorecrow.com (Bruce Horrocks)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Thu, 29 Feb 2024 14:31:03 +0000
Lines: 49
Message-ID: <6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org>
<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>
<0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org>
<3we*Up8Dz@news.chiark.greenend.org.uk>
<0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org>
<l4b34cF9t3dU1@mid.individual.net>
<0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net nj7I6LYdVwCXbDhly19T/A1kpVDHD41k5NMHNf+kKFXvh4nkuX
Cancel-Lock: sha1:2qTn17nmFUFVQyVrMxLJRYnwOoc= sha256:5Gtiww2lPJ1IJt312oOjEzZzc3dpVQDlV6yFEpOzMwA=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org>
 by: Bruce Horrocks - Thu, 29 Feb 2024 14:31 UTC

On 29/02/2024 10:58, Martin S Taylor wrote:
> On 29 Feb 2024, Jaimie Vandenbergh wrote
> (in article <l4b34cF9t3dU1@mid.individual.net>):
>
>>> Yes, I know this, but the discrepancy is too big for this to be the cause. I
>>> have perfectly ordinary video files which run properly for half an hour, yet
>>> the finder says they take up 20KB.
>>>
>>> (du gives a more realistic figure.)
>>>
>>> MST
>>
>> I've been doing some file wrangling today, and it can take upwards of a
>> minute for Finder to even notice that files have been moved/renamed if
>> it was done on the command line without Finder's involvement. It's
>> incredibly poor.
>>
>> I've not noticed Finder get the wrong file size stuck on things yet, but
>> I may just not have been looking - I mostly use columns view.
>
> Up to a minute is poor, but is understandable. I've found the Finder get the
> size completely wrong and have it stuck there. It seems to be caused by
> backup files created by Carbon Copy Cloner. Mike Bombich (Carbon Copy Cloner)
> wrote to say:
>
>> That's normal, and very annoying. Finder doesn't have an indication that it's
>> working on refreshing that value, so it will gladly present stale and
>> incorrect data for a while, and then eventually show the correct value
>> unceremoniously. Eventually Finder will
>> show the correct value.
> I don't know how long his 'eventually' is, but it isn't doing it at all for
> me.
>
> Like Jaimie, I mostly use columns view, but when I need to know how big my
> backups are, it would be nice if I could do so from the Finder and not have
> to check the true value using du.

Would a Finder "Quick Action" be a workable alternative?

So the process would be: select a folder in Finder, right-click, choose
Quick Actions then choose "run du" or similar to get a popup showing the
size of the folder according to du.

If so then that's fairly easy to script and ping over, or share here.

--
Bruce Horrocks
Surrey, England

Re: How big is a folder?

<0001HW.2B90DEAD000855E130B6FA38F@news.eternal-september.org>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21042&group=uk.comp.sys.mac#21042

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: correspondence@mRaErMtOiVnEsTtHaIySlor.com (Martin S Taylor)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Thu, 29 Feb 2024 15:47:57 +0000
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <0001HW.2B90DEAD000855E130B6FA38F@news.eternal-september.org>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk> <0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org> <l4b34cF9t3dU1@mid.individual.net> <0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org> <6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com>
Reply-To: correspondence@mRaErMtOiVnEsTtHaIySlor.com
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="d62e37ac0d9ddf6349ea52c640614f26";
logging-data="728507"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EHF1Q6JpD2b3EGRhb1ijSCgvOj9HkTNE="
User-Agent: Hogwasher/5.24
Cancel-Lock: sha1:MaoquB4LP5FsI4zwMa28PZIqaoI=
X-Face: |DM;jr,c64.*AL%fk,trjr%G%Rk"k^n7!U)u+3muHSnI]TL#_QlfWB.Llwu-&?
OPs<vKf|bUu,MX%HK4dh\!=?3F0%.a-\bgj9CquM24/9YmW&4EX%e;!4\Ls*
vcbN>T3[oMA%R/e,-pg'{s,7Qf9GT0bbf>czov>^4f~jPgN
Mail-Copies-To: nobody
 by: Martin S Taylor - Thu, 29 Feb 2024 15:47 UTC

On 29 Feb 2024, Bruce Horrocks wrote
(in article<6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com>):

> > Like Jaimie, I mostly use columns view, but when I need to know how big my
> > backups are, it would be nice if I could do so from the Finder and not have
> > to check the true value using du.
>
> Would a Finder "Quick Action" be a workable alternative?
>
> So the process would be: select a folder in Finder, right-click, choose
> Quick Actions then choose "run du" or similar to get a popup showing the
> size of the folder according to du.
>
> If so then that's fairly easy to script and ping over, or share here.

That would be helpful - yes, please!

(Is it possible to build in the sudo option? Sometimes the contents of the
folders need authorisation.)

MST

Re: How big is a folder?

<5e2977a8-1d72-4bbf-9b1f-6a485563ce23@scorecrow.com>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21046&group=uk.comp.sys.mac#21046

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: 07.013@scorecrow.com (Bruce Horrocks)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Thu, 29 Feb 2024 23:15:22 +0000
Lines: 44
Message-ID: <5e2977a8-1d72-4bbf-9b1f-6a485563ce23@scorecrow.com>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org>
<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>
<0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org>
<3we*Up8Dz@news.chiark.greenend.org.uk>
<0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org>
<l4b34cF9t3dU1@mid.individual.net>
<0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org>
<6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com>
<0001HW.2B90DEAD000855E130B6FA38F@news.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net LBRwx2jk08Am33BGhXa7CgmpH6Ifs9Cwhb4SsbRRnLISYAE24d
Cancel-Lock: sha1:OvkEk2PyFFRMzST3EgU+maeIGGM= sha256:Iy14Q3qCGCAs/e+eMhLKKE70rgf6L5/L+uS48S+Sna0=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <0001HW.2B90DEAD000855E130B6FA38F@news.eternal-september.org>
 by: Bruce Horrocks - Thu, 29 Feb 2024 23:15 UTC

On 29/02/2024 15:47, Martin S Taylor wrote:
> On 29 Feb 2024, Bruce Horrocks wrote
> (in article<6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com>):
>
>>> Like Jaimie, I mostly use columns view, but when I need to know how big my
>>> backups are, it would be nice if I could do so from the Finder and not have
>>> to check the true value using du.
>>
>> Would a Finder "Quick Action" be a workable alternative?
>>
>> So the process would be: select a folder in Finder, right-click, choose
>> Quick Actions then choose "run du" or similar to get a popup showing the
>> size of the folder according to du.
>>
>> If so then that's fairly easy to script and ping over, or share here.
>
> That would be helpful - yes, please!
>
> (Is it possible to build in the sudo option? Sometimes the contents of the
> folders need authorisation.)

I've put a file called "du.workflow" here
<https://www.icloud.com/iclouddrive/020rAiYp0Co1uquidX0E5zASw#du>

Download it, open it with Automator (don't double-click as that runs
Automator Installer) to first check that it is safe.

Then, when you are happy, double-click it to install. Automator
Installer "knows" it is a quick action and installs it into the relevant
directory (/Users/youruser/Library/Services).

That's it. Now select a file in the Finder, right-click, choose Quick
Actions and then du and it pops up a dialog giving the output of "du
-sh" run on the selected folder.

The first time you run it it will ask for access permissions - either to
desktop or removable media or wherever the folder you select is.
Sometimes the popup dialog can be hidden so best to minimise as many
windows as possible so you don't hide it.

--
Bruce Horrocks
Surrey, England

Re: How big is a folder?

<0001HW.2B91CA37002B6D2E30A80238F@news.eternal-september.org>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21048&group=uk.comp.sys.mac#21048

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: correspondence@mRaErMtOiVnEsTtHaIySlor.com (Martin S Taylor)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Fri, 01 Mar 2024 08:32:55 +0000
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <0001HW.2B91CA37002B6D2E30A80238F@news.eternal-september.org>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk> <0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org> <l4b34cF9t3dU1@mid.individual.net> <0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org> <6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com> <0001HW.2B90DEAD000855E130B6FA38F@news.eternal-september.org> <5e2977a8-1d72-4bbf-9b1f-6a485563ce23@scorecrow.com>
Reply-To: correspondence@mRaErMtOiVnEsTtHaIySlor.com
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="740b5370d83987e21371329792766e61";
logging-data="1215473"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+rCCAzSYvLU4AhejvDhYPlicIb+gQUZps="
User-Agent: Hogwasher/5.24
Cancel-Lock: sha1:ZYR0Q8mLG1GV0IXD0bVgaS323Z8=
Mail-Copies-To: nobody
X-Face: |DM;jr,c64.*AL%fk,trjr%G%Rk"k^n7!U)u+3muHSnI]TL#_QlfWB.Llwu-&?
OPs<vKf|bUu,MX%HK4dh\!=?3F0%.a-\bgj9CquM24/9YmW&4EX%e;!4\Ls*
vcbN>T3[oMA%R/e,-pg'{s,7Qf9GT0bbf>czov>^4f~jPgN
 by: Martin S Taylor - Fri, 1 Mar 2024 08:32 UTC

On 29 Feb 2024, Bruce Horrocks wrote
(in article<5e2977a8-1d72-4bbf-9b1f-6a485563ce23@scorecrow.com>):

> That's it. Now select a file in the Finder, right-click, choose Quick
> Actions and then du and it pops up a dialog giving the output of "du
> -sh" run on the selected folder.
>
> The first time you run it it will ask for access permissions - either to
> desktop or removable media or wherever the folder you select is.
> Sometimes the popup dialog can be hidden so best to minimise as many
> windows as possible so you don't hide it.

Terrific! Seems to do just what I need. Thank you!

MST

Re: How big is a folder?

<0001HW.2B91DC0F00026C3A30EA3A38F@news.eternal-september.org>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21049&group=uk.comp.sys.mac#21049

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: correspondence@mRaErMtOiVnEsTtHaIySlor.com (Martin S Taylor)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Fri, 01 Mar 2024 09:49:03 +0000
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <0001HW.2B91DC0F00026C3A30EA3A38F@news.eternal-september.org>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org> <3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com> <0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org> <3we*Up8Dz@news.chiark.greenend.org.uk> <0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org> <l4b34cF9t3dU1@mid.individual.net> <0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org> <6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com> <0001HW.2B90DEAD000855E130B6FA38F@news.eternal-september.org> <5e2977a8-1d72-4bbf-9b1f-6a485563ce23@scorecrow.com> <0001HW.2B91CA37002B6D2E30A80238F@news.eternal-september.org>
Reply-To: correspondence@mRaErMtOiVnEsTtHaIySlor.com
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="5d4857d08f163920214f668cdffb9696";
logging-data="1242342"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//w0YwmKaWmC89moZ1DbWfZ++U3gBnjHg="
User-Agent: Hogwasher/5.24
Cancel-Lock: sha1:R6iEVfCNrtC3iKtnsXR5S9U+E7k=
Mail-Copies-To: nobody
X-Face: |DM;jr,c64.*AL%fk,trjr%G%Rk"k^n7!U)u+3muHSnI]TL#_QlfWB.Llwu-&?
OPs<vKf|bUu,MX%HK4dh\!=?3F0%.a-\bgj9CquM24/9YmW&4EX%e;!4\Ls*
vcbN>T3[oMA%R/e,-pg'{s,7Qf9GT0bbf>czov>^4f~jPgN
 by: Martin S Taylor - Fri, 1 Mar 2024 09:49 UTC

On 1 Mar 2024, Martin S Taylor wrote
(in article<0001HW.2B91CA37002B6D2E30A80238F@news.eternal-september.org>):

> > That's it. Now select a file in the Finder, right-click, choose Quick
> > Actions and then du and it pops up a dialog giving the output of "du
> > -sh" run on the selected folder.
> >
> > The first time you run it it will ask for access permissions - either to
> > desktop or removable media or wherever the folder you select is.
> > Sometimes the popup dialog can be hidden so best to minimise as many
> > windows as possible so you don't hide it.
>
> Terrific! Seems to do just what I need. Thank you!

Aha! A couple of problems. Firstly, it only works on folders, not files.
Specifically, it won't work on .sparsebundles even though they are a kind of
file-folder hybrid (as you know). And it's .sparsebundles which seem to
confuse the Finder particularly severely.

Secondly, sometimes it produces a string of 'Permission Denied' errors. I can
get round this in the Terminal by running du under sudo, but is it possible
with your little script to do this?

MST

Re: How big is a folder?

<5b5ec00d-c447-4811-84b9-99d26e6f9837@scorecrow.com>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=21051&group=uk.comp.sys.mac#21051

  copy link   Newsgroups: uk.comp.sys.mac
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: 07.013@scorecrow.com (Bruce Horrocks)
Newsgroups: uk.comp.sys.mac
Subject: Re: How big is a folder?
Date: Fri, 1 Mar 2024 14:20:16 +0000
Lines: 50
Message-ID: <5b5ec00d-c447-4811-84b9-99d26e6f9837@scorecrow.com>
References: <0001HW.2B8E306D00077E5F30597638F@news.eternal-september.org>
<3c3e2707-691a-4ed0-b3e0-b6ac8bd72bf3@scorecrow.com>
<0001HW.2B8F22A9002CE26730AB3A38F@news.eternal-september.org>
<3we*Up8Dz@news.chiark.greenend.org.uk>
<0001HW.2B8F55EF0038E6C530B5FE38F@news.eternal-september.org>
<l4b34cF9t3dU1@mid.individual.net>
<0001HW.2B909AEF008512EA306B7A38F@news.eternal-september.org>
<6df8557b-832a-41dd-9a15-868318fc9886@scorecrow.com>
<0001HW.2B90DEAD000855E130B6FA38F@news.eternal-september.org>
<5e2977a8-1d72-4bbf-9b1f-6a485563ce23@scorecrow.com>
<0001HW.2B91CA37002B6D2E30A80238F@news.eternal-september.org>
<0001HW.2B91DC0F00026C3A30EA3A38F@news.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net cbNNl53Q6BHNWFpY+UB3tAXGC0ujHlmIFP/DFm5HBrHK03WW6E
Cancel-Lock: sha1:VCw9uDGBhma5ajvZWhUYVXyqcWU= sha256:l7lCuLBLh8sz6Xs9Wjl68jSe1zuSD+H0MuqD/Eleh1g=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <0001HW.2B91DC0F00026C3A30EA3A38F@news.eternal-september.org>
 by: Bruce Horrocks - Fri, 1 Mar 2024 14:20 UTC

On 01/03/2024 09:49, Martin S Taylor wrote:
> On 1 Mar 2024, Martin S Taylor wrote
> (in article<0001HW.2B91CA37002B6D2E30A80238F@news.eternal-september.org>):
>
>>> That's it. Now select a file in the Finder, right-click, choose Quick
>>> Actions and then du and it pops up a dialog giving the output of "du
>>> -sh" run on the selected folder.
>>>
>>> The first time you run it it will ask for access permissions - either to
>>> desktop or removable media or wherever the folder you select is.
>>> Sometimes the popup dialog can be hidden so best to minimise as many
>>> windows as possible so you don't hide it.
>>
>> Terrific! Seems to do just what I need. Thank you!
>
> Aha! A couple of problems. Firstly, it only works on folders, not files.
> Specifically, it won't work on .sparsebundles even though they are a kind of
> file-folder hybrid (as you know). And it's .sparsebundles which seem to
> confuse the Finder particularly severely.

Open the du.workflow file in Automator. At the top of the main pane at
the right is a setting "Workflow receives current". Change this from
"folders" to "files or folders".

I only have a couple of sparesebundles on my main drive and they seem to
work okay. E.g. an iPad backup is 77M according to Finder and 74M
according to du.

> Secondly, sometimes it produces a string of 'Permission Denied' errors. I can
> get round this in the Terminal by running du under sudo, but is it possible
> with your little script to do this?

Yes, but not recommended as you have to hard code your password.

Again, in Automator, edit the Run Shell Script action.

Change the line
du -sh "$f"
to read
echo "yourpassword" | sudo -S du -sh "$f"

Save and exit from Automator and double click to re-load as a Quick
Action. If it shows up twice, or doesn't replace the previous one then
you'll need to go into ~/Library/Services and manually delete the
previous du.workflow file.

--
Bruce Horrocks
Surrey, England

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor