Groups | Search | Server Info | Login | Register


Groups > comp.os.linux.misc > #58495

Re: Folder size and number of files

From G <g@nowhere.invalid>
Newsgroups comp.os.linux.misc
Subject Re: Folder size and number of files
Date 2024-09-26 08:56 +0000
Organization <Not Here, Not Me>
Message-ID <llklt9Fn561U1@mid.individual.net> (permalink)
References <vd0gpr$3k64u$1@dont-email.me> <vd1vjh$3r2r4$7@dont-email.me>

Show all headers | View raw


Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Wed, 25 Sep 2024 08:14:51 -0000 (UTC), db wrote:
> 
>> Is there a command that gives me the size of a given folder ...
> 
>     du -s «folder»

Use "du -sh" it's more readable.

> 
>> ... and the number of files in it?
> 
> I currently use
> 
>     ls «folder» | wc -l
> 
> ... not sure if there’s a more efficient way ...

Yes, install "ncdu" it does both size and number of files (with option
"--show-itemcount" or "c" when inside), and you can navigate the folder tree.

G

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Find similar


Thread

Folder size and number of files db <dieterhansbritz@gmail.com> - 2024-09-25 08:14 +0000
  Re: Folder size and number of files G <g@nowhere.invalid> - 2024-09-25 09:26 +0000
  Re: Folder size and number of files Rich <rich@example.invalid> - 2024-09-25 13:47 +0000
  Re: Folder size and number of files Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-25 21:33 +0000
    Re: Folder size and number of files Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2024-09-26 09:14 +0100
    Re: Folder size and number of files G <g@nowhere.invalid> - 2024-09-26 08:56 +0000

csiph-web