Identifying the file completion

Hi,

A script is running for multiple databases so data is also being populated for multiple DBs in a.txt file.

I need to rename this file once all the data is populated. Kindly suggest me How can I check once file is populated completely before renaming?

Thanks in advance.

How do you determine when file has been populated?

You could use fstat (or similar utility depending on the OS), to check that no process is accessing the file, before renaming.

1 Like

Please let me know how can I use this?