I have a perl script that is failing in /subscriptions/917 while trying to download MOD00.P2009232.2015_1.PDS.bz2. It may fail in other subscriptions as well, but fails here first. That file doesn't exist when I login via command line ftp and do an 'ls' or 'dir' or use gftp for instance???
However, if I command line ftp anonymous login and cd subcription/917 and do a "nlist" command, the MOD00.P2009232.2015_1.PDS.bz2 shows up. In my perlscript I create an perl $ftp object to your oceans.gsfc.nasa.gov ftp server and get a list via @tmp = $ftp->ls() (uses NLST) and then loop though and print out list. This list contains MOD00.P2009232.2015_1.PDS.bz2 When I do a test and list via @tmp = $ftp->dir() (uses LIST) and then loop though and print out list, the file is not there. The nlist also shows MOD00.P2009235.0705_1.PDS.bz2 and MOD00.P2009237.0340_1.PDS.bz2 that do not exist for download. From GFTP log:
150 Opening ASCII mode data connection for file list
226 Transfer complete.
550 /subscriptions/917/MOD00.P2009232.2015_1.PDS.bz2: No such file or directory
550 /subscriptions/917/MOD00.P2009235.0705_1.PDS.bz2: No such file or directory
550 /subscriptions/917/MOD00.P2009237.0340_1.PDS.bz2: No such file or directory
Why does the NLST (nlist) or method $ftp->ls() show files that are not available for download but they are __NOT__
seen with a regular LIST (ls or dir) or method $ftp->dir()?
I created 2 files to compare and get this:
[xband@corals bin]$ diff LIST NLST
Is this server bug? I do not want to have to parse the output of $ftp->dir() and wish to continue to use
$ftp->ls(). I suspect it has something to do with a ftp server directive that tells the server not to show 0 length files perhaps with the LIST, but somehow gets missed in the NLST?