Hello first question, maybe one of many!

 

Code running on a windows machine connecting to Linux box.

 

I am trying to capture an ls\dir command into a file from an FTP
connection, similar to ls -lA > Ls.txt.

 

I am trying to monitor files in a folder on a remote Red Hat server to
make sure that the files do not get out of sequence.

 

Sample code to date.

 

use Net::FTP;

use warnings;

use diagnostics;

                

my $filename;

                

print "Retrieving file listing from Red hat machine\n";

my $ftp=Net::FTP->new("Red hat machine ", Debug => 0) or die "Cannot
locate Red hat machine: $@ ";

$ftp->login($usernam,$passwd) or die "Cannot login ", $ftp->message;

$ftp->cwd("/some/path") or die "Cannot change working directory ",
$ftp->message;

$ftp->ls;

$ftp->quit;


Information contained in this email message is intended only for use of the 
individual
or entity named above. If the reader of this message is not the intended 
recipient, or
the employee or agent responsible to deliver it to the intended recipient, you 
are hereby
notified that any dissemination, distribution or copying of this communication 
is strictly
prohibited. If you have received this communication in error, please 
immediately notify
the sender by email and destroy the original message.

SKY NETWORK TELEVISION LTD
10 Panorama Rd, Mt Wellington
PO Box 9059, Newmarket, Auckland, NZ

Reply via email to