dimanche 22 mars 2015

Cleaning /var/folders [bash]!


In my /var/folders (or better /private/var/folders) are many OLD files. (weeks and months!). Even in the ls "$TMPDIR".


I was surprised because I thought it get cleaned at every reboot, and i rebooted my mac a few days ago.


Even if I assuming that the following is OK,



  • exit all apps

  • and from the bash



sudo -s #su
rm -rf /private/var/folders/*
sync
reboot


should be safe, for ensure myself - asking:


It is safe delete everything bellow /private/var/folders/?


Another question - has the OS X something as rc.6, e.g. an shell script what is running when changing the run level to 6 - e.g. at every reboot? (Or rc.0 at every boot), to where I could add the rm?


Is safe clean the /var/folders/* at every reboot? (asking because i could imagine than some update utility could use it...).


Or the OS X's (launchd) doesn't using "run levels"?


Ps: Please, don't waste your (and my) time suggesting some Free/Share/Commercial cleaning utilities. The question is solely for the shell, looking for the answer from someone who has deep OS X (darwin) system (command-line) knowledge.





Aucun commentaire:

Enregistrer un commentaire