Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 31.070.419 Times

Filesys::Df 0.92

  Date Added: March 04, 2010  |  Visits: 637


Report Broken Link
Printer Friendly Version

Product Homepage
Download (75 downloads)

Filesys::Df is a Perl extension for filesystem disk space information. SYNOPSIS use Filesys::Df; #### Get information by passing a scalar directory/filename value my $ref = df("/tmp"); # Default output is 1K blocks if(defined($ref)) { print "Total 1k blocks: $ref->{blocks}n"; print "Total 1k blocks free: $ref->{bfree}n"; print "Total 1k blocks avail to me: $ref->{bavail}n"; print "Total 1k blocks used: $ref->{used}n"; print "Percent full: $ref->{per}n"; if(exists($ref->{files})) { print "Total inodes: $ref->{files}n"; print "Total inodes free: $ref->{ffree}n"; print "Inode percent full: $ref->{fper}n"; } } #### Get information by passing a filehandle open(FILE, "some_file"); # Get information for filesystem at "some_file" my $ref = df(*FILE); #### or my $ref = df(*FILE); #### or my $fhref = *FILE; my $ref = df($fhref); #### Get information in other than 1k blocks my $ref = df("/tmp", 8192); # output is 8K blocks my $ref = df("/tmp", 1); # output is bytes This module provides a way to obtain filesystem disk space information. This is a Unix only distribution. If you want to gather this information for Unix and Windows, use Filesys::DfPortable. The only major benefit of using Filesys::Df over Filesys::DfPortable, is that Filesys::Df supports the use of open filehandles as arguments. The module should work with all flavors of Unix that implement the statvfs() and fstatvfs() calls, or the statfs() and fstatfs() calls. This would include Linux, *BSD, HP-UX, AIX, Solaris, Mac OS X, Irix, Cygwin, etc ... df() requires a argument that represents the filesystem you want to query. The argument can be either a scalar directory/file name or a open filehandle. There is also an optional block size argument so you can tailor the size of the values returned. The default block size is 1024. This will cause the function to return the values in 1k blocks. If you want bytes, set the block size to 1. df() returns a reference to a hash. The keys available in the hash are as follows: {blocks} = Total blocks on the filesystem. {bfree} = Total blocks free on the filesystem. {bavail} = Total blocks available to the user executing the Perl application. This can be different than {bfree} if you have per-user quotas on the filesystem, or if the super user has a reserved amount. {bavail} can also be a negative value because of this. For instance if there is more space being used then you have available to you. {used} = Total blocks used on the filesystem. {per} = Percent of disk space used. This is based on the disk space available to the user executing the application. In other words, if the filesystem has 10% of its space reserved for the superuser, then the percent used can go up to 110%. You can obtain inode information through the module as well, but you must call exists() on the {files} key first, to make sure the information is available. Some filesystems may not return inode information, for example some NFS filesystems. Here are the available inode keys: {files} = Total inodes on the filesystem. {ffree} = Total inodes free on the filesystem. {favail} = Total inodes available to the user executing the application. See the rules for the {bavail} key. {fused} = Total inodes used on the filesystem. {fper} = Percent of inodes used on the filesystem. See rules for the {per} key. There are some undocumented keys that are defined to maintain backwards compatibilty: {su_blocks}, {user_blocks}, etc ... If the df() call fails for any reason, it will return undef. This will probably happen if you do anything crazy like try to get information for /proc, or if you pass an invalid filesystem name, or if there is an internal error. df() will croak() if you pass it a undefined value..

Requirements: No special requirements
Platforms: Linux
Keyword: Blocks Df Disk Space Filesysdf Filesystem Get Information Information Libraries Programming Space Total
Users rating: 0/10

License: Freeware Size: 7.17 KB
Libraries  -  Filesys::DiskFree 0.06
Filesys::DiskFree is a Perl module to perform the Unix command df in a portable fashion. SYNOPSIS use Filesys::DiskFree; $handle = new Filesys::DiskFree; $handle->df(); print "The root device is ".$handle->device("/")."n"; print "It has...
5.12 KB  
Libraries  -  The_RTF_Cookbook 1.11
The_RTF_Cookbook is a RTF overview and quick reference. SYNOPSIS # Time-stamp: "2003-09-23 21:27:56 ADT" # This document is in Perl POD format, but you can read it # with just an ASCII text viewer, if you want. RTF is a nearly ubiquitous...
57.34 KB  
Utilities  -  Auslogics Disk Defrag 6.0.0
Disk Defrag will speed up your computer by optimizing file system. It can defragment files, consolidate free space and move system files to the faster part of the disk. With Disk Defrag you'll get the maximum out of your hard drive performance. It...
7.09 MB  
Libraries  -  Filesys::DiskSpace 0.05
Filesys::DiskSpace is a Perl module as a df replacement. SYNOPSIS use Filesys::DiskSpace; ($fs_type, $fs_desc, $used, $avail, $fused, $favail) = df $dir; This routine displays information on a file system such as its type, the amount of...
5.12 KB  
Utilities  -  DriveSpacio 0.1+ beta
DriveSpacio is a disk space explorer that provides information on how the space is used on all drives and also folders. All Drives Info includes partition size and file system type; space free and cluster size; space allocated and number of...
945 KB  
Network & Internet  -  Netscape Address Book Recovery 0.1.0
A tool to take that corrupted Netscape Address Book and get your information out of it. This is a tool to take that corrupted Netscape Address Book and get your information out of it. After the third time my book got corrupted, I gave up trying to...
48.13 KB  
Nature  -  Fantasy Space Screensaver 1.1
For some reason Fantasy and Space are connected tightly in between. Maybe, because we know so little about the Space we cannot get along without completing our knowledge about the Space with our imagination.
2.27 MB  
Utilities  -  RadioWORKS 1.4
RadioWORKS is a tool for calculating various items related to radio waves and radio wave propagation. Get detailed information about a frequency, such as the free-space wavelength, band classification, propagation methods, common transmitter...
20 MB  
Games  -  Zoo Blocks by Purple Buttons 1.1.0
Oh no! The animals have escaped from the Zoo and you need to round them up and get them back to where they belong. Tap on groups of 3 or more animals to send them packing and watch as the rest of them scurry to fill the space. Can you get...
10.6 MB  
Shell & Desktop  -  GlassMonitor 0.1
GlassMonitor is a SuperKaramba monitor that has all the basic information in a small space, like:.
8.19 KB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.13.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB