Help with "while" Monitoring

Hello everyone
i have a situation....
I need to create a script, this one run others script (stop/star)
my big deal its when i run the star one, why?
cause i need to move one file from one location to another, but to do that, i need to check the logfile stop writing(every action will write this log)
and so on.
I need to write a buccle with a "while" that test every N time ( 30 or 60 ...)
and check if this log file stop, if its then copy the file.
The size of this logfile never it's the same, so i can't test for an exact size.
but if i chechk the size every N time i could test the before result with the after one, and when before=after it's means that the log it's stoped. Right?

If anyone have an idea....uff i'll appreciate it!!!

Slightly complicated..

If you are checking log files after say30 sec(assumed) and in mean time there is no log entered in the log file that does not give assurance that file writing is done.

Try to search a pattern. And the time concept of your works here then just check after some time ...

is your log file created every day at certain time or it continuously generated.

you can check with crontab . decide your time duration and run the script it will check the log file and take the action accordingly....:slight_smile: