Sujet : Re: Folder size and number of files
De : g (at) *nospam* nowhere.invalid (G)
Groupes : comp.os.linux.miscDate : 26. Sep 2024, 10:56:09
Autres entêtes
Organisation : <Not Here, Not Me>
Message-ID : <llklt9Fn561U1@mid.individual.net>
References : 1 2
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.10.9-100.fc39.x86_64 (x86_64))
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