Tony Frasketi wrote:
> Thanks for all the suggestions folks!
> 
> I had been trying to find the size of my entire web site by using the
> 'du -sb <my-home-directory>' command in a Perl script to be executed
> from the Web. 
> 
> But I kept coming up with a diffence of 2,177,024 bytes between the
> output of the 'du' command when executed from the Perl script from the
> Web and when executed directly from the Unix command line.
> 
>    Output from 'su -sb' command from Perl script on Web:   
>    83,250,176 bytes Output from 'su -sb' command from Unix Cmd Line: 
> 85,427,200 Bytes 
> 
> 2,177,024 bytes short from the Perl script.
> 
> I finally found the culprit that was causing the difference! I tracked
> this exact byte difference to a particular directory buried in the
> depths of my cgbin directory (it was an old directory that I no
> longer use). 
> 
> The size of this directory was 2,177,024 bytes from the output of the
> 'du' command when issued from the Unix command line BUT ... was ZERO
> bytes from the output of the 'du' command when issued from the Perl
> script on the Web! 
> 
> After I deleted this directory, the sizes of my entire website matched
> when measured from the Web or from the Unix shell!!!

The directory was probably not readable by the web server user. If you check
your web server error logs, you'll probably see a "Permission denied"
message coming from du.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to