How to understand if a file is complete

Hi there,
files are being transferred via ftp to a folder in my machine which runs solaris 8. I would like to know if is possible to find out from my side if a file is completely transferred or not.

Is there a way to control this?

Thanks!

you can check with "fuser" if the file is beeing handled by a process. if not, the transfer should be complete...

Kindly check the file size at both end. There should be very less different in the size as size increases/decreases as per file system.

If there is any corruption in the file after download, any error should come.

If /var/adm/xferlog shows the successful download, it means correct data was downloaded.

Thanks,
Deepak

The problem is that I can check only in my end.
And I want to write a small script that will execute some commands after the transfer is complete in my machine.

OR change the ftp statement in the download to something like this

.......
get somefile.dat iambeingdownloaded
rename iambegindownloaded somefile.dat

if partially downloaded file show up in the directory. If a file has a reasonable name it is complete.

You can do it by below ways:

Write in your script,

ftp servername
username
password
get filename
bye

And then you can execute your desired commands. Please write if it doesn't solve your purpose.

Thanks,
Deepak

I used finally the lsof because fuser was not working.

Thanks for your help