Miscellaneous
  Home arrow Miscellaneous arrow Page 2 - In Detail: UNIX File Systems
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
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

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    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


     

    MISCELLANEOUS ARTICLES

    - Using PHP to Stream MP3 Files and Prevent Il...
    - 10 Must Have Firefox Improvements
    - All About OpenOffice 3.0
    - Shell Script Writing
    - Loops in the UNIX Shell
    - The Test in the UNIX Shell
    - Data Streams and the UNIX Shell
    - Control Mechanisms of the UNIX Shell
    - Variables Within the UNIX Shell
    - The Shell and UNIX
    - In Detail: UNIX File Systems
    - Rights Management in UNIX
    - UNIX File Systems
    - The Terminal in UNIX
    - Operating Systems and UNIX





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek