Understanding Hidden Root Folders 5

Unix

Share
Understanding Hidden Root Folders

Hey

The Mac system, as you might well know is built on Unix. As a result there is a lot of Unix folders in the root system. This post is going to explain for people new the the Mac system a general understanding of what each folder does. This is designed to be a simple guide for new users, so experienced Unix and Mac developers probably know a lot more than me. You have to learn from somewhere.

The first step is to show theses hidden folders. You can use one of three ways. Secrets preference pane, where you show hidden files (the quickest). Quicklook, folder plugin where you can show hidden files in quicklook (safest). Or command line, in which you can actually see the folders. If you want to use the Terminal root to show the files type:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

To reverse the command type false instead of true.


My root folder will look very different to yours (probably). This is due to the installed programs and devices that I might have. But the main folders should be there.

.Trashes

A directory that stores the files that have been deleted but not permanently deleted. You have one of these folders in every folder that you delete a file from.

bin

Used to store binary files that you run from in Terminal and other applications. Contains programs such as rm (deleting stuff) and chmod (change file permissions) to name a few.

core

If a program has crashed and it dumps its memory into this folder. Only really used by developers.

dev

A place holder to keep track of various devices such as mice, keyboards etc.

etc

The configuration for storing all of the configurations for various programs. Will actually link to /private/etc. Stuff like apache web server config files are in here if you are running a webserver.

mach_kernal

The kernal files for running Mac operating system. The very core of the OS. If you fiddle with these files and you don’t no what you are doing you are in serious trouble.

private

Contains the actual folders for etc, tmp and var. Compared with aliases for the folders in root.

sbin

Again, contains more binaries this time for system administration and configuration.

tmp

Pretty much what it says on the tin. A place in which programs can store temporary files during installation. The actual location is /private/tmp.

usr

Another binary folder but this time it stores all of the binaries relating to user tasks. There are various folders which do ever so slight different tasks but it all relates to the user, compared to root and system config.

var

A place for storing configuration files and log files. Var/root is the home directory as the root user. Var/vm contains both your swap files and sleep image. The swap files is used when you are starting to run out of real memory. Mine is only at 64mb which isn’t to bad, probably why my computer is running fast today. If this file is very large, it might be time to invest in some more ram.

Volumes

Contains links to all of the mount points of volumes stored on your system.

Hopefully if you didn’t know before about root unix folders you should now. As stated before this is just a brief overview to give you an idea of how things work. As a final tip don’t both playing around with them unless you know what you are doing. A lot can go wrong in these folders. Thats probably why Apple hides them.


If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips