- Site Size
  Site Size - Perl Utility  
     
 

One Saturday night, I found myself needing to find out exactly how much space I was using on one of my web sites.

The standard FTP utility lists the space used for each individual directory when you do a list, but it doesn't total the results or recurse directories.

Obviously the way to solve this problem was to write a script to do the job for me. I already had the Net:FTP module installed to run my web cam, so it should be an easy job to create a script to do the job.

After a couple of hours hacking the script was at a point where it could resurse a web site. A few more hours hacking the program could accept user parameters or read from a rc file.

Sitesize can be used in two ways.
1) You can pass the host name, user name, password, and start directory on the command line eg. : ./sitesize ftp.myhost.com myname mypassword pub/.
The directory name is optional, and if not supplied then Sitesize will use the current directory "." by default.
2) You can use an rc file in your home directory called .sitesizerc. This uses site host username password directory stored on one line seperated by a single space.
To use the rc file call sitesize using the -s switch, eg. : ./sitesize.pl -s mysite pub/
The directory name is optional and if used will override the directory name in the rc file.

WARNING

FTP sites require a plain text login name and password ! This means that the information stored in the rc file is not encrypted. We recommend that you chmod 600 .sitesizerc after creation.

 
     
  Plaudits  
 

Dudley Brooke - your my hero !

 
     
  Initial Public Release: sitesize_0.1.0.tar Date 11th July 2000  
     
  (c) Darryl Catchpole