Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 153109 - ls has improper documentation
Summary: ls has improper documentation
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-04-01 17:16 UTC by Brian "netdragon" Bober
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-04-18 12:45:31 UTC

Attachments (Terms of Use)

Description Brian "netdragon" Bober 2005-04-01 17:16:40 UTC
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

"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):

How reproducible:

Steps to Reproduce:
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 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 12:45:31 UTC
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.