Statvfs(3pm)
π Statvfs(3pm) π
okay bestie, welcome to the Filesys::Statvfs page from the User Contributed Perl Documentation, no cap π«Ά
β¨ NAME β¨
Filesys::Statvfs β a Perl extension for statvfs() and fstatvfs() π
πΈ SYNOPSIS πΈ
like, here's the vibe, fr fr:
use Filesys::Statvfs;
my($bsize, $frsize, $blocks, $bfree, $bavail,
$files, $ffree, $favail, $flag, $namemax) = statvfs("/tmp");
#### Pass an open filehandle. Verify that fileno() returns a defined
#### value. If you pass undef to fstatvfs you will get unexpected results
my $fd = fileno(FILE_HANDLE);
if(defined($fd)) {
($bsize, $frsize, $blocks, $bfree, $bavail,
$files, $ffree, $favail, $flag, $namemax) = fstatvfs($fd);
}
not me passingundeftofstatvfstho π β that gives you unexpected results, so literally check thatfileno()returned a defined value first. the comments said it, i'm just yelling it louder π
π¦ DESCRIPTION π¦
it's the interface for statvfs() and fstatvfs(), periodt β¨
real talk though: unless you actually need the bsize, flag, and namemax values, you should probably be looking at Filesys::DfPortable or Filesys::Df instead π they will generally hand you more functionality and more portability, and that's on that.
the module should work with all flavors of Unix that implement the statvfs() and fstatvfs() calls π§ that includes Linux, *BSD, HP-UX, AIX, Solaris, Mac OS X, Irix, Cygwin, etcβ¦ like, the whole squad, slay π
so the statvfs() and fstatvfs() functions will return a list of values, or they'll return "undef" and set $! if there was an error π (yes bestie, check $!, it's giving responsible)
the values returned are described in the statvfs/fstatvfs header or the "statvfs()/fstatvfs()" man page π β go read those, iykyk.
and the module assumes that if you have statvfs(), then fstatvfs() will also be available. it's a package deal, iconic behavior honestly π
π AUTHOR π
Ian Guthrie β IGuthrie@aol.com π§
Copyright (c) 2006 Ian Guthrie. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π«Ά (yes queen, go forth and redistribute)
π SEE ALSO π
statvfs(2)fstatvfs(2)- Filesys::DfPortable
- Filesys::Df
and that's the whole page bestie, ate and left no crumbs β¨
perl v5.42.3 Β· 2026-08-19 β that's the version and date from the footer, mwah π byeee π¦π
π¦ where this page comes from
- ubuntu stonking: libfilesys-statvfs-perl 0.82-4build6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms