[CentOS] How to know when files have finished FTPing?

Mon Nov 12 14:17:45 UTC 2007
Brian Mathis <brian.mathis at gmail.com>

On Nov 11, 2007 2:20 PM, Neil Aggarwal <neil at jammconsulting.com> wrote:
> Hello:
>
> I have a server set up a CentOS 5 server for a client
> to push files onto using FTP.
>
> I have a cron job to process the files and
> move them to another directory.
>
> Sometimes, the cron job executes while the client
> is still uploading a file (Some of them can be large)
> and I get a partial file.
>
> Is there a way to tell when a file has finished
> uploading?
>
> I am using the vsftpd daemon installed using yum.
>
> Thanks,
>         Neil


Wow, all quite involved answers.

You may be able to get the list of files to process using 'find'.  If
you check using "-mmin +X", you might be able to get only files that
haven't been updated in X minutes.  That should filter out anything in
progress.  If a transfer is stopped in the middle, then restarted
later, that wouldn't help here.

It's possible that the FTP daemon might not update this information,
so you'll have to expieriment.  It's worth a shot before you start
telling the client to modify their process.