Hi Mac Users,
varis one of the most important directory on the Mac OS.
Importance of var folder:
- /var – This is actually a hidden folder in mac! Until and unless you make your mac to show the hidden files, this file will not be visible. This is actually under the /private/var.The directory which you see is the shortcut.It is just a symbolic link.Now lets see what is its significance! The folder contains the processes controlled by the operating system.Processes like printing and the programs that store the log files will use the sub directories in the /var directory to store those files.It also holds a fair bit of configuration information [especially /var/db]
- /var/backups – Used to store backups of critical system information.
- /var/db – Holds various databases of the system information.The most notable are the netinfo databases(stored in /var/db/netinfo), shadow password files(in /var/db/shadow/hash),and the system’s network configuration database (/var/db/SystemConfiguration/preferences.xml although it moved to /Library/Preferences/SystemConfiguration/ in 10.6), which together store much of the system and network configuration information that a traditional unix admin would expect to find in /etc, and a Mac OS 10 admin would expect to find in System Folder:Preferences.
- /var/log – This is where many of the system event logs are kept (others are kept in /Library/Logs).
- /var/root -The root (superuser) account’s home directory. Note that this directory will exist even if you haven’t enabled the root account.
- /var/run – Stores various status information about processes (especially daemons) running on the system.
- /var/tmp – A place for programs to store temporary data, just like /tmp. Some programs use one, some use the other, so Mac OS X provides both.
- /var/vm – Used to store the swap files for Mac OS X’s virtual memory.
- /var/vm/app_profile – Holds information about various applications’ virtual memory usage.
Never delete this directory because it leads to many severe problems such as data loss and non functionality of your applications! Check out the post in case if you have deleted the /var folder accidentally.