MAC OSX System directory structure (RPM)

Source: Internet
Author: User
Tags temporary file storage

Summary

In OS X's system, there is no longer a familiar C-disk, D-Drive for Windows users, because OS X is the UNIX system and its directory is compliant with UNIX systems. The Mac Machine board uses the Intel-led EFI standard and the hard disk partition format uses GPT. This efi+gpt approach has many advantages over the traditional BIOS+MBR approach, and can be found in the blogs I wrote earlier. 1 Hard disk partitions

By default, MAC OS x divides a hard disk into 3 GPT partitions. The first is the GPT standard required for the ESP partition, which is very small, 200mb,fat file system format. The boot program that should be used to store the operating system according to EFI conventions. But Apple did not adhere to this Convention, its bootloader boot.efi is not stored in ESP, this partition is only used by Apple to store the upgrade firmware files. The second partition is OS X's system partition, which takes up most of the disk space used to store the entire OS X system and user data, and the partition file system format is hfs+. The third partition is the system recovery partition, which contains a streamlined OS X system to perform tasks such as system recovery and installation, similar to windowsPE. By default, OS x comes with a disk utility that does not display the ESP partition and recovery partition, and requires the Debug menu to be turned on. The Open method is:

defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

Then restart Disk utility, the menu bar will have a "Debug" menu, select the "Show All Partitions" menu item in this menu, the left side of the disk to display the hidden partition. As shown in the following:

At this point, both the ESP partition and the recovery partition are grayed out because the partition is present, but it is not mounted to the system tree, right-clicking on the partition, selecting mount to display normally, and viewing the partition directly in the Finder.

The directory structure of the ESP partition is as follows:

2 directory structure for OS x system partitions

Mac OS X is already a certified UNIX system, so its directory structure basically conforms to the UNIX system directory structure. But there are a lot of directories in the Finder that can't be seen, because these directories are set up with hidden properties, and we can use UNIX commands in the terminal window to see

As you can see, there is a traditional UNIX system directory under the root directory, and there are some OS X specific directories.

2.1 Directories that match Unix tradition
    • /bin a directory of traditional UNIX commands, such as LS,RM,MV.

    • /sbin traditional UNIX Management class commands to store directories such as Fdisk,ifconfig and so on.

    • /USR third-party program installation directory.

    • /usr/bin,/usr/sbin,/usr/lib, where the shared library (dynamic link library) is stored in the/usr/lib directory.

    • /etc. the standard UNIX system configuration file stores directories, such as user password file/etc/passwd. This directory is actually a link to/private/etc.

    • /dev Device File Store directory, how to represent the/dev/disk0 of the hard disk.

    • /tmp temporary file storage directory, its permissions for everyone to read and write. This directory is actually a link to/private/tmp.

    • /var stores frequently changing files, such as log files. This directory is actually a link to/private/var.

These standard UNIX directories are not visible in the Finder, as shown in:

2.2 OS X-specific directories

OS x System, in addition to the standard UNIX directory, but also added a unique directory.

    • /applications application directory, the default all GUI applications are installed here;

    • /library system data files, Help files, documents and so on;

    • /network network node storage directory;

    • /system He contains only a directory called the Library, which stores most of the system's components, such as various frameworks, kernel modules, font files, and so on.

    • /users Store the user's profile and configuration. Each user has its own separate directory.

    • /volumes file system mount point storage directory.

    • /cores the kernel dump file to store the directory. When a process crashes, a dump file is generated if the system allows it.

    • The subdirectory inside the/private contains the target directory of the/TMP,/VAR,/etc and other linked directories.

3 What directory should the user's data be stored in?

For ordinary OS X users, the understanding of the structure of the system tree does not affect the normal use of the system, so that OS X has many directories are deliberately hidden, so that ordinary users can not be seen through the finder. What users really care about is how to store their data in a more convenient and secure location. Windows users typically store their personal data in other partitions that are not part of the system disk (c), because once the Windows system dies, the contents of the C drive are likely to be lost. MAC OS X users do not have to worry about this problem, OS x crashes and the probability of failure to start is too low, even if the system is a problem, because the user directory and system directory is independent of each other, so it is easy to retrieve. So typically, users store the data directly in their own user directory, OS x also advises users to do so, and has prepared a common subdirectory for the user, as shown in:

Applications, documents, downloads, music, movies, pictures, public, for ordinary users these subdirectories are enough, of course, if you do not feel enough, you can add yourself casually, for example, added work directory to store some working project files, family photo video is used to store from the phone, DV and so on photo video material.

Users from Windows, if you want to keep the original habit, the user files and system files in different partitions, it is necessary to facilitate the "Disk Utility", re-partition, the system partition smaller, set aside space to create a new hfs+ partition, Use this to mount the partition to the system directory tree.

MAC OSX System directory structure (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.