A Filesystem's Guide
From Openmoko
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català
Contents
UNIX filesystems organisation background
The main ideas to organize the files in the standard Unix filesystem are:
- group files according to their life cycle.
- visibility (convenience and access control).
- historical constraints.
Therefore:
- User data that should survive at all costs go to /home
- Configuration files are precious and must be easy to reach, they go in /etc
- Things that should not survive reboot go to /tmp
- Things that physically come and go appear in /mnt (old style) or /media (new style)
- Files that tend to grow too much unsupervised go to /var, so that they can only fill the partition containing this directory.
- Pseudo files used to communicate with the kernel go to /proc (old style) or /sys (new style). Pseudo files used to communicate with other hardware devices go to /dev.
- /boot can be used to keep the kernel file in a place the hardware can access easily
- The remaining directories contain binaries. /lib is for shared libraries. The basic low-level UNIX toolbox is in /bin, the tools needed only by the administrator are in /sbin. Everything else go to /usr.
The Om 2008.8 filesystem
The root filesystem consists the following directories:
- bin
- dev
- home
- media
- proc
- sys
- usr
- boot
- etc
- lib
- mnt
- sbin
- tmp
- var
The first difference to the standard Linux filesystem is the lack of /root directory. This directory is located under /home/root/.
The config and data files for contacts, calendar, memos and tasks are located under the ~/Applications and ~/Documents folders, cf. the Backup article.
The file /home/root/.ash_history is a history of commands for the standard shell (ash). If you use bash, it will create the file /home/root/.bash_history.
The inserted micro SD card is mounted under /media/card.
See also
External links
- Home of the Filesystem Hierarchy Standard
- Fortune Cookies through the /proc Filesystem
- The Dotted Standard Filename Hierarchy, yet another very different hierarchy (used in cLIeNUX)
- Filesystem Hierarchy Standard 2.3 (January 29, 2004)