Page 278 - DCAP403_Operating System
P. 278

Unit 13: Case Study: Linux




          which contains the confi guration files for X. More importantly, the /etc/rc.d directory contains   Notes

          the system startup scripts. This is a good directory to backup often. It will definitely save you a


          lot of re-configuration later if you re-install or lose your current installation.
          /home: Linux is a multi-user environment so each user is also assigned a specific directory which

          is accessible only to them and the system administrator. These are the user home directories,
          which can be found under /home/username. This directory also contains the user specifi c
          settings for programs like IRC, X etc.
          /lib:  This contains all the shared libraries that are required by system programs. Windows
          equivalent to a shared library would be a DLL fi le.

          /lost+foun: Linux should always go through a proper shutdown. Sometimes your system might
          crash or a power failure might take the machine down. Either way, at the next boot, a lengthy

          filesystem check using fsck will be done. Fsck will go through the system and try to recover any

          corrupt files that it finds. The result of this recovery operation will be placed in this directory. The

          files recovered are not likely to be complete or make much sense but there always is a chance that

          something worthwhile is recovered.
          /mnt:  This is a generic mount point under which you mount your  filesystems or devices.

          Mounting is the process by which you make a filesystem available to the system. After mounting

          your files will be accessible under the mount-point. This directory usually contains mount points


          or sub-directories where you mount your floppy and your CD. You can also create additional
          mount-points here if you want. There is no limitation to creating a mount-point anywhere on

          your system but convention says that you do not litter your file system with mount-points.
          /opt: This directory contains all the software and add-on packages that are not part of the default

          installation. Generally you will find KDE and StarOffice here. Again, this directory is not used

          very often as it’s mostly a standard in Unix installations.
          /proc: This is a special directory on your system.
          /root: We talked about user home directories earlier and well this one is the home directory of
          the user root. This is not to be confused with the system root, which is directory at the highest
          level in the fi lesystem.
          /tmp: This directory contains mostly files that are required temporarily. Many programs use this

          to create lock files and for temporary storage of data. On some systems, this directory is cleared

          out at boot or at shutdown.
          /usr: This is one of the most important directories in the system as it contains all the user binaries.
          X and its supporting libraries can be found here. User programs like telnet, ftp etc are also placed
          here.
          /usr/doc contains useful system documentation. /usr/src/linux contains the source code for
          the Linux kernel.
          /var: This directory contains spooling data like mail and also the output from the printer daemon.

          The system logs are also kept here in /var/log/messages. You will also find the database for
          BIND in /var/named and for NIS in /var/yp.
          13.7  Input & Output

          I/O Event handling is about how your Operating System allows you to manage a large number

          of open files in your application. You want the OS to notify you when FDs become active (have
          data ready to be read or are ready for writing).







                                           LOVELY PROFESSIONAL UNIVERSITY                                   271
   273   274   275   276   277   278   279   280   281   282   283