Re: Folder size and number of files

Liste des GroupesRevenir à ol misc 
Sujet : Re: Folder size and number of files
De : g (at) *nospam* nowhere.invalid (G)
Groupes : comp.os.linux.misc
Date : 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

Date Sujet#  Auteur
25 Sep 24 * Folder size and number of files6db
25 Sep 24 +- Re: Folder size and number of files1G
25 Sep 24 +- Re: Folder size and number of files1Rich
25 Sep 24 `* Re: Folder size and number of files3Lawrence D'Oliveiro
26 Sep 24  +- Re: Folder size and number of files1Mike Scott
26 Sep 24  `- Re: Folder size and number of files1G

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal