i have two application first application is bash second is java
which one of them is periodically deleting and recreating a specific file (first)
the other one is also periodically reading this file and process it in it's own logic (second)
how can we achieve second application read that file when first application not modifying it
my aim is to force second app read the file only when content of file fully written inside it
how can achieve this goal ?