“This is the sixth day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021.”

UNIX System Architecture

IOS evolved from OSX, which was based on the UNIX operating system. There’s a big difference, but there’s a deep connection.

The common directory structure for uniX-like operating systems is as follows:

/: Indicates the root directory. All other files and directories are in the root directory.

/bin: short for binary, storing binary files of basic user functions, such as ls and ps

/boot: Stores files that enable the system to start successfully. In iOS, this directory is empty

/dev: short for device. Stores BSD device files. Each file represents a block device or character device of the system.

/sbin: short for system binaries, storing binary files of basic system functions, such as netstat reboot

/etc/et Cetera. It provides system scripts and configuration files, such as passwd hosts. In iOS, it refers to /private/etc

/lib: store system library files, kernel modules, device drivers, etc. In iOS, this folder is empty

/ MNT: short for mount to hold a temporary filesystem mount point, which is empty in iOS

/private: stores etc and var

/ TMP: a temporary directory. On iOS, it points to /private/var/tmp

/usr: stores user tools and programs.

/var: stores files that are frequently changed, such as logs, user data, and temporary files. Note that /var/mobile and /var/root store files for mobile and root users respectively

All of these are UNIX’s underlying file systems and are not usually used. If you are interested, or can be carefully studied, or very interesting

Some iOS directories

/User: the User directory actually points to /var/mobile, which stores a large amount of User data

  1. /var/mobile/Media/DCIM Stores photos

  2. The/var/mobile/Media/Recordings for recording

  3. /var/mobile/library/sms Stores short messages

  4. /var/mobile/library/mail Stores Mail

It’s worth mentioning /var/mobil/containers, the folder that houses apps downloaded from the AppStore

And APP executable files stored in the/var/mobile/Containers/Bundle

The Data in the APP directory in/var/mobile/Containers/Data

These two folders are commonly used by APP, and other folders are rarely used.

There are a lot of directories in iOS, but for forward development, there is still a little bit of knowledge, if you are interested, please let me know. I will add more information, of course I don’t know too much, have better advice, open your mind!!