Miscellaneous

  Home arrow Miscellaneous arrow Page 2 - In Detail: UNIX File Systems
MISCELLANEOUS

In Detail: UNIX File Systems
By: Gabor Bernat
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2009-04-01

    Table of Contents:
  • In Detail: UNIX File Systems
  • Mounting file systems
  • Links in UNIX
  • The standard files and directions
  • File names on the shell command line

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    In Detail: UNIX File Systems - Mounting file systems


    (Page 2 of 5 )

     

    As described in the article I wrote entitled "UNIX File Systems," the structure of the file system is similar to a tree. The root folder (/) is the root of this tree. From here the entire structure branches out, and at every directory you can add new files/directories below it. This structure lets the system mount a new file system anywhere in this tree.  

    The kernel will mount the root file system at system startup. You can mount further systems anywhere in the three except the /. A mount point is a directory. When you mount a file system to that, the directory will just vanish and its place will be taken by what you just mounted.  

    When you unmount that, the directory will return to its previous state. You can mount file systems with the mount command line. If you run this with no options/arguments, it will return all of the file systems currently mounted. 

    Every file system mounted will be added to the mount table. This is a file held in /etc. Here you can find out what systems are mounted, the device on which they reside, the mount point to which they are mounted and a list of options that were used to mount the system. Under Linux, the name of this file is mtab.  

    On a drive, you can have multiple partitions. The partitions can have different formats, such as NTFS, Ext3 and so on. This will determine their structure. The structure that describes the files in UNIX is the i-node. The i-node table holds all the information about the file under its name. 

    This is organized by the system and is assigned an integer number. You can view these numbers if you add the -i option to the ls command. The syntax of the mount command looks as follows: 

    mount [device] [directory where to mount] [options]

    The following example will mount the first SCSI-connected hard drive's third partition that has an msdos partition type: 

    mount /dev/sda3 /media/alfa -t msdos

    The command for doing the opposite is unmount. The file systems that should automatically mount are added into the /etc/fstab file. The du and df commands will also help you get a better picture of the space and the files on your system.  

    Example of the /etc/mtab and /etc/fstab on an Ubuntu 8.10 Linux distribution:

     


     

    More Miscellaneous Articles
    More By Gabor Bernat

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength
    - Install Slackware on Your Old PC


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap