The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-15-2008
Peejay's Avatar
Peejay Peejay is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 10
Polling an FTP site for a file

Hi,

I'm after a bit of advice for the best way to collect files from an ftp server via a unix process. The main issue here is the frequency, the job needs to check for files every minute or so between 8am and 8pm and pull them down to the box if there is anything there.

Originally the transfer was going to be done via a VPN tunnel direct to a directory on my machine which my batch job would poll, but life is never simple. Unfortunately, that has now fallen through and the files are now being placed on an ftp site instead and I have to pull the files from there as security will not allow a push from there when a file is deposited on it, which also would have made life easier.

My question is, is there a way of opening a connection to the ftp site and keeping it open to poll for a file for that long, or am I just going to have to open and close connections repeatedly throughout the day?

Is there a better way?

Cheers
Paul.