coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coreutils] Re: Bug#353100: -B


From: Jim Meyering
Subject: [coreutils] Re: Bug#353100: -B
Date: Mon, 28 Jun 2010 13:51:33 +0200

Samuel Thibault wrote:
> Samuel Thibault, le Wed 15 Mar 2006 19:00:25 +0100, a écrit :
>> Thomas Hood, le Wed 15 Mar 2006 18:38:28 +0100, a écrit :
>> > > Actually, it lets change the size of blocks for
>> > > display count only. This should be better documented, something like:
>> > > -B, --block-size=SIZE display size in number of SIZE-byte blocks
>> >
>> > Yes, the description of -B on the man page could be a wee bit clearer.
>> >
>> > In contrast with the manpage, the info seems clear enough:
>> >
>> > -B SIZE'
>> > `--block-size=SIZE'
>> >      Scale sizes by SIZE before printing them (*note Block size::).
>> >      For example, `-BG' prints sizes in units of 1,073,741,824 bytes.
>>
>> Indeed.
>
> I forgot to add: and thus info's wording should be copy/pasted to the
> manpage.

Thanks.  This should help:

>From 78efadd3e19f5f9dac70340785afaaf8e478aec6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 28 Jun 2010 13:48:38 +0200
Subject: [PATCH] doc: df, du, ls: improve --blocksize description in --help

* src/du.c (usage): Print better --blocksize description.
Prompted by Samuel Thibault in <http://bugs.debian.org/353100>.
* src/df.c (usage): Likewise.
* src/ls.c (usage): Likewise.
---
 src/df.c |    4 +++-
 src/du.c |    4 +++-
 src/ls.c |    4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/df.c b/src/df.c
index f47b3fc..76622fb 100644
--- a/src/df.c
+++ b/src/df.c
@@ -819,7 +819,9 @@ Mandatory arguments to long options are mandatory for short 
options too.\n\
 "), stdout);
       fputs (_("\
   -a, --all             include dummy file systems\n\
-  -B, --block-size=SIZE  use SIZE-byte blocks\n\
+  -B, --block-size=SIZE  scale sizes by SIZE before printing them.  E.g.,\n\
+                           `-BM' prints sizes in units of 1,048,576 bytes.\n\
+                           See SIZE format below.\n\
       --total           produce a grand total\n\
   -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 
2G)\n\
   -H, --si              likewise, but use powers of 1000 not 1024\n\
diff --git a/src/du.c b/src/du.c
index 2704f0f..a90568e 100644
--- a/src/du.c
+++ b/src/du.c
@@ -281,7 +281,9 @@ Mandatory arguments to long options are mandatory for short 
options too.\n\
                           fragmentation, indirect blocks, and the like\n\
 "), stdout);
       fputs (_("\
-  -B, --block-size=SIZE  use SIZE-byte blocks\n\
+  -B, --block-size=SIZE  scale sizes by SIZE before printing them.  E.g.,\n\
+                           `-BM' prints sizes in units of 1,048,576 bytes.\n\
+                           See SIZE format below.\n\
   -b, --bytes           equivalent to `--apparent-size --block-size=1'\n\
   -c, --total           produce a grand total\n\
   -D, --dereference-args  dereference only symlinks that are listed on the\n\
diff --git a/src/ls.c b/src/ls.c
index 668507e..ff0ad21 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4592,7 +4592,9 @@ Mandatory arguments to long options are mandatory for 
short options too.\n\
   -b, --escape               print C-style escapes for nongraphic characters\n\
 "), stdout);
       fputs (_("\
-      --block-size=SIZE      use SIZE-byte blocks.  See SIZE format below\n\
+      --block-size=SIZE      scale sizes by SIZE before printing them.  
E.g.,\n\
+                               `--block-size=M' prints sizes in units of\n\
+                               1,048,576 bytes.  See SIZE format below.\n\
   -B, --ignore-backups       do not list implied entries ending with ~\n\
   -c                         with -lt: sort by, and show, ctime (time of 
last\n\
                                modification of file status information)\n\
--
1.7.2.rc0.206.g3336



reply via email to

[Prev in Thread] Current Thread [Next in Thread]