Unix Programming - Determine Blocksize?

This is Interesting: Free IT 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-08, 8:48 pm

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, 5:54 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






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com