Controlling Disk Space on Server
Novell Cool Solutions: Tip
By Charles Hucks
Digg This -
Posted: 19 Dec 2002
(Update: Sorry -- we left off the sample perl script when we published this yesterday. Here's the corrected version of this article.)
One of the most difficult tasks for a network administrator in a school district is controlling disk space on the server. It is easy enough to set restrictions on home directories so that one user doesn't fill up the server, but once a user has reached their allotment, it is difficult to track down why (especially when they have lots of files buried in hundreds of folders).
For a while, I have been using ndir to find all files larger than a given size, but this process takes far too long over a WAN link. For this reason, I wrote a simple Perl script that can be run on the server itself. At the beginning of the script, there are three variables:
$dir is the root path to start searching from.
$bigfile is the size of a file in bytes that is to be searched from.
$outfile is the name of the file to save the results to.
To use the script, you just need to place it somewhere on the server and run the following command at the server console:
perl sys:/perl/scripts/chkhome.pl (ex is with script in sys:/perl/scripts)
I hope someone finds this useful or can perhaps use it as a guide for writing similar scripts (searching for exe files, etc).
If you have any questions you may contact Charles at email@example.com
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com