Wednesday, March 25, 2009

User directory structures

Some OS's call them home or user home directories, document directories. Here's a quick guide to how different operating systems typically organize user directories.

Directory TypeDirectory path returned for each operating system
User Home
Windows XP:C:\Documents and Settings\<user>
Windows Vista:C:\Users\<user>
Mac OSX:/Users/<user>
Linux:/home/<user>
User Desktop
Windows XP:C:\Documents and Settings\<user>\Desktop
Windows Vista:C:\Users\<user>\Desktop
Mac OSX:/Users/<user>/Desktop
Linux:/home/<user>/Desktop
User Documents
Windows XP:C:\Documents and Settings\<user>\My Documents
Windows Vista:C:\Users\<user>\Documents
Mac OSX:/Users/<user>/Documents
Linux:/home/<user>
User Application Data
Windows XP:C:\Documents and Settings\<user>\Local Settings\Application Data
Windows Vista:C:\Users\<user>\AppData\Local
Mac OSX:/Users/<user>/Library/Application Support
Linux:/home/<user>
User Preferences
Windows XP:C:\Documents and Settings\<user>\Local Settings\Application Data
Windows Vista:C:\Users\<user>\AppData\Local
Mac OSX:/Users/<user>/Library/Preferences
Linux:/home/<user>
Public Documents
Windows XP:C:\Documents and Settings \All Users\Documents
Windows Vista:C:\Users\Public\Documents
Mac OSX:/Library/Application Support
Linux:/usr/local/
Public Application Data
Windows XP:C:\Documents and Settings\ All Users\Application Data
Windows Vista:C:\ProgramData
Mac OSX:/Library/Application Support
Linux:/usr/local/
Public Preferences
Windows XP:C:\Documents and Settings\ All Users\Application Data
Windows Vista:C:\ProgramData
Mac OSX:/Library/Preferences
Linux:/etc
System Libraries
Windows XP:C:\Windows\System32
Windows Vista:C:\Windows\System32
Mac OSX:/Library/Frameworks
Linux:/usr/lib
Application Files
Windows XP:C:\Program Files
Windows Vista:C:\Program Files
Mac OSX:/Applications
Linux:/usr/local/
Volume Root
Windows XP:C:\
Windows Vista:C:\
Mac OSX:/
Linux:/
Temp
Windows XP:C:\Documents and Settings \<user>\Local Settings\Temp
Windows Vista:C:\Users\<user>\AppData \Local\Temp
Mac OSX:/private/tmp/folders.501 /TemporaryItems
Linux:/tmp

Thanks to National Instruments for the data.

See Wikipedia entries Home directory and My Documents. If you're in Java land, values of the os.name property are documented here and here.

No comments:

Post a Comment