I need to read and write to a particular o/s file. This o/s file is very large and being pushed by a remote server to our local server.
After the o/s file has been COMPLETELY copied over to our local server, I then need to read and write to this file.
My question is, which unix command can I use to test if this big(200G) file has been completed copied over to our local server?
I should not read or write to this big file while it is being copied to our server. Thank you in advance. (Solars 10).
If you don't have to 'touch' the file until it hasn't been completed, then an approach could be to ask the remote server also to put the MD5 sum of the file *ONLY* after the transfer is completed.
Let's suppose the file is called 'file' and the md5 sum is 'file.md5'
if [ -x file.md5 ]
--> first check if the sum is correct,
--> then perform the other operations