Thanks Bruce...Your solution was good. But unfortunately it doesn't seem to work on RH Linux 7.2 and RHAS3.0 which is what I need.
Went though its documentation.....Seemed like the blksize field of the stat structure is not very portable...which is what the Linux failures proves...
-Arijit
Bruce Hudson <[EMAIL PROTECTED]> wrote:
Bruce Hudson <[EMAIL PROTECTED]> wrote:
> Given a UNIX flavor/machine, say a Linux box, I need to figure out the
> size of the file system block of the current file system I am working in.
> Generally, it is multiple of 512 but less than the page frame size...but
> how can I get the exact value of my current file system?
Simply find a file in the appropriate file system (the mount point will
work or "." if naught else) and call "stat" on it. Element 11 of the array
returned is the block size of the file system.
$size = (stat ".")[11];
--
Bruce A. Hudson | [EMAIL PROTECTED]
UCIS, Networks and Systems |
Dalhousie University |
Halifax, Nova Scotia, Canada | (902) 494-3405
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs