Need a script that logs whenever Save occurs

interpretive language scripts


Moderator: Forum moderators

Post Reply
JusGellin
Posts: 753
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 90 times
Been thanked: 92 times

Need a script that logs whenever Save occurs

Post 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

williwaw
Posts: 2038
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 182 times
Been thanked: 387 times

Re: Need a script that logs whenever Save occurs

Post 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?

JusGellin
Posts: 753
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 90 times
Been thanked: 92 times

Re: Need a script that logs whenever Save occurs

Post 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.

Post Reply

Return to “Scripts”