Page 1 of 1

Need a script that logs whenever Save occurs

Posted: Fri Aug 23, 2024 2:22 pm
by JusGellin

I would like to have something that logs whenever a Save session occurs and gives the size in bytes, whether the Save button is selected
or on reboot/shutdown it is asked.

This is somewhat something that can give me the format I want.
du --time -sk /initrd/mnt/dev_save/dpupbw6410.0.7frugal/dpupbw64save | awk '{print strftime( "%Y-%m-%d %H:%M:%S",systime(),$2), " " $1}' >> Save.log

format:
2024-08-23 14:12:41 899692

How could I do this?

Thanks


Re: Need a script that logs whenever Save occurs

Posted: Fri Aug 23, 2024 10:41 pm
by williwaw

it seems you have the output figured, but it might help if you let others know how saves are initiated.
or
are you wanting to know how to trigger some process when another process occurs?


Re: Need a script that logs whenever Save occurs

Posted: Sat Aug 24, 2024 12:43 am
by JusGellin

Thanks @williwaw
I originally had a similar question over on BookwormPup forum but thought this was a better place. So I made this one over here since I couldn't move it myself.

After I did this I mentioned this to @mikewalsh.
He transferred that over to the programming forum. So this is a duplicate. Sorry for this happening.

The other topic has subject: How to Make Log File To Track Save Folder Size? viewtopic.php?t=12496
That one now has more complete information for what I'm trying to do.