On 01Dec2006 18:26, Loyal Barber <[EMAIL PROTECTED]> wrote:
| What I was doing is using known behavior in Linux (or Unix for that matter)
| to get the system to tell me the block size.  First, I create a file of one 
| byte (OK, two bytes including the line feed) knowing that the behavior
| will be for the file to take up an entire block, even though it is only
| two bytes.

Right. (Though I imagine there will be special purpose filesystems where they
don't waste a whole block. But then asking about a "block size" on such a
filesystem may not be so meaningful.)

[...]
| Appears that ls does the equivalent of ceil(size_in_bytes/1024).

Yes.

BTW, the stat(2) system call contains an st_blocks field, and an
st_blksize field that _may_ match the filesystem block size (it
needn't).
-- 
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/

I put instant coffee in a microwave oven and almost went back in time.
        - Stephen Wright


To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be 
removed. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/LINUX_Newbies/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/LINUX_Newbies/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to