For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > January 2005 > Determine Blocksize?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Determine Blocksize?
Michael B Allen

2005-01-09, 3:57 am

Is there a portable way to determine the blocksize of a filesystem?
Calling stat(2) on Linux with an ext3 FS returns an st_blksize of 0. Does
that mean the default?

Thanks,
Mike
Heiner Steven

2005-01-28, 8:58 pm

Michael B Allen wrote:
> Is there a portable way to determine the blocksize of a filesystem?
> Calling stat(2) on Linux with an ext3 FS returns an st_blksize of 0. Does
> that mean the default?


Did you try

statfs(2)

?

Heiner
--
___ _
/ __| |_ _____ _____ _ _ Heiner STEVEN <heiner.steven@nexgo.de>
\__ \ _/ -_) V / -_) ' \ Shell Script Programmers: visit
|___/\__\___|\_/\___|_||_| http://www.shelldorado.com/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com