Bug 153109

Summary: ls has improper documentation
Product: [Fedora] Fedora Reporter: Brian "netdragon" Bober <netdragon>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: ---

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.