This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: disk space allocation (du, ls et al?)


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]