Link to home
Start Free TrialLog in
Avatar of dcsearle
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
SOLUTION
Avatar of Robson
Robson
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dcsearle
dcsearle

ASKER

Yeah the code is our own but it isnt really an option as it is very old software which is tried and tested.  However it is looking like we are going to have to consider that option.  Is there no way that Linux can be set to report file sizes as 0 bytes until they are generated?

thanks for the help,

David
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial