Filesys::DiskSpace(3pm) User Contributed Perl Documentation Filesys::DiskSpace(3pm)NAME
Filesys::DiskSpace - Perl df
SYNOPSIS
use Filesys::DiskSpace;
($fs_type, $fs_desc, $used, $avail, $fused, $favail) = df $dir;
DESCRIPTION
This routine displays information on a file system such as its type, the amount of disk space occupied, the total disk space and the number
of inodes. It tries "syscall(SYS_statfs)" and "syscall(SYS_statvfs)" in several ways. If all fails, it "croak"s.
OPTIONS
$fs_type
[number] type of the filesystem.
$fs_desc
[string] description of this fs.
$used
[number] size used (in Kb).
$avail
[number] size available (in Kb).
$ffree
[number] free inodes.
$fused
[number] inodes used.
Installation
See the INSTALL file.
COPYRIGHT
Copyright (c) 1996-1999 Fabien Tassin. All rights reserved. This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
AUTHOR
Fabien Tassin <fta+cpan@sofaraway.org>
NOTES
This module was formerly called File::Df. It has been renamed into Filesys::DiskSpace. It could have be Filesys::Df but unfortunatly
another module created in the meantime uses this name.
Tested with Perl 5.003 under these systems :
- Solaris 2.[4/5]
- SunOS 4.1.[2/3/4]
- HP-UX 9.05, 10.[1/20] (see below)
- OSF1 3.2, 4.0
- Linux 2.0.*, 2.2.*
Note for HP-UX users :
if you obtain this message :
"Undefined subroutine &main::SYS_statfs called at Filesys/DiskSpace.pm
line XXX" and if you are using a hp9000s700, then edit the syscall.ph file
(in the Perl lib tree) and copy the line containing "SYS_statfs {196;}"
outside the "if (defined &__hp9000s800)" block (around line 356).
perl v5.14.2 2012-04-12 Filesys::DiskSpace(3pm)
Check Out this Related Man Page
Statvfs(3pm) User Contributed Perl Documentation Statvfs(3pm)NAME
Filesys::Statvfs - Perl extension for statvfs() and fstatvfs()
SYNOPSIS
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);
}
DESCRIPTION
Interface for statvfs() and fstatvfs()
Unless you need access to the bsize, flag, and namemax values, you should probably look at using Filesys::DfPortable or Filesys::Df
instead. They will generally provide you with more functionality and portability.
The module should work with all flavors of Unix that implement the "statvfs()" and "fstatvfs()" calls. This would include Linux, *BSD, HP-
UX, AIX, Solaris, Mac OS X, Irix, Cygwin, etc ...
The "statvfs()" and "fstatvfs()" functions will return a list of values, or will return "undef" and set $! if there was an error.
The values returned are described in the statvfs/fstatvfs header or the "statvfs()/fstatvfs()" man page.
The module assumes that if you have "statvfs()", "fstatvfs()" will also be available.
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.
SEE ALSO statvfs(2), fstatvfs(2), Filesys::DfPortable, Filesys::Df
perl v5.14.2 2006-06-25 Statvfs(3pm)