Bug 153109 - ls has improper documentation
ls has improper documentation
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-01 12:16 EST by Brian "netdragon" Bober
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-18 08:45:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brian "netdragon" Bober 2005-04-01 12:16:40 EST
Description of problem:

When you type ls -- help, it shows the following:
"  -s, --size                 print size of each file, in blocks"

Instead it should show:
"  -s, --size                 print disk space used by file on file system, in
blocks"

"ls -s" doesn't show the actual size of the file, but the number of blocks taken
up on disk. Therefore, it's expected if a block is 4K and the file is 1K, then
it will return 4K (if you use the -h option). 

The issue is that if you use the --block-size parameter, it shows (disk space
used)/(block size specified), not (file size)/(block size specified), which is
what we'd assume based on the description.

Version-Release number of selected component (if applicable):
5.2.1-31

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:

ls --help shows "print size of each file, in blocks" for -s

Expected results:
ls --help shows "print disk space used by file on file system, in blocks"



Additional info:

Since this is an issue for all distributions, it should be changed upstream.

This bug was reported by someone else on the Debian bug site
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=116358 and the argument given
by the Debian developer was not valid because he said he wouldn't change the
description of --block-size in the help listing, but that description isn't the
problem... The issue is that the description for -s needs to be changed.
Comment 1 Tim Waugh 2005-04-18 08:45:31 EDT
The word "size" here is slightly ambiguous, but the fact that the units are
"blocks" is a big clue about what the quantity being shown really represents. 
FWIW, the info page is absolutely clear.

Not worth patching IMHO.  Take it up with the upstream authors if you wish.

Note You need to log in before you can comment on or make changes to this bug.