Here's a thought: what about doing an lsof?  If a file is still being written 
by ftpd it should be open for writing.

Geoff

Sent from my BlackBerry wireless handheld.

-----Original Message-----
From: [EMAIL PROTECTED]

Date: Mon, 12 Nov 2007 16:07:23 
Subject: re: [centos] how to know when files have finished ftping? -- antair 
restored


On Nov 11, 2007 2:20 PM, Neil Aggarwal <[EMAIL PROTECTED]> 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.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Sent from my BlackBerry wireless handheld.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to