How to write a script for delete all the logs everytime macos shutdown?

197 Views Asked by At

I knew how to delete all the log files with terminal command "sudo rm -r /var/log" but how to set it up for system events, therefore, clear up everytime system shutdown?

1

There are 1 best solutions below

0
On BEST ANSWER

We can execute commands or script at startup or shutdown,

see the links below for details,

unix.stackexchange.com or ccm or opensource.com