bug-coreutils
[Top][All Lists]
Advanced

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

bug#19969: problem: wc -c doesn't read actual # of bytes in file


From: Bernhard Voelker
Subject: bug#19969: problem: wc -c doesn't read actual # of bytes in file
Date: Sun, 01 Mar 2015 10:41:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/28/2015 09:59 AM, Linda Walsh wrote:
> (coreutils-8.21-7.7.7)
> 
> wc -c(bytes) doesn't seem to reliably read the number
> of bytes in a file.
> 
> I was wanting to find out what the largest data-source
> files in '/proc' and '/sys' (didn't get around to trying
> /sys, since all the files under /proc/sys return 0 bytes.
> 
> Note -- "wc -l" doesn't return '0' on the /proc/sys files.
> 
> As root:
> # cd /proc
> # find -H [^0-9]* -name self -prune -o -name thread-self -prune -o -type 
> f ! -name kmsg ! -name kcore ! -name kpagecount ! -name kpageflags 
> -print0|wc -c --files0-from=- |sort -n

Thanks for the report.
However, I'm not 100% sure what the problem is - as you didn't narrow
the case down to a certain file, nor did you show us the output and
what you expected.

A quick shot is
  http://bugs.gnu.org/18621
and the corresponding commit (after the latest v8.23 release)
  http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=2662702b

Does this - i.e., a wc(1) built from git - solve your problem?

Thanks & have a nice day,
Berny





reply via email to

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