dcsearle
asked on
Linux File Size - File Generation
Hi,
I am not very familiar with Linux but i have been asked to research a problem we have been having at our company.
We have an application which picks up temporary files (generated by another application). The problem is that the coding in the application which picks up the files is based around the Windows file system - which only gives files sizes once they have been fully generated, otherwised the file size is set to 0 bytes - and is set so that it picks up the file if the size is anything other than 0 bytes.
The problem is that the application which picks up the files, from Linux, is picking them up before they have completely generated - this is because when files are generated on Linux the file size is incremented continually until the full size is reached.
We dont want to have to change any of the applications so is there any way of locking the files until they have fully generated? Or maybe there is a way in Linux to keep the file size at 0 bytes until it has been fully generated?
(we can increase the polling on the application but this doesnt actually solve the problem and there still exists a chance that it may poll as a file is being created).
Your help would be greatly appreciated,
Kind Regards,
David
I am not very familiar with Linux but i have been asked to research a problem we have been having at our company.
We have an application which picks up temporary files (generated by another application). The problem is that the coding in the application which picks up the files is based around the Windows file system - which only gives files sizes once they have been fully generated, otherwised the file size is set to 0 bytes - and is set so that it picks up the file if the size is anything other than 0 bytes.
The problem is that the application which picks up the files, from Linux, is picking them up before they have completely generated - this is because when files are generated on Linux the file size is incremented continually until the full size is reached.
We dont want to have to change any of the applications so is there any way of locking the files until they have fully generated? Or maybe there is a way in Linux to keep the file size at 0 bytes until it has been fully generated?
(we can increase the polling on the application but this doesnt actually solve the problem and there still exists a chance that it may poll as a file is being created).
Your help would be greatly appreciated,
Kind Regards,
David
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for the help,
David