From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Neidhardt Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: disk-usage Date: Tue, 19 Feb 2019 20:29:03 +0100 Message-ID: <877edvr30g.fsf@ambrevar.xyz> References: <87imxgmacr.fsf@ambrevar.xyz> <83r2c3iwha.fsf@gnu.org> <87a7irrbgc.fsf@ambrevar.xyz> <83ftsjitbd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="265559"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.0; emacs 26.1 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 19 20:30:18 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwB5u-0016ux-0N for ged-emacs-devel@m.gmane.org; Tue, 19 Feb 2019 20:30:18 +0100 Original-Received: from localhost ([127.0.0.1]:53973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwB5s-00043T-V7 for ged-emacs-devel@m.gmane.org; Tue, 19 Feb 2019 14:30:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwB4v-00041d-SC for emacs-devel@gnu.org; Tue, 19 Feb 2019 14:29:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwB4s-0006rN-Ot for emacs-devel@gnu.org; Tue, 19 Feb 2019 14:29:16 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:47527) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwB4l-0006lJ-6W; Tue, 19 Feb 2019 14:29:08 -0500 X-Originating-IP: 90.92.41.33 Original-Received: from bababa (lfbn-1-12225-33.w90-92.abo.wanadoo.fr [90.92.41.33]) (Authenticated sender: mail@ambrevar.xyz) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 52D7A240004; Tue, 19 Feb 2019 19:29:04 +0000 (UTC) In-reply-to: <83ftsjitbd.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.183.193 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233464 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > Still, using directory-files-and-attributes etc. would be more > portable than doing it with 'find' and 'du'. That's what I do, actually. I've provided two "listing" functions (customi= zable): =2D disk-usage--directory-size-with-emacs: use `directory-files-and-attribu= tes' recursively everywhere. This is portable but very slow. =2D disk-usage--directory-size-with-du: This uses `directory-files-and-attr= ibutes' on the root folder to get the size of its direct subfiles, then `du -sb' = on the remaining subfolders. This is much faster. Makes sense? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlxsWP8ACgkQm9z0l6S7 zH+JAwf/eWlHRnNTaFdMR5ZaFgURbtbhNZ1nTGM411rdncxY0IyRaH6yvPJTQmjp qUQiCC+zRB/XmhbPSFimoiQUx5NUSnft5yphVhXncpFLXKccODPTG1sJG2nDDVXx auBU6fmAL9qsVTlR7aabe/fB0wDVh+egXkMJtSJPE8oFNgB2Nw+m8Rmhm6yrnpI4 wnigPfTIax/0rA2JE0LOlRvK2KbCJQHEVNK/1QD57ecHeQVRREHFdV+v/QSVBDoo 1m1FMHf60SJVAiY6bYbOmQ4dUXp4SEVySeKo9AXD6mNap+QAROVOAV04I0LMN++Q UVSNk/IVO9bo1rmwCeNfcUTb7HOYQg== =bOyB -----END PGP SIGNATURE----- --=-=-=--