delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/24/21:35:38

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: disk space allocation (du, ls et al?)
Date: Tue, 24 Jan 2006 20:33:46 -0600
Message-ID: <3B223242100469459AABA3B0662ED8340238C466@MN65EV801.global.ds.honeywell.com>
From: "Baksik, Frederick \(NM75\)" <frederick DOT baksik AT honeywell DOT com>
To: <cygwin AT cygwin DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k0P2ZaJ9026578

on Tue, 24 Jan 2006 18:00:57 -0800 Linda Walsh wrote:
>However, the commands like:
>
>   du -s <file>
>-or-
>   ls -s <file>
>
>don't show the file's actual allocation size on disk but
>seem to use a fixed 1k for size. 

the info pages state for these tools:

   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.

This can be gotten from 'info coreutils' and then going to the node
"Block size".
'info info' will help you out on how to use the info tool.  The man
pages do not include
detailed information on these tools.  Each tool probably has its own way
of adjusting the
block size to use (at least du and ls are different).

'du -B 8k' and 'ls -s --block-size=8k' should give the result in block
sizes of 8k.

:-)
Frodak

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019