Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Switcher wondering about OSX structure

Switcher wondering about OSX structure
Thread Tools
Junior Member
Join Date: Apr 2003
Status: Offline
Reply With Quote
Apr 19, 2003, 11:57 AM
 
Hey guys, I'm seriouslly considering getting a powerbook quite soon. I had a question about how OSX structures its sys/apps. Since I've been a PC user (practically my entire life), I'm accustomed to the /Windows /Program Files etc etc file system.

I just wanted to know how OSX organizes its applications - also, how would I go about partitioning my HD - are their utilities like Partition Magic for the Macs?

Where are applications placed once they are installed - i.e. basically is their a /Program Files folder that all apps get dumped to? or does it prompt you and ask where you want the app installed? Also, how is uninstalling of programs - simple and easy?

I know OSX is based on the BSD kernel so maybe the structure is very similar i.e. usr/bin <--- all the system applications, usr/local <--- all the user installed apps. Just wondering how people are going about storing their data

-- thanks in advance
     
Senior User
Join Date: Aug 2002
Location: Oxford, England
Status: Offline
Reply With Quote
Apr 19, 2003, 12:07 PM
 
Applications generally go into this directory:
Macintosh HD / Applications
Most applications can be moved around and put in any directory of the hard disk eg. they're not stuck in one place.

Each user on the system has a 'Home Directory' found here:
Macintosh HD / Users / Luke etc.

Inside each users directory there are the following folders:
Desktop
Documents
Library
Movies
Music
Pictures
Public
Sites

Disk partitioning is easy with the Disk Utility application which comes with Mac OS X.

Uninstalling applications in most cases is as simple as dragging the application to trash.

It all sounds easy and it really is.
(Last edited by sandsl; Apr 19, 2003 at 12:17 PM. )
Luke
     
Mac Elite
Join Date: Jan 2001
Location: Somewhere in the land surrouding Fenway Park
Status: Offline
Reply With Quote
Apr 19, 2003, 12:21 PM
 
Originally posted by cucswiz:
Hey guys, I'm seriouslly considering getting a powerbook quite soon. I had a question about how OSX structures its sys/apps. Since I've been a PC user (practically my entire life), I'm accustomed to the /Windows /Program Files etc etc file system.

I just wanted to know how OSX organizes its applications - also, how would I go about partitioning my HD - are their utilities like Partition Magic for the Macs?

Where are applications placed once they are installed - i.e. basically is their a /Program Files folder that all apps get dumped to? or does it prompt you and ask where you want the app installed? Also, how is uninstalling of programs - simple and easy?

I know OSX is based on the BSD kernel so maybe the structure is very similar i.e. usr/bin <--- all the system applications, usr/local <--- all the user installed apps. Just wondering how people are going about storing their data

-- thanks in advance
Alright well first of all OSX comes with a built in disk partitioner called Disk Utility. When you install OSX from the cd you can select it from the Apple menu. Otherwise you can partition a second disk anytime since it also gets installed with the system.

As for how data is stored the directory structure is kind of two-tier. There is the basic OSX structure:

/System -- OSX OS required files
/Applications -- The name says it all
/Users -- Each user has thier own folder in here
/Library -- System-wide extentions that you install
/Developer -- If you install the Dev tools. Useful even if you're not a programmer.

There are two other OSX-specific folders that are hidden:
/Volumes
/Network

Those are the directories you'll see in the Finder, but there are other (hidden) UNIX-esque folders like you mentioned. These aren't generally used with OSX applications, but there are often ported to OSX and retain the behavior of installing binaries in folders such as /usr/bin.

Applications have less dependancies on location than Windows does, in other words you can run pretty much any app from any location. Most installers WILL install apps right into the /Applications folder but you can move them out of there. I run recently downloaded apps right from the desktop all the time.

Most applications are easy to uninstall because they are simply one file. OSX uses a system called packages where all the dependant files are contained in what appears to be one executable. What this means is that a good 80% of the apps you install will be done completely by you by just dragging it to your HD. Applications that need to install extentions to the System in, say, the /Library folder generally have uninstallers. Applications installed by drag and drop can simply be thrown out to uninstall them. There's no such thing as DLLs or a regestery in OSX so there's no need to worry about breaking another application by throwing one out.

Now, you also asked about how people generally store thier data. Its generally done in your home folder, which will be inside the /Users directory. When you instlall OSX the'll be a bunch of folders already there, such as Documents and Movies, but you don't have to follow these guidelines. The only folder that is required is the /Library folder inside your user folder. This is where applications will store prefrences and things like webcache.

This means that when different users launch the same app, they have a different set of prefrences.

Also, and this might be a little hard to expalin, your personal Library folder acts much like the system-level /Library folder. This means that you can install anything you would normally install at the sytem level in your own Library folder and it would be only availible to you, not the other users. For example if you had a Prefrence Pane (OSX's version of a control panel) that you wanted to install you could put it inside your library folder (and it would only be availible to you) or at the root library folder (and it would be availible to everyone) there is also a /System/Library folder, but this contains required information for the system.

I guess I got a little confusing at the end, but hopefully this answered at least some of your questions.
     
Professional Poster
Join Date: May 2001
Location: Switzerland
Status: Offline
Reply With Quote
Apr 19, 2003, 12:24 PM
 
Originally posted by cucswiz:
I just wanted to know how OSX organizes its applications - also, how would I go about partitioning my HD - are their utilities like Partition Magic for the Macs?
No 3rd party Apps are needed, the ability to partition is included in OS X in the 'Disk Utility' app.



Originally posted by cucswiz:
Where are applications placed once they are installed - i.e. basically is their a /Program Files folder that all apps get dumped to? or does it prompt you and ask where you want the app installed? Also, how is uninstalling of programs - simple and easy?
When you open the 'Hard Drive' (Kind of the equivalent to 'My Computer' I guess) icon, you get shown 4 files only...



The applications file is the default install location.

When an app is placed in this folder it is available to all users who may log onto the system...

You can in effect place your apps anywhere, even on a seperate Hard Drive, but in practice X doesn't like it too much and can play up. It is best to treat the Apps file as sacrosanct and leave it where it is!

As for uninstalling. it is as easy as dragging the application folder to the trash. (Although it is always good to ditch their 'library' or preference files as well, but not really necessary)

More advanced apps often have a 'remove' feature...

Originally posted by cucswiz:
I know OSX is based on the BSD kernel so maybe the structure is very similar i.e. usr/bin <--- all the system applications, usr/local <--- all the user installed apps. Just wondering how people are going about storing their data
I believe it is much as you describe, however I'm not really too up on x86 BSD.

On the usr lever, in your user 'home' folder you have numerous premade files... these are pretty convenient. However, you can store them anywhere you are happy with!




Peace,

Marc
     
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Apr 19, 2003, 12:24 PM
 
Just to elaborate a little further...

As sands said, most applications will live in the /Applications directory on the top level of the drive, but there's absolutely nothing that says it has to. The Mac OS is very flexible in terms of where you store apps, and /Applications is more convention than rule.

Most installers will let you override the install location if you want to, plus there's absolutely nothing stopping you from moving an application to a different location later on if you decide you want to - the Mac OS does not track applications by their directory, it can find the app no matter where it's moved to.

For example, Windows knows that .doc files are opened by the application C:/Program Files/Microsoft Office/Microsoft Word
If you move Microsoft Word to a different location, you'll no longer be able to double-click .doc files and have them open.
The Mac OS, on the other hand, knows that .doc files are opened by "Microsoft Word". Internally it keeps a track of what applications are stored where, and can instantly locate the Microsoft Word app no matter where it is on disk, even if you've moved or renamed it.

As for the partition question, yes you can partition drives however you want, however, there is no dynamic resizing of partitions like Partition Magic provides - in this respect it's more like the standard Windows partitioning in that expanding or reducing the size of a partition wipes all the data in that partition.

On uninstalling, most Mac apps are self-contained. There is no 'DLL hell', no registry settings that need to be removed, or anything else like that. Most apps can simply be dragged to the trash and they're gone completely.
Some apps that install system-level functionality do install system (or kernel) extensions, and in these cases they ship with an uninstaller that will remove these normally-hidden files, but that's the exception rather than the norm.

As for data files, again, the Mac is very flexible. By default each user has a 'Documents' directory in their home directory and most apps default to storing new documents in there, but you're free to override this and store your docs anywhere you have write permissions.

In all, if you're familiar with Windows' rigidity of where files go you'll be OK - the Mac has similar defaults. The real difference is that you're free to change your mind at any time.
Gods don't kill people - people with Gods kill people.
     
Mac Elite
Join Date: Oct 2001
Location: Europe
Status: Offline
Reply With Quote
Apr 19, 2003, 12:27 PM
 
Applications should be one file not more. The best example are the applications from OmniGroup. Altough some companies use installers but that is against the Guidelines from Apple.

You drag this application to your application folder.

An application stores its preferences in a XML preference file that can be located in home/Library/Preferences/

example of a pref file name:
com.omnigroup.omnigraffle.plist
- company type
- company name
- application name

If an application need more information to store like mail, bookmarks, templates this will be done in
home/Library/Application Support/Application name/
or home/Library/Application name/
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Apr 19, 2003, 12:53 PM
 
Originally posted by Sharky K.:
Applications should be one file not more. The best example are the applications from OmniGroup. Altough some companies use installers but that is against the Guidelines from Apple.
Not necessarily, actually. There are times when it's OK to have more than one file. Examples:
  • Applications which include fonts which should be made available to other applications.
  • Applications which deal with hardware, and therefore usually require KEXTs for their drivers.
  • Applications which include PreferencePanes
There are other examples too. But you're right that most apps should be one file Or, more accurately, they should be one package; all of OmniGroup's apps have multiple files, but they're wrapped up into one package.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
cucswiz  (op)
Junior Member
Join Date: Apr 2003
Status: Offline
Reply With Quote
Apr 19, 2003, 01:39 PM
 
First off, thanks for all your inputs. So I think I have a better understanding of how things are organized - it seems like there are 2 version of folder systems on OSX. The vanilla UI version (all the /Application etc. folders you guys mentioned) as well as the UNIX BSD version /usr/bin etc.

I'm just wondering - do these overlap? i.e. are they basically aliases for each other?

On a side note - I know OSX ships with some Unix apps preinstalled (ie emacs, vi etc.) Does anyone know where the unix "home" directory lives? i.e. where i put my .emacs preference file - or my terminal customizations?

-- Thanks again for your guys' help.
     
Mac Elite
Join Date: Mar 2001
Location: Robinson, IL
Status: Offline
Reply With Quote
Apr 19, 2003, 01:50 PM
 
Originally posted by cucswiz:
See above ^^^^
No, /Applications and /usr/bin are different directories. GUI apps go in /Application, cli apps go in /bin, /sbin, /usr/bin or /usr/sbin. Your unix home dir is the same as your OS X home dir, /Users/username (you can use NetInfo Manager to change your home dir to wherever you want, actually). So .emacs (or .galeon, or .ncftp) goes in the same directory as Library, Movies, etc., and dot file are hidden in the Finder (file manager) to eliminate clutter.

--Josh
     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Apr 19, 2003, 02:19 PM
 
Specifically for emacs, it is located in /usr/bin- and support files are in /usr/libexec and /usr/share/emacs.

There is a Terminal app that launches in OS X and gives full access to the Unix capabilities. The Terminal is by default a tcsh shell but can be configured as as a bash shell and others.

Early on with OS X, I partitioned my drive buut after 2 /12 years no longer see the need for that.

If you dowhload an OS X .pkg or .dmg file, the Installer defaults to installing in the directory where the package is downloaded. The Disk Image with the OS X files is mounted on the Desktop (which for me is a big diff from the Windows Desktop) and once you move the apps, docs where you want the Disk Image is unmounted and disappears.

There is as shown in earlier posts a /Applications directory/folder at root level. Most apps can go there. Within that is a Utillities folderwhre I put tools and Utilities.

You can create your own organization scheme. As a multi-user system, user specific data is stored in /Users/yourshortname. Installed system additions can go in the /Library for avaulability to all users or /User/yourshortname/Library (also known as ~/Library) for availability/interface modification by just the logged in user.

The unix root subdirectories are normally invisigle to the user GUI, but there are several utilities that show all directories and sym links. In the base installation there are in root in addition to usr:

automount
bin
cores
dev
private
sbin
Trash

and symbolic links to

/private/tmp
/private/etc
/private/var

For 99% of OS X apps, there is no need for an uninstaller, just delete the program. There is also an Apple release of Xwindows- X11 which will enable almost all Unix software- window managers, Desktop interfaces like KDE, gnome- and at times I have both OS X and KDE as interface.

HTH

Craig
     
Grizzled Veteran
Join Date: Apr 2002
Location: Elbonia
Status: Offline
Reply With Quote
Apr 19, 2003, 03:05 PM
 
most of the unix files are hidden, so you dont worry about them unless you 'show hidden' files using a third party app.
also there is no such thing as a registry. so, along with a bunch of other reasons, installing and uninstalling apps is as easy as tickling yourself.
     
Lew
Senior User
Join Date: Dec 2001
Location: England, UK
Status: Offline
Reply With Quote
Apr 19, 2003, 04:37 PM
 
Originally posted by Sharky K.:
Applications should be one file not more. The best example are the applications from OmniGroup. Altough some companies use installers but that is against the Guidelines from Apple.

You drag this application to your application folder.
Here's a good example of this. When you download OmniDictionary it downloads a disk image which is mounted on your desktop like a normal disk (you can drag it to the Trash or right-click it and select 'Eject' and it'll unmount). When you double-click on the disk you get the following window which explains perfectly what to do. It's actually a normal Finder window with an image as a background.

     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Apr 19, 2003, 05:16 PM
 
Originally posted by cucswiz:
First off, thanks for all your inputs. So I think I have a better understanding of how things are organized - it seems like there are 2 version of folder systems on OSX. The vanilla UI version (all the /Application etc. folders you guys mentioned) as well as the UNIX BSD version /usr/bin etc.

I'm just wondering - do these overlap? i.e. are they basically aliases for each other?

On a side note - I know OSX ships with some Unix apps preinstalled (ie emacs, vi etc.) Does anyone know where the unix "home" directory lives? i.e. where i put my .emacs preference file - or my terminal customizations?

-- Thanks again for your guys' help.
Don't worry about /usr/bin. The only stuff that goes there is UNIX command-line utilities. If you install Mac apps, you will not be putting them in there.

Basically, the vast majority of Mac apps that you will be installing are going to be drag and drop. The standard place to put them is /Applications, but there's no real reason you have to do that - you can really put apps anywhere you want. You can come up with your own organizational scheme - I keep all Apple-provided apps in /Applications and put third-party stuff on a separate partition. Basically, do whatever you feel is right - Mac OS X won't punish you. If it makes you more comfortable, you can make a folder called "Program Files" and put your apps in it.

As for the home directory, it will be the same directory that the Mac apps use. Just click on "Home" in a Finder toolbar, or go to /Users/<your username>/ and you'll be in your home directory.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Mac Enthusiast
Join Date: Jan 2002
Location: Trondhjem, Norway
Status: Offline
Reply With Quote
Apr 19, 2003, 07:42 PM
 
A few notes should be said about different modifying rights for the folders. Only admins on the computer can modify /Application, /Library etc. However, if you're the only user, you're the admin too. The admin can't modify /System without authenticating.

Ordinary users can modify system behavior, under their account only, using their own Library folder. So it's better to add accounts to friends/family instead of letting them use your (admin) account.

Also, if you decide to install Classic, there will be some other folders; System Folder, Applications (Mac OS 9), Documents. I keep these on a different (small) partition, to reduce the clutter. The main partition holds OS X, apps, documents, mp3s and everything else.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:02 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2