If both the scripts are run by a common user or if second script is called by root you can see the output of linux command lsof to check the files currently open.
In reply to Re: check which files are open to write/read by another process
by samarzone
in thread check which files are open to write/read by another process
by avanta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |