A Filesystem's Guide

From Openmoko

(Difference between revisions)
Jump to: navigation, search
 
(14 intermediate revisions by 7 users not shown)
Line 1: Line 1:
''Note : The following is far from being complete''
+
{{Improve}}
 +
{{Languages|A Filesystem's Guide}}
 +
== 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.
  
= The Filesystem =
+
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.
  
== Openmoko 2007.2 ==
+
== The Om 2008.8 filesystem ==
 +
 
 +
The root filesystem consists the following directories:
  
The Rootfilesystem consists out of the following directories:
 
 
*bin     
 
*bin     
 
*dev
 
*dev
Line 21: Line 36:
 
*tmp
 
*tmp
 
*var
 
*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 ==
 +
* [[GTA02 sysfs]]
 +
 +
==External links==
 +
* [http://www.pathname.com/fhs/ Home of the Filesystem Hierarchy Standard]
 +
* [http://www-128.ibm.com/developerworks/linux/library/l-proc.html?ca=dgr-wikiaProcFile#N1030B Fortune Cookies through the /proc Filesystem]
 +
* [http://ftp2.de.freebsd.org/pub/cLIeNUX/descriptive/DSFH.html The Dotted Standard Filename Hierarchy], yet another very different hierarchy (used in cLIeNUX)
 +
* [http://www.pathname.com/fhs/pub/fhs-2.3.pdf Filesystem Hierarchy Standard 2.3] (January 29, 2004)
 +
 +
[[Category:Om 2008.8]]

Latest revision as of 10:04, 9 October 2008

Need improvement: This article or section needs improving. Feel free to add content.

Contents

[edit] 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.

[edit] 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.

[edit] See also

[edit] External links

Personal tools

Note : The following is far from being complete


The Filesystem

Openmoko 2007.2

The Rootfilesystem consists out of the following directories:

  • bin
  • dev
  • home
  • media
  • proc
  • sys
  • usr
  • boot
  • etc
  • lib
  • mnt
  • sbin
  • tmp
  • var