From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.bugs Subject: bug#44273: "total used in directory 19 available 5.2 GiB" Date: Sun, 1 Nov 2020 22:16:02 +0300 Message-ID: References: <875z6sgqvh.fsf@mail.linkov.net> <83eelgb00t.fsf@gnu.org> <87a6w4lzh5.fsf@gnus.org> <837dr8aqog.fsf@gnu.org> <87sg9wkkk6.fsf@gnus.org> <87a6w2qlqc.fsf@mail.linkov.net> <878sblgvdn.fsf@gnus.org> <329AE9D0-14BB-477E-AA7F-FC5852F67A7E@acm.org> <83tuu9f6ha.fsf@gnu.org> <8DED7A50-7DF4-40EB-8515-6AD24A64AF8E@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37484"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ (1036f0e) (2020-10-18) Cc: rms@gnu.org, juri@linkov.net, stefankangas@gmail.com, jidanni@jidanni.org, larsi@gnus.org, 44273@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 01 20:17:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZIqk-0009bT-If for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 20:17:10 +0100 Original-Received: from localhost ([::1]:50680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZIqj-0006wg-Cz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 14:17:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZIqc-0006wK-Dy for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 14:17:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZIqc-0000s4-54 for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 14:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZIqc-0001JV-1k for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 14:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44273 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix patch Original-Received: via spool by 44273-submit@debbugs.gnu.org id=B44273.16042581714983 (code B ref 44273); Sun, 01 Nov 2020 19:17:02 +0000 Original-Received: (at 44273) by debbugs.gnu.org; 1 Nov 2020 19:16:11 +0000 Original-Received: from localhost ([127.0.0.1]:38544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZIpn-0001IJ-Ct for submit@debbugs.gnu.org; Sun, 01 Nov 2020 14:16:11 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:36301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZIpj-0001I8-KK for 44273@debbugs.gnu.org; Sun, 01 Nov 2020 14:16:09 -0500 Original-Received: from localhost ([::ffff:197.157.0.60]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002A0B3E.000000005F9F0975.000015E2; Sun, 01 Nov 2020 19:16:05 +0000 Content-Disposition: inline In-Reply-To: <8DED7A50-7DF4-40EB-8515-6AD24A64AF8E@acm.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192441 Archived-At: * Mattias EngdegÄrd [2020-11-01 18:42]: > 1 nov. 2020 kl. 16.21 skrev Eli Zaretskii : > > > This actually means that this value provides information that is not > > directly available in the file sizes. So it is useful. > > No and no: the information is available in the file sizes, but the > 'file size' of a subdirectory is practically impossible to interpret > in a useful way. You may read the manual page for `ls' as `ls' output is displayed by dired. What may not be usable to you at first sight, may be usable for others. I have not been watching this detail you pointed out, but it was always usable to see the free space on various partitions or remote directories. The manual page for GNU ls says: -k, --kibibytes default to 1024-byte blocks for disk usage so if you write: ls -la or ls -lka You get same output as size of directory is shown in kibibytes. Example: ls -l total 4 lrwxrwxrwx 1 admin admin 37 Sep 22 23:41 Mobil -> /home/data1/protected/Downloads/Mobil drwx------ 3 admin admin 4096 Aug 12 08:26 Old IceCat Data lrwxrwxrwx 1 admin admin 21 Sep 30 02:06 protected -> /home/data1/protected But if I see something like this: ls -la |head total 1379484 then I know by watching the number it is about 1379 megabytes. I am wrong because conversion tells me it is 1412 megabytes and 1347 mebibytes. But I have got a feeling of how much space files in the directory occupy. To make it more human friendly there is option -h that you may set in variable `dired-listing-switches' and just add `h' somewhere with `-al' together then you get something like: ls -lha |head total 1.4G You can set it by tweaking option `dired-listing-switches': --block-size=SIZE scale sizes by SIZE before printing them; e.g., '--block-size=M' prints sizes in units of 1,048,576 bytes; see SIZE format below The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000). Dired will show you whatever you set for `ls' Be happy to be on GNU based system, as ls will give you good usage help with: $ ls --help while on BSD-like free software system like Dragonfly BSD you get this (as there is no help option) ls --help ls: illegal option -- - usage: ls [-1ABCFGHILPRSTW_abcdfghiklmnopqrstuwxy] [-D format] [file ...] So it is not a bug, it is feature and some people may like to read it in blocks of 1024 bytes and some may like in kilobytes or similar.