Thanks Tarun and Nishi, that was something that I also thought earlier, and may be this is the way I am going to take. Are there any FTP servers that can run a script once a user has disconnected from the FTP server ? I was looking for a solution more like that.
Regards -jasmeet -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kapoor, Nishikant X Sent: Thursday, July 10, 2003 6:22 PM To: [EMAIL PROTECTED]; The Linux-Delhi mailing list Subject: RE: [ilugd] How to know whether the file has been copied fully ? > -----Original Message----- > On Thu, 2003-07-10 at 16:54, Jasmeet S. Virdi wrote: > > Hi, > > I have an vsftpd server running on RH9 system. The > behaviour is to > > copy the files to a new location when the upload has > completed for just > > one particular user. I have a simple cron job with mv > command that runs > > every minute to check for new files and moves them to the > new location. > > The problem that I am facing is that the files have not been ftp'ed > > completely when the cron job runs and hence moves only > partial files. > > Does anyone have any ideas on how to figure out whether the complete > > file has been ftp'ed and then only move it to the new > location. Or is > > there an FTP server that can run a script when the upload > completes ? > > > > Thanks > > -jasmeet > Have the md5sum of the corresponding files uploaded as well > with a .md5 > extension to differentiate and check it before moving to the new > location. > > Tarun Dua Or, simply write the filesize in a tmp file and compare it with the actual every time you come in. If the filesize has NOT changed since the last visit, perform a 'mv' and remove the tmp file otherwise update the tmp file. Regards, Nishi _______________________________________________ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd _______________________________________________ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd
