[NTLUG:Discuss] How to know when files have finished FTPing?

Thomas Cameron (Red Hat) tcameron at redhat.com
Thu Nov 15 01:09:00 CST 2007


Sure, that can work.  In the environment I set this up for, the chances
of identical filenames were very, very slim.  If you have an environment
where the chances are good, lsof might make more sense.

I just peeked at my xferlog, though, and the file names are unique, as in:

Thu Nov 15 07:07:13 2007 1 172.31.100.4 3405
/home/thomas.cameron/myfile.txt b _ o r thomas.cameron ftp 0 * c

If your customers are uploading the same file over and over, though, it
might be harder to track.

Neil Aggarwal wrote:
> Thomas:
> 
> Thanks for the suggestion, but I think lsof is better.
> 
> If the client transfers a file with the same
> name, it will be harder to track that since I will
> have to keep track of the timestamps in the xferlog.
> 
> Doing an lsof and checking for output seems simplest
> to me.
> 
> Don't take this as a criticism, just an open discussion
> about the merits of one approach vs. another.
> 
> Thanks,
> 	Neil
> 
> --
> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
> Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details. 
> 
>> Transfers don't get logged to /var/log/xferlog until they are 
>> completed.
>>  I used this info to create a script which does exactly what you
>> describe.  Once the file appears in /var/log/xferlog, it is 
>> ready to be
>> moved.
>>
>> Hope this helps.


-- 
Thomas Cameron, RHCE, RHCI, CNE, MCSE, MCT
Solutions Architect Team Lead, Central Region, Red Hat
512-241-0774 office 512-585-5631 cell 512-857-1345 fax



More information about the Discuss mailing list