Differences in the file size reported by Net::FTP->size and ls -l 
Author Message
 Differences in the file size reported by Net::FTP->size and ls -l

I have written a script that will ftp patches for me to my local machine.
One of the tasks that I am having the script is compair the size of the
remote file with the size of the local file and , if they are different,
download the file again (assuming they modified the patch in question).

Well it looks like that the file size returned by Net::FTP is somewhat
different than that returned by an ls -l of the directory in question.

Does anyone know why?  If you want sample code I can post it but this is
pretty easy to duplicate so I don't think this is necessary.

Oh, according to the perldoc Net::FTP page I am using the 21/Dec/97 version.
I am using:

[rs6k-dev] /home/h630652>perl -V
Summary of my perl5 (5.0 patchlevel 4 subversion 0) configuration:
    osname=aix, osvers=, archname=aix
    uname='aix rs6k-dev 1 4 002056265900 '
    hint=previous, useposix=true, d_sigaction=define
    bincompat3=n useperlio= d_sfio=
    cc='cc', optimize='-O', gccversion=
    cppflags='-qmaxmem=8192 -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE'
    ccflags ='-qmaxmem=8192 -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    voidflags=15, castflags=1, d_casti32=define, d_castneg=
    intsize=4, alignbytes=8, usemymalloc=n, randbits=15
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-ldbm -lld -lm -lc -lbsd -lPW
    libc=/lib/libc.a, so=a
    useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_aix.xs, dlext=so, d_dlsymun=, ccdlflags='-bE:perl.exp'
    cccdlflags=' ', lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/per'

Characteristics of this binary (from libperl):
  Built under aix
  Compiled at Aug 19 1997 12:32:32



Tue, 26 Dec 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Can't get size value back when using $ftp->size

2. CGI.pm Bug: file upload file size mismatch when file size is close to buffer size

3. Net::FTP ftp->ls() stopped working

4. file size limits of perl Net::ftp

5. Net::FTP File Size Limit?

6. Monitoring file size during net::ftp

7. Net::FTP->ls('*.rcp');

8. Net::FTP->ls(".doh");

9. net::ftp->ls() sloooowwwww

10. Net::FTP->ls('*.rcp');

11. Reporting folder sizes to a file

12. stat() reporting incorrect file size


Powered by phpBB® Forum Software