Hi,

I came across something in the `find` documentation while trying GNU 
commands with SI Decimal (--SI) and IEC Binary Prefixes (--human-readable).

The ACTION `-ls` says it reports the size in 1K blocks. From reading the
info page on "Block Size", it looks more like `find -ls` is reporting the
size in 1 byte blocks.  See Command output #1 and #3 verses #6 and #7.

From: man:find 
............................................................................
-ls    True; list current file in ls -dils format on standard output.  
       The block counts are  of 1K  blocks....
............................................................................
Similar text is in info:find. However, when itemizing each field of the
output the text correctly states bytes ("7. The file's size in bytes.").

From: info:/coreutils/Block size
............................................................................
If none of the above environment variables are set, the block size currently 
defaults to 1024 bytes in most contexts, but this number may change in the 
future. For `ls' file sizes, the block size defaults to 1 byte.
............................................................................

Commands:
............................................................................
  #1 find -maxdepth 1 -name out -ls
  58933524   12 -rw-rw-r--   1 user group       10000 May 13 17:19 ./out

  #2 ls -dils out
  58933524 12 -rw-rw-r-- 1 user group 10000 2011-05-13 17:19 out

  #3 ls -l --block-size=1 out
  -rw-rw-r-- 1 user group 10000 2011-05-13 17:19 out

  #4 ls -l out
  -rw-rw-r-- 1 user group 10000 2011-05-13 17:19 out

  #5 wc -c out
  10000 out

  #6 ls -l --block-size=1K out
  -rw-rw-r-- 1 user group 10 2011-05-13 17:19 out

  #7 ls -lk out
  -rw-rw-r-- 1 user group 10 2011-05-13 17:19 out
............................................................................

Thank you.
Peggy Russell

Reply via email to