bashmacosshellsystemeventsystemexit

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


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?


Solution

  • We can execute commands or script at startup or shutdown,

    see the links below for details,

    unix.stackexchange.com or ccm or opensource.com