Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now that we have gone over the basics of working with the file system, we know how to view the files and directories and our present working directory and how to move around the file system, I want to stop and take a look at the big picture for what the file system looks like and how it's organized, because there is a very standard way that Unix goes about organizing it and Mac OS X then has its own sort of version of that. So in a typical Unix organization, you have the root of the hard drive, we saw that with just simply the slash, and inside the root there is typically several folders. bin which is where the binaries or programs are stored.
These are Unix programs, not programs like Photoshop and Microsoft Word. Those are Mac applications. These are Unix programs. Sbin is for system binary, system program that it uses. dev is where there are references and files for different devices like hard drives keyboard, mouse, etcetera. /etc which is also pronounced as etcetera or "easy" by some people. That's where system configurations go. Then there is home, which is where user home directories go. On most Unix systems once you log in, you will be placed into a folder inside the home. That's where your files and folders would live. Not on Mac but on most Unix systems.
Lib is a place for storing libraries of code that need to be referred to various programs. tmp is temporary, that's for temporary files, things that you don't mind if someone comes in and wipes the file away. You won't miss it. That's where you would put in tmp. And then var is for various, mostly files that the system uses. Then there is usr, which is short for user and that's where the user would put programs tools and libraries, not their files. Their files would be in their home directory, but the programs that they would have installed just for them, they put those in the usr directory, not in the system bin.
There would be things that are for the users in the usr bin. Most players of Unix are going to adhere to this basic structure. They may make small changes here and there and maybe add a folder, take away a folder, but it's basically the same file structure and for putting things in the right place. On the Mac though there are some additional files that you should know about. Most of them are probably familiar to you. There are Applications, Library, Network, System, Users, and Volumes and it's kind of self-explanatory what all of those are. Just notice that the Applications and Library are for Mac programs, not Unix programs, Mac programs and Library is for Mac libraries of code.
We have a separate place for putting the libraries that Unix needs. These are just libraries that are used by Mac applications. System is where Mac OS X itself lives, and then Users is what it uses for its home directory. It does not use /home to put the user directories. It puts them all in /Users. Notice these are all capitalized. These are also all visible to you. If you go to the root of the hard drive in the Finder you will see them. The other ones are not. It's been told to hide them from you. Even though they are not .files names, it's still has said, these are some basic configuration files that Unix uses and the Mac user doesn't normally need to see those.
If they need to see it from the command line, they will still see it, but from the Finder we are going to hide them. There are also these dot files we talked about before. .DS_Store holds folder view options and icon positions that exists in a lot of your directories. You will see that in lot of places. Sometimes you will see .MacOSX. That's just the directory for Mac OS X to store some options. .Trash we talked about is the user trash and then two that you might see pop up here and there which are .hotfiles.btree and .Spotlight-V100.
Leave those alone if you see them. These are used by Spotlight or Mac OS X to quickly organize things. It's to better index and find files, things that it's going to need often. So that gives you sort of the big picture. You also have both of these in your Mac OS X. You have the Unix one and then you also have the Mac one sitting side by side. So if you want to surf around, you can go in the command line, you can use cd to move around, poke about, see what's in all these different directories. You will see that the Mac one does make some customizations to the original one. There are few things that are different but for the most part this is sort of what you can expect.
You can expect that the Unix one is going to exist on most Unix systems and Mac is going to add these other files in there. So hopefully that will just demystify it for you a little bit and get you a little bit familiar with where different code is going to live.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 97496 Viewers
61 Video lessons · 84738 Viewers
71 Video lessons · 68918 Viewers
56 Video lessons · 101362 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.