<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://apache.org/forrest/dtd/document-v12.dtd">
<document><header><title>LPI 101 RPM</title><abstract/><last-modified-content-date date="2005-07-12"/><style>
    .Table134 {
      
    }
  
    .Table134.A {
      
    }
  
    .Table134.A1 {
      
    }
  
    .Table103 {
      
    }
  
    .Table103.A {
      
    }
  
    .Table103.A1 {
      
    }
  
    .Table98 {
      
    }
  
    .Table98.A {
      
    }
  
    .Table98.A1 {
      
    }
  
    .Table98.A2 {
      
    }
  
    .Table99 {
      
    }
  
    .Table99.A {
      
    }
  
    .Table99.A1 {
      
    }
  
    .Table99.A2 {
      
    }
  
    .Table1 {
      
    }
  
    .Table1.A {
      
    }
  
    .Table1.B {
      
    }
  
    .Table1.A1 {
      
    }
  
    .Table1.B1 {
      
    }
  
    .Table1.A2 {
      
    }
  
    .Table1.B2 {
      
    }
  
    .Table1.A3 {
      
    }
  
    .Table1.B3 {
      
    }
  
    .Table95 {
      
    }
  
    .Table95.A {
      
    }
  
    .Table95.A1 {
      
    }
  
    .Table228 {
      
    }
  
    .Table228.A {
      
    }
  
    .Table228.A1 {
      
    }
  
    .Table100 {
      
    }
  
    .Table100.A {
      
    }
  
    .Table100.A1 {
      
    }
  
    .Table100.A2 {
      
    }
  
    .Table220 {
      
    }
  
    .Table220.A {
      
    }
  
    .Table220.A1 {
      
    }
  
    .Table220.A2 {
      
    }
  
    .Table218 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table218.A {
      
    }
  
    .Table218.B {
      
    }
  
    .Table218.A1 {
      
    }
  
    .Table218.B1 {
      
    }
  
    .Table218.A2 {
      
    }
  
    .Table218.B2 {
      
    }
  
    .Table219 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table219.A {
      
    }
  
    .Table219.B {
      
    }
  
    .Table219.A1 {
      
    }
  
    .Table219.B1 {
      
    }
  
    .Table219.A2 {
      
    }
  
    .Table219.B2 {
      
    }
  
    .Table105 {
      
    margin-left: 0cm;
  
    margin-right: 6.394cm;
  
    }
  
    .Table105.A {
      
    }
  
    .Table105.B {
      
    }
  
    .Table105.C {
      
    }
  
    .Table105.A1 {
      
    }
  
    .Table105.C1 {
      
    }
  
    .Table105.A2 {
      
    }
  
    .Table105.C2 {
      
    }
  
    .Table105.C6 {
      
    }
  
    .Table101 {
      
    }
  
    .Table101.A {
      
    }
  
    .Table101.A1 {
      
    }
  
    .Table102 {
      
    }
  
    .Table102.A {
      
    }
  
    .Table102.B {
      
    }
  
    .Table102.A1 {
      
    }
  
    .Table102.A2 {
      
    }
  
    .Table102.B2 {
      
    }
  
    .Table104 {
      
    }
  
    .Table104.A {
      
    }
  
    .Table104.A1 {
      
    }
  
    .Table104.A2 {
      
    }
  
    .Table104.A3 {
      
    }
  
    .Table154 {
      
    }
  
    .Table154.A {
      
    }
  
    .Table154.A1 {
      
    }
  
    .Table154.A2 {
      
    }
  
    .Table154.A3 {
      
    }
  
    .Table155 {
      
    }
  
    .Table155.A {
      
    }
  
    .Table155.A1 {
      
    }
  
    .Table155.A2 {
      
    }
  
    .Table156 {
      
    }
  
    .Table156.A {
      
    }
  
    .Table156.A1 {
      
    }
  
    .Table156.A2 {
      
    }
  
    .Table156.A5 {
      
    }
  
    .Table152 {
      
    }
  
    .Table152.A {
      
    }
  
    .Table152.A1 {
      
    }
  
    .Table152.A2 {
      
    }
  
    .Table152.A8 {
      
    }
  
    .Table153 {
      
    }
  
    .Table153.A {
      
    }
  
    .Table153.A1 {
      
    }
  
    .Table153.A2 {
      
    }
  
    .Table153.A4 {
      
    }
  
    .Table150 {
      
    }
  
    .Table150.A {
      
    }
  
    .Table150.A1 {
      
    }
  
    .Table150.A2 {
      
    }
  
    .Table150.A7 {
      
    }
  
    .Table223 {
      
    }
  
    .Table223.A {
      
    }
  
    .Table223.A1 {
      
    }
  
    .Table223.A2 {
      
    }
  
    .Table223.A7 {
      
    }
  
    .Table224 {
      
    }
  
    .Table224.A {
      
    }
  
    .Table224.A1 {
      
    }
  
    .Table224.A2 {
      
    }
  
    .Table2 {
      
    }
  
    .Table2.A {
      
    }
  
    .Table2.B {
      
    }
  
    .Table2.A1 {
      
    }
  
    .Table2.B1 {
      
    }
  
    .Table2.A2 {
      
    }
  
    .Table2.B2 {
      
    }
  
    .Table225 {
      
    margin-left: 0cm;
  
    margin-right: -0.009cm;
  
    }
  
    .Table225.A {
      
    }
  
    .Table225.B {
      
    }
  
    .Table225.A1 {
      
    }
  
    .Table225.A2 {
      
    }
  
    .Table225.B2 {
      
    }
  
    .Table225.B3 {
      
    }
  
    .Table212 {
      
    margin-left: 0cm;
  
    margin-right: -0.009cm;
  
    }
  
    .Table212.A {
      
    }
  
    .Table212.B {
      
    }
  
    .Table212.A1 {
      
    }
  
    .Table212.B1 {
      
    }
  
    .Table212.A2 {
      
    }
  
    .Table212.B2 {
      
    }
  
    .Table213 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.75cm;
  
    }
  
    .Table213.A {
      
    }
  
    .Table213.A1 {
      
    }
  
    .Table3 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.75cm;
  
    }
  
    .Table3.A {
      
    }
  
    .Table3.A1 {
      
    }
  
    .Table211 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.75cm;
  
    }
  
    .Table211.A {
      
    }
  
    .Table211.A1 {
      
    }
  
    .Table4 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.194cm;
  
    }
  
    .Table4.A {
      
    }
  
    .Table4.A1 {
      
    }
  
    .Table4.A2 {
      
    }
  
    .Table5 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.196cm;
  
    }
  
    .Table5.A {
      
    }
  
    .Table5.A1 {
      
    }
  
    .Table5.A2 {
      
    }
  
    .Table121 {
      
    }
  
    .Table121.A {
      
    }
  
    .Table121.A1 {
      
    }
  
    .Table121.A2 {
      
    }
  
    .Table214 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.75cm;
  
    }
  
    .Table214.A {
      
    }
  
    .Table214.A1 {
      
    }
  
    .Table215 {
      
    }
  
    .Table215.A {
      
    }
  
    .Table215.A1 {
      
    }
  
    .Table215.A2 {
      
    }
  
    .Table216 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.75cm;
  
    }
  
    .Table216.A {
      
    }
  
    .Table216.A1 {
      
    }
  
    .Table217 {
      
    }
  
    .Table217.A {
      
    }
  
    .Table217.A1 {
      
    }
  
    .Table217.A2 {
      
    }
  
    .Table183 {
      
    margin-left: 0cm;
  
    margin-right: -0.009cm;
  
    }
  
    .Table183.A {
      
    }
  
    .Table183.B {
      
    }
  
    .Table183.A1 {
      
    }
  
    .Table183.B1 {
      
    }
  
    .Table183.A2 {
      
    }
  
    .Table183.B2 {
      
    }
  
    .Table178 {
      
    margin-left: 0cm;
  
    margin-right: -0.009cm;
  
    }
  
    .Table178.A {
      
    }
  
    .Table178.B {
      
    }
  
    .Table178.A1 {
      
    }
  
    .Table178.B1 {
      
    }
  
    .Table178.A2 {
      
    }
  
    .Table178.B2 {
      
    }
  
    .Table179 {
      
    margin-left: 0cm;
  
    margin-right: -0.009cm;
  
    }
  
    .Table179.A {
      
    }
  
    .Table179.B {
      
    }
  
    .Table179.A1 {
      
    }
  
    .Table179.B1 {
      
    }
  
    .Table179.A2 {
      
    }
  
    .Table179.B2 {
      
    }
  
    .Table6 {
      
    }
  
    .Table6.A {
      
    }
  
    .Table6.B {
      
    }
  
    .Table6.A1 {
      
    }
  
    .Table6.B1 {
      
    }
  
    .Table6.A2 {
      
    }
  
    .Table6.B2 {
      
    }
  
    .Table6.A7 {
      
    }
  
    .Table6.B7 {
      
    }
  
    .Table7 {
      
    }
  
    .Table7.A {
      
    }
  
    .Table7.B {
      
    }
  
    .Table7.A1 {
      
    }
  
    .Table7.B1 {
      
    }
  
    .Table7.A2 {
      
    }
  
    .Table7.B2 {
      
    }
  
    .Table7.A4 {
      
    }
  
    .Table7.B4 {
      
    }
  
    .Table8 {
      
    margin-left: 0.014cm;
  
    margin-right: 0.03cm;
  
    }
  
    .Table8.A {
      
    }
  
    .Table8.A1 {
      
    }
  
    .Table116 {
      
    }
  
    .Table116.A {
      
    }
  
    .Table116.A1 {
      
    }
  
    .Table116.A2 {
      
    }
  
    .Table117 {
      
    }
  
    .Table117.A {
      
    }
  
    .Table117.A1 {
      
    }
  
    .Table117.A2 {
      
    }
  
    .Table97 {
      
    }
  
    .Table97.A {
      
    }
  
    .Table97.A1 {
      
    }
  
    .Table97.A2 {
      
    }
  
    .Table97.A8 {
      
    }
  
    .Table151 {
      
    margin-left: 0.393cm;
  
    margin-right: 0.864cm;
  
    }
  
    .Table151.A {
      
    }
  
    .Table151.A1 {
      
    }
  
    .Table119 {
      
    }
  
    .Table119.A {
      
    }
  
    .Table119.B {
      
    }
  
    .Table119.A1 {
      
    }
  
    .Table119.A2 {
      
    }
  
    .Table119.B2 {
      
    }
  
    .Table118 {
      
    }
  
    .Table118.A {
      
    }
  
    .Table118.A1 {
      
    }
  
    .Table118.A2 {
      
    }
  
    .Table210 {
      
    }
  
    .Table210.A {
      
    }
  
    .Table210.B {
      
    }
  
    .Table210.A1 {
      
    }
  
    .Table210.B1 {
      
    }
  
    .Table210.A2 {
      
    }
  
    .Table210.B2 {
      
    }
  
    .Table210.B9 {
      
    }
  
    .Table209 {
      
    }
  
    .Table209.A {
      
    }
  
    .Table209.B {
      
    }
  
    .Table209.A1 {
      
    }
  
    .Table209.B1 {
      
    }
  
    .Table209.A2 {
      
    }
  
    .Table209.B2 {
      
    }
  
    .Table208 {
      
    }
  
    .Table208.A {
      
    }
  
    .Table208.B {
      
    }
  
    .Table208.A1 {
      
    }
  
    .Table208.B1 {
      
    }
  
    .Table208.A2 {
      
    }
  
    .Table208.B2 {
      
    }
  
    .Table106 {
      
    }
  
    .Table106.A {
      
    }
  
    .Table106.A1 {
      
    }
  
    .Table236 {
      
    }
  
    .Table236.A {
      
    }
  
    .Table236.A1 {
      
    }
  
    .Table94 {
      
    }
  
    .Table94.A {
      
    }
  
    .Table94.A1 {
      
    }
  
    .Table94.A2 {
      
    }
  
    .Table94.A11 {
      
    }
  
    .Table256 {
      
    }
  
    .Table256.A {
      
    }
  
    .Table256.A1 {
      
    }
  
    .Table256.A2 {
      
    }
  
    .Table256.A3 {
      
    }
  
    .Table9 {
      
    margin-left: 0.037cm;
  
    margin-right: 1.882cm;
  
    }
  
    .Table9.A {
      
    }
  
    .Table9.A1 {
      
    }
  
    .Table10 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.882cm;
  
    }
  
    .Table10.A {
      
    }
  
    .Table10.A1 {
      
    }
  
    .Table120 {
      
    }
  
    .Table120.A {
      
    }
  
    .Table120.A1 {
      
    }
  
    .Table120.A2 {
      
    }
  
    .Table11 {
      
    margin-left: 2.522cm;
  
    margin-right: 0.799cm;
  
    }
  
    .Table11.A {
      
    }
  
    .Table11.B {
      
    }
  
    .Table11.C {
      
    }
  
    .Table11.A1 {
      
    }
  
    .Table11.C1 {
      
    }
  
    .Table11.A2 {
      
    }
  
    .Table11.C2 {
      
    }
  
    .Table11.B4 {
      
    }
  
    .Table12 {
      
    margin-left: 2.524cm;
  
    margin-right: 2.544cm;
  
    }
  
    .Table12.A {
      
    }
  
    .Table12.B {
      
    }
  
    .Table12.C {
      
    }
  
    .Table12.A1 {
      
    }
  
    .Table12.C1 {
      
    }
  
    .Table12.A2 {
      
    }
  
    .Table12.B2 {
      
    }
  
    .Table12.C2 {
      
    }
  
    .Table17 {
      
    }
  
    .Table17.A {
      
    }
  
    .Table17.A1 {
      
    }
  
    .Table180 {
      
    }
  
    .Table180.A {
      
    }
  
    .Table180.A1 {
      
    }
  
    .Table180.A2 {
      
    }
  
    .Table181 {
      
    }
  
    .Table181.A {
      
    }
  
    .Table181.A1 {
      
    }
  
    .Table181.A2 {
      
    }
  
    .Table181.A3 {
      
    }
  
    .Table181.A7 {
      
    }
  
    .Table182 {
      
    }
  
    .Table182.A {
      
    }
  
    .Table182.A1 {
      
    }
  
    .Table182.A2 {
      
    }
  
    .Table182.A10 {
      
    }
  
    .Table13 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.882cm;
  
    }
  
    .Table13.A {
      
    }
  
    .Table13.A1 {
      
    }
  
    .Table14 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.882cm;
  
    }
  
    .Table14.A {
      
    }
  
    .Table14.A1 {
      
    }
  
    .Table15 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.882cm;
  
    }
  
    .Table15.A {
      
    }
  
    .Table15.A1 {
      
    }
  
    .Table237 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.882cm;
  
    }
  
    .Table237.A {
      
    }
  
    .Table237.A1 {
      
    }
  
    .Table205 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table205.A {
      
    }
  
    .Table205.B {
      
    }
  
    .Table205.A1 {
      
    }
  
    .Table205.B1 {
      
    }
  
    .Table205.A2 {
      
    }
  
    .Table205.B2 {
      
    }
  
    .Table206 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table206.A {
      
    }
  
    .Table206.B {
      
    }
  
    .Table206.A1 {
      
    }
  
    .Table206.B1 {
      
    }
  
    .Table206.A2 {
      
    }
  
    .Table206.B2 {
      
    }
  
    .Table207 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table207.A {
      
    }
  
    .Table207.B {
      
    }
  
    .Table207.A1 {
      
    }
  
    .Table207.B1 {
      
    }
  
    .Table207.A2 {
      
    }
  
    .Table207.B2 {
      
    }
  
    .Table123 {
      
    }
  
    .Table123.A {
      
    }
  
    .Table123.B {
      
    }
  
    .Table123.A1 {
      
    }
  
    .Table123.A2 {
      
    }
  
    .Table123.B2 {
      
    }
  
    .Table16 {
      
    margin-left: -0.004cm;
  
    }
  
    .Table16.A {
      
    }
  
    .Table16.A1 {
      
    }
  
    .Table18 {
      
    margin-left: -0.004cm;
  
    }
  
    .Table18.A {
      
    }
  
    .Table18.A1 {
      
    }
  
    .Table86 {
      
    margin-left: -0.004cm;
  
    }
  
    .Table86.A {
      
    }
  
    .Table86.A1 {
      
    }
  
    .Table124 {
      
    margin-left: 0cm;
  
    margin-right: 1.115cm;
  
    }
  
    .Table124.A {
      
    }
  
    .Table124.B {
      
    }
  
    .Table124.A1 {
      
    }
  
    .Table124.B1 {
      
    }
  
    .Table124.A2 {
      
    }
  
    .Table124.B2 {
      
    }
  
    .Table19 {
      
    margin-left: -0.004cm;
  
    }
  
    .Table19.A {
      
    }
  
    .Table19.A1 {
      
    }
  
    .Table20 {
      
    }
  
    .Table20.A {
      
    }
  
    .Table20.B {
      
    }
  
    .Table20.A1 {
      
    }
  
    .Table20.A2 {
      
    }
  
    .Table20.B2 {
      
    }
  
    .Table143 {
      
    }
  
    .Table143.A {
      
    }
  
    .Table143.B {
      
    }
  
    .Table143.A1 {
      
    }
  
    .Table143.B1 {
      
    }
  
    .Table143.A2 {
      
    }
  
    .Table143.B2 {
      
    }
  
    .Table142 {
      
    }
  
    .Table142.A {
      
    }
  
    .Table142.A1 {
      
    }
  
    .Table142.A2 {
      
    }
  
    .Table21 {
      
    margin-left: 0.002cm;
  
    margin-right: 1.051cm;
  
    }
  
    .Table21.A {
      
    }
  
    .Table21.B {
      
    }
  
    .Table21.A1 {
      
    }
  
    .Table21.B1 {
      
    }
  
    .Table21.A2 {
      
    }
  
    .Table21.B2 {
      
    }
  
    .Table22 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.55cm;
  
    }
  
    .Table22.A {
      
    }
  
    .Table22.A1 {
      
    }
  
    .Table144 {
      
    margin-left: 3.18cm;
  
    margin-right: 2.115cm;
  
    }
  
    .Table144.A {
      
    }
  
    .Table144.A1 {
      
    }
  
    .Table144.A2 {
      
    }
  
    .Table27 {
      
    margin-left: 0.032cm;
  
    margin-right: 8.729cm;
  
    }
  
    .Table27.A {
      
    }
  
    .Table27.B {
      
    }
  
    .Table27.A1 {
      
    }
  
    .Table27.A2 {
      
    }
  
    .Table27.B2 {
      
    }
  
    .Table23 {
      
    margin-left: 0.032cm;
  
    margin-right: 1.189cm;
  
    }
  
    .Table23.A {
      
    }
  
    .Table23.A1 {
      
    }
  
    .Table145 {
      
    }
  
    .Table145.A {
      
    }
  
    .Table145.A1 {
      
    }
  
    .Table145.A2 {
      
    }
  
    .Table24 {
      
    margin-left: -0.021cm;
  
    margin-right: 1.215cm;
  
    }
  
    .Table24.A {
      
    }
  
    .Table24.A1 {
      
    }
  
    .Table146 {
      
    }
  
    .Table146.A {
      
    }
  
    .Table146.A1 {
      
    }
  
    .Table146.A2 {
      
    }
  
    .Table25 {
      
    margin-left: 0.032cm;
  
    margin-right: 1.189cm;
  
    }
  
    .Table25.A {
      
    }
  
    .Table25.A1 {
      
    }
  
    .Table147 {
      
    }
  
    .Table147.A {
      
    }
  
    .Table147.A1 {
      
    }
  
    .Table147.A2 {
      
    }
  
    .Table148 {
      
    }
  
    .Table148.A {
      
    }
  
    .Table148.A1 {
      
    }
  
    .Table148.A2 {
      
    }
  
    .Table26 {
      
    margin-left: -0.004cm;
  
    margin-right: 1.198cm;
  
    }
  
    .Table26.A {
      
    }
  
    .Table26.A1 {
      
    }
  
    .Table28 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.427cm;
  
    }
  
    .Table28.A {
      
    }
  
    .Table28.A1 {
      
    }
  
    .Table29 {
      
    margin-left: -0.004cm;
  
    }
  
    .Table29.A {
      
    }
  
    .Table29.A1 {
      
    }
  
    .Table30 {
      
    margin-left: -0.004cm;
  
    }
  
    .Table30.A {
      
    }
  
    .Table30.A1 {
      
    }
  
    .Table31 {
      
    margin-left: -0.004cm;
  
    }
  
    .Table31.A {
      
    }
  
    .Table31.A1 {
      
    }
  
    .Table32 {
      
    margin-left: -0.004cm;
  
    margin-right: 1.489cm;
  
    }
  
    .Table32.A {
      
    }
  
    .Table32.A1 {
      
    }
  
    .Table33 {
      
    margin-left: -0.004cm;
  
    margin-right: 2.203cm;
  
    }
  
    .Table33.A {
      
    }
  
    .Table33.A1 {
      
    }
  
    .Table34 {
      
    margin-left: -0.004cm;
  
    margin-right: 2.23cm;
  
    }
  
    .Table34.A {
      
    }
  
    .Table34.A1 {
      
    }
  
    .Table35 {
      
    margin-left: 1.573cm;
  
    margin-right: 2.214cm;
  
    }
  
    .Table35.A {
      
    }
  
    .Table35.B {
      
    }
  
    .Table35.A1 {
      
    }
  
    .Table35.A2 {
      
    }
  
    .Table35.B2 {
      
    }
  
    .Table36 {
      
    margin-left: -0.004cm;
  
    margin-right: 2.256cm;
  
    }
  
    .Table36.A {
      
    }
  
    .Table36.A1 {
      
    }
  
    .Table37 {
      
    }
  
    .Table37.A {
      
    }
  
    .Table37.A1 {
      
    }
  
    .Table122 {
      
    margin-left: 0cm;
  
    margin-right: -0.005cm;
  
    }
  
    .Table122.A {
      
    }
  
    .Table122.B {
      
    }
  
    .Table122.A1 {
      
    }
  
    .Table122.B1 {
      
    }
  
    .Table122.A2 {
      
    }
  
    .Table122.B2 {
      
    }
  
    .Table149 {
      
    margin-left: -0.004cm;
  
    margin-right: 1.489cm;
  
    }
  
    .Table149.A {
      
    }
  
    .Table149.A1 {
      
    }
  
    .Table229 {
      
    margin-left: 0cm;
  
    margin-right: 2.581cm;
  
    }
  
    .Table229.A {
      
    }
  
    .Table229.B {
      
    }
  
    .Table229.A1 {
      
    }
  
    .Table229.A2 {
      
    }
  
    .Table229.B2 {
      
    }
  
    .Table230 {
      
    }
  
    .Table230.A {
      
    }
  
    .Table230.A1 {
      
    }
  
    .Table231 {
      
    }
  
    .Table231.A {
      
    }
  
    .Table231.A1 {
      
    }
  
    .Table231.A2 {
      
    }
  
    .Table231.A3 {
      
    }
  
    .Table232 {
      
    }
  
    .Table232.A {
      
    }
  
    .Table232.A1 {
      
    }
  
    .Table232.A2 {
      
    }
  
    .Table232.A4 {
      
    }
  
    .Table233 {
      
    }
  
    .Table233.A {
      
    }
  
    .Table233.B {
      
    }
  
    .Table233.A1 {
      
    }
  
    .Table233.A2 {
      
    }
  
    .Table233.B2 {
      
    }
  
    .Table234 {
      
    }
  
    .Table234.A {
      
    }
  
    .Table234.A1 {
      
    }
  
    .Table234.A2 {
      
    }
  
    .Table235 {
      
    }
  
    .Table235.A {
      
    }
  
    .Table235.A1 {
      
    }
  
    .Table235.A2 {
      
    }
  
    .Table222 {
      
    }
  
    .Table222.A {
      
    }
  
    .Table222.B {
      
    }
  
    .Table222.A1 {
      
    }
  
    .Table222.B1 {
      
    }
  
    .Table222.A2 {
      
    }
  
    .Table222.B2 {
      
    }
  
    .Table221 {
      
    }
  
    .Table221.A {
      
    }
  
    .Table221.B {
      
    }
  
    .Table221.A1 {
      
    }
  
    .Table221.B1 {
      
    }
  
    .Table221.A2 {
      
    }
  
    .Table221.B2 {
      
    }
  
    .Table158 {
      
    }
  
    .Table158.A {
      
    }
  
    .Table158.A1 {
      
    }
  
    .Table132 {
      
    }
  
    .Table132.A {
      
    }
  
    .Table132.A1 {
      
    }
  
    .Table38 {
      
    margin-left: -0.016cm;
  
    margin-right: 3.022cm;
  
    }
  
    .Table38.A {
      
    }
  
    .Table38.A1 {
      
    }
  
    .Table39 {
      
    margin-left: 0.011cm;
  
    margin-right: 3.022cm;
  
    }
  
    .Table39.A {
      
    }
  
    .Table39.A1 {
      
    }
  
    .Table40 {
      
    margin-left: 0.011cm;
  
    margin-right: 3.022cm;
  
    }
  
    .Table40.A {
      
    }
  
    .Table40.A1 {
      
    }
  
    .Table133 {
      
    }
  
    .Table133.A {
      
    }
  
    .Table133.B {
      
    }
  
    .Table133.A1 {
      
    }
  
    .Table133.A2 {
      
    }
  
    .Table133.B2 {
      
    }
  
    .Table135 {
      
    }
  
    .Table135.A {
      
    }
  
    .Table135.A1 {
      
    }
  
    .Table41 {
      
    }
  
    .Table41.A {
      
    }
  
    .Table41.B {
      
    }
  
    .Table41.A1 {
      
    }
  
    .Table41.A2 {
      
    }
  
    .Table41.B2 {
      
    }
  
    .Table42 {
      
    margin-left: 0.011cm;
  
    margin-right: 3.022cm;
  
    }
  
    .Table42.A {
      
    }
  
    .Table42.A1 {
      
    }
  
    .Table130 {
      
    margin-left: 2.93cm;
  
    margin-right: 3.593cm;
  
    }
  
    .Table130.A {
      
    }
  
    .Table130.A1 {
      
    }
  
    .Table43 {
      
    }
  
    .Table43.A {
      
    }
  
    .Table43.B {
      
    }
  
    .Table43.A1 {
      
    }
  
    .Table43.A2 {
      
    }
  
    .Table43.B2 {
      
    }
  
    .Table131 {
      
    margin-left: 2.93cm;
  
    margin-right: 4.043cm;
  
    }
  
    .Table131.A {
      
    }
  
    .Table131.A1 {
      
    }
  
    .Table204 {
      
    }
  
    .Table204.A {
      
    }
  
    .Table204.A1 {
      
    }
  
    .Table204.A2 {
      
    }
  
    .Table204.A38 {
      
    }
  
    .Table202 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table202.A {
      
    }
  
    .Table202.B {
      
    }
  
    .Table202.A1 {
      
    }
  
    .Table202.B1 {
      
    }
  
    .Table202.A2 {
      
    }
  
    .Table202.B2 {
      
    }
  
    .Table203 {
      
    }
  
    .Table203.A {
      
    }
  
    .Table203.B {
      
    }
  
    .Table203.A1 {
      
    }
  
    .Table203.B1 {
      
    }
  
    .Table203.A2 {
      
    }
  
    .Table203.B2 {
      
    }
  
    .Table44 {
      
    margin-left: 0.002cm;
  
    margin-right: 1.229cm;
  
    }
  
    .Table44.A {
      
    }
  
    .Table44.A1 {
      
    }
  
    .Table45 {
      
    }
  
    .Table45.A {
      
    }
  
    .Table45.A1 {
      
    }
  
    .Table45.A2 {
      
    }
  
    .Table46 {
      
    }
  
    .Table46.A {
      
    }
  
    .Table46.A1 {
      
    }
  
    .Table46.A2 {
      
    }
  
    .Table47 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.217cm;
  
    }
  
    .Table47.A {
      
    }
  
    .Table47.A1 {
      
    }
  
    .Table48 {
      
    }
  
    .Table48.A {
      
    }
  
    .Table48.A1 {
      
    }
  
    .Table48.A2 {
      
    }
  
    .Table49 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.217cm;
  
    }
  
    .Table49.A {
      
    }
  
    .Table49.A1 {
      
    }
  
    .Table107 {
      
    }
  
    .Table107.A {
      
    }
  
    .Table107.A1 {
      
    }
  
    .Table107.A2 {
      
    }
  
    .Table50 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.482cm;
  
    }
  
    .Table50.A {
      
    }
  
    .Table50.A1 {
      
    }
  
    .Table51 {
      
    margin-left: 0.002cm;
  
    margin-right: 1.415cm;
  
    }
  
    .Table51.A {
      
    }
  
    .Table51.A1 {
      
    }
  
    .Table253 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.194cm;
  
    }
  
    .Table253.A {
      
    }
  
    .Table253.A1 {
      
    }
  
    .Table52 {
      
    margin-left: 0.002cm;
  
    margin-right: 1.468cm;
  
    }
  
    .Table52.A {
      
    }
  
    .Table52.A1 {
      
    }
  
    .Table52.A2 {
      
    }
  
    .Table53 {
      
    margin-left: 0.002cm;
  
    margin-right: 1.203cm;
  
    }
  
    .Table53.A {
      
    }
  
    .Table53.B {
      
    }
  
    .Table53.1 {
      
    }
  
    .Table53.A1 {
      
    }
  
    .Table54 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.194cm;
  
    }
  
    .Table54.A {
      
    }
  
    .Table54.A1 {
      
    }
  
    .Table200 {
      
    margin-left: 0cm;
  
    margin-right: -0.004cm;
  
    }
  
    .Table200.A {
      
    }
  
    .Table200.B {
      
    }
  
    .Table200.A1 {
      
    }
  
    .Table200.B1 {
      
    }
  
    .Table200.A2 {
      
    }
  
    .Table200.B2 {
      
    }
  
    .Table201 {
      
    }
  
    .Table201.A {
      
    }
  
    .Table201.B {
      
    }
  
    .Table201.A1 {
      
    }
  
    .Table201.B1 {
      
    }
  
    .Table201.A2 {
      
    }
  
    .Table201.B2 {
      
    }
  
    .Table126 {
      
    }
  
    .Table126.A {
      
    }
  
    .Table126.A1 {
      
    }
  
    .Table126.A2 {
      
    }
  
    .Table126.A3 {
      
    }
  
    .Table128 {
      
    }
  
    .Table128.A {
      
    }
  
    .Table128.A1 {
      
    }
  
    .Table129 {
      
    }
  
    .Table129.A {
      
    }
  
    .Table129.A1 {
      
    }
  
    .Table127 {
      
    }
  
    .Table127.A {
      
    }
  
    .Table127.A1 {
      
    }
  
    .Table55 {
      
    margin-left: -0.004cm;
  
    margin-right: 1.208cm;
  
    }
  
    .Table55.A {
      
    }
  
    .Table55.A1 {
      
    }
  
    .Table140 {
      
    margin-left: -0.004cm;
  
    margin-right: 1.208cm;
  
    }
  
    .Table140.A {
      
    }
  
    .Table140.A1 {
      
    }
  
    .Table56 {
      
    margin-left: 0.037cm;
  
    margin-right: 1.274cm;
  
    }
  
    .Table56.A {
      
    }
  
    .Table56.A1 {
      
    }
  
    .Table57 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.3cm;
  
    }
  
    .Table57.A {
      
    }
  
    .Table57.A1 {
      
    }
  
    .Table58 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.353cm;
  
    }
  
    .Table58.A {
      
    }
  
    .Table58.A1 {
      
    }
  
    .Table59 {
      
    margin-left: -0.004cm;
  
    margin-right: 8.273cm;
  
    }
  
    .Table59.A {
      
    }
  
    .Table59.B {
      
    }
  
    .Table59.1 {
      
    }
  
    .Table59.A1 {
      
    }
  
    .Table59.B1 {
      
    }
  
    .Table59.A2 {
      
    }
  
    .Table59.B2 {
      
    }
  
    .Table59.3 {
      
    }
  
    .Table198 {
      
    }
  
    .Table198.A {
      
    }
  
    .Table198.A1 {
      
    }
  
    .Table198.A2 {
      
    }
  
    .Table198.A3 {
      
    }
  
    .Table60 {
      
    margin-left: 0.011cm;
  
    margin-right: 9.661cm;
  
    }
  
    .Table60.A {
      
    }
  
    .Table60.A1 {
      
    }
  
    .Table61 {
      
    margin-left: -0.004cm;
  
    margin-right: 9.648cm;
  
    }
  
    .Table61.A {
      
    }
  
    .Table61.A1 {
      
    }
  
    .Table62 {
      
    margin-left: -0.004cm;
  
    margin-right: 9.252cm;
  
    }
  
    .Table62.A {
      
    }
  
    .Table62.A1 {
      
    }
  
    .Table63 {
      
    margin-left: -0.004cm;
  
    margin-right: 2.081cm;
  
    }
  
    .Table63.A {
      
    }
  
    .Table63.A1 {
      
    }
  
    .Table64 {
      
    margin-left: 0.014cm;
  
    margin-right: 1.164cm;
  
    }
  
    .Table64.A {
      
    }
  
    .Table64.A1 {
      
    }
  
    .Table65 {
      
    margin-left: -0.004cm;
  
    margin-right: 1.182cm;
  
    }
  
    .Table65.A {
      
    }
  
    .Table65.A1 {
      
    }
  
    .Table199 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table199.A {
      
    }
  
    .Table199.B {
      
    }
  
    .Table199.A1 {
      
    }
  
    .Table199.B1 {
      
    }
  
    .Table199.A2 {
      
    }
  
    .Table199.B2 {
      
    }
  
    .Table139 {
      
    }
  
    .Table139.A {
      
    }
  
    .Table139.A1 {
      
    }
  
    .Table139.A2 {
      
    }
  
    .Table139.A5 {
      
    }
  
    .Table66 {
      
    margin-left: -0.016cm;
  
    margin-right: 1.3cm;
  
    }
  
    .Table66.A {
      
    }
  
    .Table66.A1 {
      
    }
  
    .Table67 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.326cm;
  
    }
  
    .Table67.A {
      
    }
  
    .Table67.A1 {
      
    }
  
    .Table68 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.3cm;
  
    }
  
    .Table68.A {
      
    }
  
    .Table68.A1 {
      
    }
  
    .Table69 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.326cm;
  
    }
  
    .Table69.A {
      
    }
  
    .Table69.A1 {
      
    }
  
    .Table70 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.353cm;
  
    }
  
    .Table70.A {
      
    }
  
    .Table70.A1 {
      
    }
  
    .Table71 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.274cm;
  
    }
  
    .Table71.A {
      
    }
  
    .Table71.A1 {
      
    }
  
    .Table72 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.274cm;
  
    }
  
    .Table72.A {
      
    }
  
    .Table72.A1 {
      
    }
  
    .Table157 {
      
    }
  
    .Table157.A {
      
    }
  
    .Table157.A1 {
      
    }
  
    .Table157.A2 {
      
    }
  
    .Table157.A5 {
      
    }
  
    .Table136 {
      
    }
  
    .Table136.A {
      
    }
  
    .Table136.A1 {
      
    }
  
    .Table137 {
      
    }
  
    .Table137.A {
      
    }
  
    .Table137.A1 {
      
    }
  
    .Table137.A2 {
      
    }
  
    .Table165 {
      
    }
  
    .Table165.A {
      
    }
  
    .Table165.A1 {
      
    }
  
    .Table166 {
      
    }
  
    .Table166.A {
      
    }
  
    .Table166.A1 {
      
    }
  
    .Table167 {
      
    margin-left: 0cm;
  
    margin-right: 0.067cm;
  
    }
  
    .Table167.A {
      
    }
  
    .Table167.B {
      
    }
  
    .Table167.C {
      
    }
  
    .Table167.D {
      
    }
  
    .Table167.A1 {
      
    }
  
    .Table167.D1 {
      
    }
  
    .Table167.A2 {
      
    }
  
    .Table167.D2 {
      
    }
  
    .Table169 {
      
    }
  
    .Table169.A {
      
    }
  
    .Table169.A1 {
      
    }
  
    .Table169.A2 {
      
    }
  
    .Table169.A6 {
      
    }
  
    .Table168 {
      
    }
  
    .Table168.A {
      
    }
  
    .Table168.A1 {
      
    }
  
    .Table168.A2 {
      
    }
  
    .Table170 {
      
    }
  
    .Table170.A {
      
    }
  
    .Table170.A1 {
      
    }
  
    .Table171 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table171.A {
      
    }
  
    .Table171.B {
      
    }
  
    .Table171.C {
      
    }
  
    .Table171.A1 {
      
    }
  
    .Table171.C1 {
      
    }
  
    .Table171.A2 {
      
    }
  
    .Table171.C2 {
      
    }
  
    .Table172 {
      
    }
  
    .Table172.A {
      
    }
  
    .Table172.A1 {
      
    }
  
    .Table173 {
      
    }
  
    .Table173.A {
      
    }
  
    .Table173.A1 {
      
    }
  
    .Table174 {
      
    }
  
    .Table174.A {
      
    }
  
    .Table174.D {
      
    }
  
    .Table174.A1 {
      
    }
  
    .Table174.D1 {
      
    }
  
    .Table174.A2 {
      
    }
  
    .Table174.B2 {
      
    }
  
    .Table174.D2 {
      
    }
  
    .Table175 {
      
    }
  
    .Table175.A {
      
    }
  
    .Table175.A1 {
      
    }
  
    .Table175.A2 {
      
    }
  
    .Table176 {
      
    }
  
    .Table176.A {
      
    }
  
    .Table176.A1 {
      
    }
  
    .Table176.A2 {
      
    }
  
    .Table177 {
      
    }
  
    .Table177.A {
      
    }
  
    .Table177.A1 {
      
    }
  
    .Table177.A2 {
      
    }
  
    .Table257 {
      
    }
  
    .Table257.A {
      
    }
  
    .Table257.A1 {
      
    }
  
    .Table73 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.3cm;
  
    }
  
    .Table73.A {
      
    }
  
    .Table73.A1 {
      
    }
  
    .Table74 {
      
    margin-left: 0.011cm;
  
    margin-right: 1.459cm;
  
    }
  
    .Table74.A {
      
    }
  
    .Table74.B {
      
    }
  
    .Table74.C {
      
    }
  
    .Table74.A1 {
      
    }
  
    .Table74.C1 {
      
    }
  
    .Table74.A2 {
      
    }
  
    .Table74.C2 {
      
    }
  
    .Table125 {
      
    }
  
    .Table125.A {
      
    }
  
    .Table125.B {
      
    }
  
    .Table125.A1 {
      
    }
  
    .Table125.B1 {
      
    }
  
    .Table125.A2 {
      
    }
  
    .Table125.B2 {
      
    }
  
    .Table78 {
      
    margin-left: 1.08cm;
  
    margin-right: 7.93cm;
  
    }
  
    .Table78.A {
      
    }
  
    .Table78.B {
      
    }
  
    .Table78.A1 {
      
    }
  
    .Table78.B1 {
      
    }
  
    .Table78.A2 {
      
    }
  
    .Table78.B2 {
      
    }
  
    .Table75 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table75.A {
      
    }
  
    .Table75.A1 {
      
    }
  
    .Table76 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table76.A {
      
    }
  
    .Table76.A1 {
      
    }
  
    .Table77 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.03cm;
  
    }
  
    .Table77.A {
      
    }
  
    .Table77.A1 {
      
    }
  
    .Table164 {
      
    }
  
    .Table164.A {
      
    }
  
    .Table164.A1 {
      
    }
  
    .Table163 {
      
    }
  
    .Table163.A {
      
    }
  
    .Table163.A1 {
      
    }
  
    .Table163.A2 {
      
    }
  
    .Table191 {
      
    }
  
    .Table191.A {
      
    }
  
    .Table191.A1 {
      
    }
  
    .Table192 {
      
    }
  
    .Table192.A {
      
    }
  
    .Table192.A1 {
      
    }
  
    .Table193 {
      
    }
  
    .Table193.A {
      
    }
  
    .Table193.A1 {
      
    }
  
    .Table194 {
      
    }
  
    .Table194.A {
      
    }
  
    .Table194.B {
      
    }
  
    .Table194.A1 {
      
    }
  
    .Table194.B1 {
      
    }
  
    .Table194.A2 {
      
    }
  
    .Table194.B2 {
      
    }
  
    .Table194.A6 {
      
    }
  
    .Table141 {
      
    }
  
    .Table141.A {
      
    }
  
    .Table141.A1 {
      
    }
  
    .Table141.A2 {
      
    }
  
    .Table79 {
      
    }
  
    .Table79.A {
      
    }
  
    .Table79.A1 {
      
    }
  
    .Table80 {
      
    }
  
    .Table80.A {
      
    }
  
    .Table80.A1 {
      
    }
  
    .Table81 {
      
    }
  
    .Table81.A {
      
    }
  
    .Table81.A1 {
      
    }
  
    .Table82 {
      
    }
  
    .Table82.A {
      
    }
  
    .Table82.A1 {
      
    }
  
    .Table83 {
      
    }
  
    .Table83.A {
      
    }
  
    .Table83.A1 {
      
    }
  
    .Table238 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table238.A {
      
    }
  
    .Table238.B {
      
    }
  
    .Table238.A1 {
      
    }
  
    .Table238.B1 {
      
    }
  
    .Table238.A2 {
      
    }
  
    .Table238.B2 {
      
    }
  
    .Table238.A6 {
      
    }
  
    .Table239 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table239.A {
      
    }
  
    .Table239.B {
      
    }
  
    .Table239.A1 {
      
    }
  
    .Table239.B1 {
      
    }
  
    .Table239.A2 {
      
    }
  
    .Table239.B2 {
      
    }
  
    .Table240 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table240.A {
      
    }
  
    .Table240.B {
      
    }
  
    .Table240.A1 {
      
    }
  
    .Table240.B1 {
      
    }
  
    .Table240.A2 {
      
    }
  
    .Table240.B2 {
      
    }
  
    .Table241 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table241.A {
      
    }
  
    .Table241.B {
      
    }
  
    .Table241.A1 {
      
    }
  
    .Table241.B1 {
      
    }
  
    .Table241.A2 {
      
    }
  
    .Table241.B2 {
      
    }
  
    .Table242 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table242.A {
      
    }
  
    .Table242.A1 {
      
    }
  
    .Table243 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table243.A {
      
    }
  
    .Table243.A1 {
      
    }
  
    .Table244 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table244.A {
      
    }
  
    .Table244.A1 {
      
    }
  
    .Table245 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table245.A {
      
    }
  
    .Table245.A1 {
      
    }
  
    .Table246 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table246.A {
      
    }
  
    .Table246.B {
      
    }
  
    .Table246.A1 {
      
    }
  
    .Table246.B1 {
      
    }
  
    .Table246.A2 {
      
    }
  
    .Table246.B2 {
      
    }
  
    .Table247 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table247.A {
      
    }
  
    .Table247.A1 {
      
    }
  
    .Table248 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table248.A {
      
    }
  
    .Table248.A1 {
      
    }
  
    .Table249 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table249.A {
      
    }
  
    .Table249.B {
      
    }
  
    .Table249.A1 {
      
    }
  
    .Table249.B1 {
      
    }
  
    .Table249.A2 {
      
    }
  
    .Table249.B2 {
      
    }
  
    .Table250 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table250.A {
      
    }
  
    .Table250.B {
      
    }
  
    .Table250.A1 {
      
    }
  
    .Table250.B1 {
      
    }
  
    .Table250.A2 {
      
    }
  
    .Table250.B2 {
      
    }
  
    .Table251 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table251.A {
      
    }
  
    .Table251.A1 {
      
    }
  
    .Table252 {
      
    margin-left: 0.037cm;
  
    margin-right: 0.056cm;
  
    }
  
    .Table252.A {
      
    }
  
    .Table252.A1 {
      
    }
  
    .Table254 {
      
    }
  
    .Table254.A {
      
    }
  
    .Table254.A1 {
      
    }
  
    .Table255 {
      
    }
  
    .Table255.A {
      
    }
  
    .Table255.A1 {
      
    }
  
    .Table190 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table190.A {
      
    }
  
    .Table190.B {
      
    }
  
    .Table190.A1 {
      
    }
  
    .Table190.B1 {
      
    }
  
    .Table190.A2 {
      
    }
  
    .Table190.B2 {
      
    }
  
    .Table195 {
      
    margin-left: 0cm;
  
    margin-right: -0.012cm;
  
    }
  
    .Table195.A {
      
    }
  
    .Table195.B {
      
    }
  
    .Table195.A1 {
      
    }
  
    .Table195.B1 {
      
    }
  
    .Table195.A2 {
      
    }
  
    .Table195.B2 {
      
    }
  
    .Table196 {
      
    }
  
    .Table196.A {
      
    }
  
    .Table196.B {
      
    }
  
    .Table196.A1 {
      
    }
  
    .Table196.B1 {
      
    }
  
    .Table196.A2 {
      
    }
  
    .Table196.B2 {
      
    }
  
    .Table85 {
      
    margin-left: 0.005cm;
  
    margin-right: 1.744cm;
  
    }
  
    .Table85.A {
      
    }
  
    .Table85.B {
      
    }
  
    .Table85.1 {
      
    }
  
    .Table85.A1 {
      
    }
  
    .Table85.B1 {
      
    }
  
    .Table85.2 {
      
    }
  
    .Table85.A2 {
      
    }
  
    .Table85.B2 {
      
    }
  
    .Table138 {
      
    margin-left: 0.005cm;
  
    margin-right: 1.744cm;
  
    }
  
    .Table138.A {
      
    }
  
    .Table138.B {
      
    }
  
    .Table138.1 {
      
    }
  
    .Table138.A1 {
      
    }
  
    .Table138.B1 {
      
    }
  
    .Table138.A2 {
      
    }
  
    .Table138.B2 {
      
    }
  
    .Table87 {
      
    margin-left: 0.014cm;
  
    }
  
    .Table87.A {
      
    }
  
    .Table87.A1 {
      
    }
  
    .Table88 {
      
    margin-left: -0.004cm;
  
    margin-right: 1.833cm;
  
    }
  
    .Table88.A {
      
    }
  
    .Table88.B {
      
    }
  
    .Table88.A1 {
      
    }
  
    .Table88.B1 {
      
    }
  
    .Table88.A2 {
      
    }
  
    .Table88.B2 {
      
    }
  
    .Table84 {
      
    }
  
    .Table84.A {
      
    }
  
    .Table84.A1 {
      
    }
  
    .Table84.A2 {
      
    }
  
    .Table89 {
      
    }
  
    .Table89.A {
      
    }
  
    .Table89.A1 {
      
    }
  
    .Table89.A2 {
      
    }
  
    .Table96 {
      
    }
  
    .Table96.A {
      
    }
  
    .Table96.A1 {
      
    }
  
    .Table96.A2 {
      
    }
  
    .Table226 {
      
    }
  
    .Table226.A {
      
    }
  
    .Table226.B {
      
    }
  
    .Table226.A1 {
      
    }
  
    .Table226.B1 {
      
    }
  
    .Table226.A2 {
      
    }
  
    .Table226.B2 {
      
    }
  
    .Table90 {
      
    margin-left: 0.032cm;
  
    margin-right: 0.87cm;
  
    }
  
    .Table90.A {
      
    }
  
    .Table90.B {
      
    }
  
    .Table90.A1 {
      
    }
  
    .Table90.B1 {
      
    }
  
    .Table90.A2 {
      
    }
  
    .Table90.B2 {
      
    }
  
    .Table91 {
      
    }
  
    .Table91.A {
      
    }
  
    .Table91.B {
      
    }
  
    .Table91.A1 {
      
    }
  
    .Table91.B1 {
      
    }
  
    .Table91.A2 {
      
    }
  
    .Table91.B2 {
      
    }
  
    .Table93 {
      
    margin-left: 0.032cm;
  
    margin-right: 0.102cm;
  
    }
  
    .Table93.A {
      
    }
  
    .Table93.B {
      
    }
  
    .Table93.A1 {
      
    }
  
    .Table93.B1 {
      
    }
  
    .Table93.A2 {
      
    }
  
    .Table93.B2 {
      
    }
  
    .Table189 {
      
    }
  
    .Table189.A {
      
    }
  
    .Table189.B {
      
    }
  
    .Table189.A1 {
      
    }
  
    .Table189.B1 {
      
    }
  
    .Table189.A2 {
      
    }
  
    .Table189.B2 {
      
    }
  
    .Table92 {
      
    }
  
    .Table92.A {
      
    }
  
    .Table92.A1 {
      
    }
  
    .Table92.A2 {
      
    }
  
    .Table109 {
      
    }
  
    .Table109.A {
      
    }
  
    .Table109.A1 {
      
    }
  
    .Table109.A2 {
      
    }
  
    .Table110 {
      
    }
  
    .Table110.A {
      
    }
  
    .Table110.A1 {
      
    }
  
    .Table110.A2 {
      
    }
  
    .Table108 {
      
    }
  
    .Table108.A {
      
    }
  
    .Table108.A1 {
      
    }
  
    .Table159 {
      
    }
  
    .Table159.A {
      
    }
  
    .Table159.A1 {
      
    }
  
    .Table160 {
      
    }
  
    .Table160.A {
      
    }
  
    .Table160.A1 {
      
    }
  
    .Table161 {
      
    }
  
    .Table161.A {
      
    }
  
    .Table161.A1 {
      
    }
  
    .Table161.A2 {
      
    }
  
    .Table162 {
      
    }
  
    .Table162.A {
      
    }
  
    .Table162.A1 {
      
    }
  
    .Table162.A2 {
      
    }
  
    .Table162.A3 {
      
    }
  
    .Table227 {
      
    }
  
    .Table227.A {
      
    }
  
    .Table227.A1 {
      
    }
  
    .Table227.A2 {
      
    }
  
    .Table111 {
      
    }
  
    .Table111.A {
      
    }
  
    .Table111.A1 {
      
    }
  
    .Table111.A2 {
      
    }
  
    .Table112 {
      
    }
  
    .Table112.A {
      
    }
  
    .Table112.A1 {
      
    }
  
    .Table112.A2 {
      
    }
  
    .Table112.A3 {
      
    }
  
    .Table112.A40 {
      
    }
  
    .Table112.A63 {
      
    }
  
    .Table113 {
      
    }
  
    .Table113.A {
      
    }
  
    .Table113.A1 {
      
    }
  
    .Table113.A2 {
      
    }
  
    .Table113.A3 {
      
    }
  
    .Table113.A17 {
      
    }
  
    .Table114 {
      
    }
  
    .Table114.A {
      
    }
  
    .Table114.A1 {
      
    }
  
    .Table114.A2 {
      
    }
  
    .Table114.A21 {
      
    }
  
    .Table115 {
      
    }
  
    .Table115.A {
      
    }
  
    .Table115.A1 {
      
    }
  
    .Table115.A2 {
      
    }
  
    .Table115.A17 {
      
    }
  
    .Table184 {
      
    }
  
    .Table184.A {
      
    }
  
    .Table184.B {
      
    }
  
    .Table184.A1 {
      
    }
  
    .Table184.B1 {
      
    }
  
    .Table184.A2 {
      
    }
  
    .Table184.B2 {
      
    }
  
    .Table184.B3 {
      
    }
  
    .Table186 {
      
    }
  
    .Table186.A {
      
    }
  
    .Table186.B {
      
    }
  
    .Table186.A1 {
      
    }
  
    .Table186.B1 {
      
    }
  
    .Table186.A2 {
      
    }
  
    .Table186.B2 {
      
    }
  
    .Table185 {
      
    }
  
    .Table185.A {
      
    }
  
    .Table185.B {
      
    }
  
    .Table185.A1 {
      
    }
  
    .Table185.B1 {
      
    }
  
    .Table185.A2 {
      
    }
  
    .Table185.B2 {
      
    }
  
    .Table187 {
      
    }
  
    .Table187.A {
      
    }
  
    .Table187.B {
      
    }
  
    .Table187.A1 {
      
    }
  
    .Table187.B1 {
      
    }
  
    .Table187.A2 {
      
    }
  
    .Table187.B2 {
      
    }
  
    .Table187.B3 {
      
    }
  
    .Table188 {
      
    }
  
    .Table188.A {
      
    }
  
    .Table188.B {
      
    }
  
    .Table188.A1 {
      
    }
  
    .Table188.B1 {
      
    }
  
    .Table188.A2 {
      
    }
  
    .Table188.B2 {
      
    }
  
    .P1 {
      
    }
  
    .P2 {
      
    }
  
    .P3 {
      
    font-weight: bold;
  
    font-size: 18pt;
  
    }
  
    .P4 {
      
    font-weight: bold;
  
    font-size: 22pt;
  
    }
  
    .P5 {
      
    font-size: 20pt;
  
    }
  
    .P6 {
      
    font-weight: bold;
  
    font-size: 26pt;
  
    }
  
    .P7 {
      
    font-weight: bold;
  
    font-size: 14pt;
  
    }
  
    .P8 {
      
    font-weight: bold;
  
    font-size: 15pt;
  
    }
  
    .P9 {
      
    }
  
    .P10 {
      
    font-weight: bold;
  
    }
  
    .P11 {
      
    font-weight: bold;
  
    font-size: 16pt;
  
    }
  
    .P12 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    }
  
    .P13 {
      
    }
  
    .P14 {
      
    margin-top: 0cm;
  
    margin-bottom: 0.499cm;
  
    }
  
    .P15 {
      
    font-size: 10pt;
  
    }
  
    .P16 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .P17 {
      
    font-style: normal;
  
    font-size: 14pt;
  
    }
  
    .P18 {
      
    }
  
    .P19 {
      
    }
  
    .P20 {
      
    }
  
    .P21 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P22 {
      
    text-decoration: underline;
  
    color: #000000;
  
    }
  
    .P23 {
      
    color: #000000;
  
    }
  
    .P24 {
      
    font-weight: normal;
  
    font-family: Times New Roman1;
  
    }
  
    .P25 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-family: Courier New2;
  
    }
  
    .P26 {
      
    font-weight: normal;
  
    font-family: Courier New2;
  
    }
  
    .P27 {
      
    }
  
    .P28 {
      
    }
  
    .P29 {
      
    }
  
    .P30 {
      
    font-size: 13pt;
  
    }
  
    .P31 {
      
    }
  
    .P32 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P33 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    font-family: Arial;
  
    }
  
    .P34 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    }
  
    .P35 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P36 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P37 {
      
    font-size: 10pt;
  
    }
  
    .P38 {
      
    font-size: 10pt;
  
    }
  
    .P39 {
      
    }
  
    .P40 {
      
    font-size: 10pt;
  
    }
  
    .P41 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P42 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P43 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P44 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P45 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P46 {
      
    margin-left: 0cm;
  
    margin-right: -0.079cm;
  
    }
  
    .P47 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P48 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -0.053cm;
  
    }
  
    .P49 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P50 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P51 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P52 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P53 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -0.079cm;
  
    }
  
    .P54 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.323cm;
  
    }
  
    .P55 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P56 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P57 {
      
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P58 {
      
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P59 {
      
    font-size: 9pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P60 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P61 {
      
    font-size: 8pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P62 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P63 {
      
    font-size: 9pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P64 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P65 {
      
    font-weight: normal;
  
    font-size: 9pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P66 {
      
    font-size: 6pt;
  
    }
  
    .P67 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P68 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0cm;
  
    margin-right: 0.026cm;
  
    }
  
    .P69 {
      
    }
  
    .P70 {
      
    font-size: 9pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P71 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P72 {
      
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P73 {
      
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P74 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P75 {
      
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P76 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.323cm;
  
    }
  
    .P77 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: -1.849cm;
  
    }
  
    .P78 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P79 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P80 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P81 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P82 {
      
    }
  
    .P83 {
      
    font-weight: normal;
  
    }
  
    .P84 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P85 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P86 {
      
    font-style: italic;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P87 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P88 {
      
    font-style: italic;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P89 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P90 {
      
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P91 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P92 {
      
    font-size: 8pt;
  
    }
  
    .P93 {
      
    text-decoration: underline;
  
    }
  
    .P94 {
      
    font-size: 9pt;
  
    }
  
    .P95 {
      
    font-weight: bold;
  
    }
  
    .P96 {
      
    }
  
    .P97 {
      
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P98 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P99 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P100 {
      
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P101 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.499cm;
  
    margin-right: 0cm;
  
    }
  
    .P102 {
      
    margin-left: 0.499cm;
  
    margin-right: 0cm;
  
    }
  
    .P103 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.499cm;
  
    margin-right: 0cm;
  
    }
  
    .P104 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.529cm;
  
    margin-right: 0cm;
  
    }
  
    .P105 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.529cm;
  
    margin-right: 0cm;
  
    }
  
    .P106 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.529cm;
  
    margin-right: 0cm;
  
    }
  
    .P107 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.499cm;
  
    margin-right: 0cm;
  
    }
  
    .P108 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.499cm;
  
    margin-right: 0cm;
  
    }
  
    .P109 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P110 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.499cm;
  
    margin-right: 0cm;
  
    }
  
    .P111 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0.499cm;
  
    margin-right: 0cm;
  
    }
  
    .P112 {
      
    }
  
    .P113 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P114 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P115 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P116 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P117 {
      
    margin-left: 1.27cm;
  
    margin-right: 2.514cm;
  
    }
  
    .P118 {
      
    }
  
    .P119 {
      
    }
  
    .P120 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 2.514cm;
  
    }
  
    .P121 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 2.514cm;
  
    }
  
    .P122 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P123 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P124 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P125 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P126 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    }
  
    .P127 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P128 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P129 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P130 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Helvetica1;
  
    }
  
    .P131 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P132 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P133 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P134 {
      
    font-size: 10pt;
  
    font-family: Helvetica1;
  
    }
  
    .P135 {
      
    font-size: 10pt;
  
    font-family: Courier;
  
    }
  
    .P136 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier;
  
    }
  
    .P137 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P138 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier;
  
    color: #000000;
  
    }
  
    .P139 {
      
    color: #000000;
  
    }
  
    .P140 {
      
    color: #000000;
  
    margin-top: 0cm;
  
    margin-bottom: 0.499cm;
  
    }
  
    .P141 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P142 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P143 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P144 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P145 {
      
    }
  
    .P146 {
      
    }
  
    .P147 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P148 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P149 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P150 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P151 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P152 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P153 {
      
    font-size: 10pt;
  
    }
  
    .P154 {
      
    }
  
    .P155 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P156 {
      
    }
  
    .P157 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P158 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P159 {
      
    }
  
    .P160 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P161 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P162 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P163 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P164 {
      
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P165 {
      
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P166 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P167 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P168 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P169 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P170 {
      
    }
  
    .P171 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P172 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P173 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P174 {
      
    margin-left: 0cm;
  
    margin-right: 1.111cm;
  
    }
  
    .P175 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.111cm;
  
    }
  
    .P176 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P177 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.746cm;
  
    }
  
    .P178 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.746cm;
  
    }
  
    .P179 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.746cm;
  
    }
  
    .P180 {
      
    }
  
    .P181 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P182 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P183 {
      
    }
  
    .P184 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P185 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0cm;
  
    margin-right: 1.111cm;
  
    }
  
    .P186 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P187 {
      
    font-weight: bold;
  
    }
  
    .P188 {
      
    font-style: normal;
  
    }
  
    .P189 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P190 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P191 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P192 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P193 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P194 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P195 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P196 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P197 {
      
    font-weight: normal;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P198 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P199 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    }
  
    .P200 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    }
  
    .P201 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.111cm;
  
    }
  
    .P202 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P203 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P204 {
      
    font-weight: normal;
  
    text-decoration: underline;
  
    }
  
    .P205 {
      
    font-weight: normal;
  
    font-family: Courier New2;
  
    text-decoration: underline;
  
    }
  
    .P206 {
      
    }
  
    .P207 {
      
    font-size: 10pt;
  
    }
  
    .P208 {
      
    font-size: 10pt;
  
    text-decoration: underline;
  
    }
  
    .P209 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .P210 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P211 {
      
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P212 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P213 {
      
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P214 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P215 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P216 {
      
    font-size: 10pt;
  
    }
  
    .P217 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P218 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P219 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P220 {
      
    margin-left: 1.296cm;
  
    margin-right: 2.487cm;
  
    }
  
    .P221 {
      
    }
  
    .P222 {
      
    }
  
    .P223 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.296cm;
  
    margin-right: 2.487cm;
  
    }
  
    .P224 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 2.514cm;
  
    }
  
    .P225 {
      
    font-size: 10pt;
  
    margin-left: 0cm;
  
    margin-right: 2.514cm;
  
    }
  
    .P226 {
      
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P227 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P228 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P229 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P230 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P231 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P232 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P233 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P234 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P235 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P236 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P237 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P238 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P239 {
      
    margin-left: 0.106cm;
  
    margin-right: 0.079cm;
  
    }
  
    .P240 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: 0cm;
  
    }
  
    .P241 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P242 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P243 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: 0cm;
  
    }
  
    .P244 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P245 {
      
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P246 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P247 {
      
    margin-left: 0cm;
  
    margin-right: -1.224cm;
  
    }
  
    .P248 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.224cm;
  
    }
  
    .P249 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.224cm;
  
    }
  
    .P250 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P251 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: -1.224cm;
  
    }
  
    .P252 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: -1.224cm;
  
    }
  
    .P253 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: -1.224cm;
  
    }
  
    .P254 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: -1.224cm;
  
    }
  
    .P255 {
      
    margin-left: 0.106cm;
  
    margin-right: -1.224cm;
  
    }
  
    .P256 {
      
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P257 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P258 {
      
    font-size: 10pt;
  
    margin-left: 0cm;
  
    margin-right: 0.767cm;
  
    }
  
    .P259 {
      
    font-size: 10pt;
  
    margin-left: 0cm;
  
    margin-right: 0.767cm;
  
    }
  
    .P260 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.767cm;
  
    }
  
    .P261 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Helvetica1;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P262 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P263 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P264 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P265 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P266 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.767cm;
  
    }
  
    .P267 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.767cm;
  
    }
  
    .P268 {
      
    margin-left: 0cm;
  
    margin-right: 0.767cm;
  
    }
  
    .P269 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P270 {
      
    }
  
    .P271 {
      
    margin-left: 2.54cm;
  
    margin-right: 0cm;
  
    }
  
    .P272 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P273 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P274 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P275 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.794cm;
  
    }
  
    .P276 {
      
    }
  
    .P277 {
      
    margin-left: 0cm;
  
    margin-right: 0.688cm;
  
    }
  
    .P278 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.688cm;
  
    }
  
    .P279 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P280 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P281 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P282 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P283 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P284 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P285 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P286 {
      
    margin-left: 0cm;
  
    margin-right: 0.767cm;
  
    }
  
    .P287 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.767cm;
  
    }
  
    .P288 {
      
    margin-left: 0cm;
  
    margin-right: 0.794cm;
  
    }
  
    .P289 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.794cm;
  
    }
  
    .P290 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.794cm;
  
    }
  
    .P291 {
      
    }
  
    .P292 {
      
    }
  
    .P293 {
      
    font-size: 10pt;
  
    }
  
    .P294 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P295 {
      
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P296 {
      
    font-size: 10pt;
  
    }
  
    .P297 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P298 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P299 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P300 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P301 {
      
    }
  
    .P302 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P303 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 3.969cm;
  
    }
  
    .P304 {
      
    font-size: 10pt;
  
    }
  
    .P305 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P306 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P307 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P308 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P309 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P310 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P311 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P312 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P313 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P314 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P315 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P316 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P317 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P318 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P319 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P320 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .P321 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .P322 {
      
    font-style: italic;
  
    font-family: Arial;
  
    }
  
    .P323 {
      
    margin-left: 0cm;
  
    margin-right: 0.635cm;
  
    }
  
    .P324 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.635cm;
  
    }
  
    .P325 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P326 {
      
    margin-left: 0cm;
  
    margin-right: 0.661cm;
  
    }
  
    .P327 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.661cm;
  
    }
  
    .P328 {
      
    font-size: 10pt;
  
    text-decoration: underline;
  
    }
  
    .P329 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P330 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P331 {
      
    margin-left: 0cm;
  
    margin-right: 0.688cm;
  
    }
  
    .P332 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.688cm;
  
    }
  
    .P333 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.688cm;
  
    }
  
    .P334 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P335 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P336 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P337 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P338 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P339 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P340 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P341 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P342 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P343 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P344 {
      
    font-family: Courier New2;
  
    }
  
    .P345 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P346 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P347 {
      
    }
  
    .P348 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P349 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P350 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P351 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P352 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P353 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P354 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P355 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.185cm;
  
    margin-right: -0.005cm;
  
    }
  
    .P356 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 2.032cm;
  
    margin-right: 0cm;
  
    }
  
    .P357 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P358 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P359 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: -0.005cm;
  
    margin-right: -0.217cm;
  
    }
  
    .P360 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: -0.005cm;
  
    margin-right: 1.741cm;
  
    }
  
    .P361 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P362 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P363 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P364 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P365 {
      
    font-weight: bold;
  
    font-family: Courier New2;
  
    }
  
    .P366 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P367 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P368 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P369 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P370 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P371 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P372 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P373 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P374 {
      
    }
  
    .P375 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P376 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P377 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    text-decoration: underline;
  
    }
  
    .P378 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P379 {
      
    font-family: Arial;
  
    }
  
    .P380 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P381 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P382 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P383 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P384 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P385 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P386 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: -0.026cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P387 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: -0.026cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P388 {
      
    margin-left: -0.026cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P389 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.026cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P390 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.106cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P391 {
      
    margin-left: 1.27cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P392 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 1.27cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P393 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P394 {
      
    font-size: 8pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P395 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P396 {
      
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P397 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P398 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P399 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P400 {
      
    font-size: 10pt;
  
    }
  
    .P401 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0cm;
  
    margin-right: 0.106cm;
  
    }
  
    .P402 {
      
    }
  
    .P403 {
      
    }
  
    .P404 {
      
    }
  
    .P405 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P406 {
      
    font-weight: bold;
  
    font-family: Arial;
  
    }
  
    .P407 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.984cm;
  
    margin-right: 1.455cm;
  
    }
  
    .P408 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.455cm;
  
    }
  
    .P409 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.984cm;
  
    margin-right: 1.455cm;
  
    }
  
    .P410 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P411 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P412 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P413 {
      
    font-style: italic;
  
    }
  
    .P414 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P415 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P416 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P417 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P418 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P419 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P420 {
      
    font-size: 10pt;
  
    }
  
    .P421 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P422 {
      
    font-size: 8pt;
  
    }
  
    .P423 {
      
    font-size: 8pt;
  
    font-family: Courier New1;
  
    }
  
    .P424 {
      
    font-style: italic;
  
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P425 {
      
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P426 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P427 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P428 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P429 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P430 {
      
    font-weight: bold;
  
    font-size: 7pt;
  
    font-family: Arial;
  
    }
  
    .P431 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P432 {
      
    font-weight: bold;
  
    }
  
    .P433 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P434 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P435 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P436 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P437 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    margin-left: 0cm;
  
    margin-right: 1.229cm;
  
    }
  
    .P438 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P439 {
      
    font-size: 10pt;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P440 {
      
    font-size: 10pt;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P441 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P442 {
      
    font-size: 10pt;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P443 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P444 {
      
    font-size: 10pt;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P445 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P446 {
      
    font-size: 10pt;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P447 {
      
    font-size: 10pt;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P448 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P449 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P450 {
      
    font-size: 10pt;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P451 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P452 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P453 {
      
    font-size: 10pt;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P454 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: -0.026cm;
  
    }
  
    .P455 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P456 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P457 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P458 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P459 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P460 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P461 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P462 {
      
    }
  
    .P463 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P464 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P465 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P466 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P467 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P468 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P469 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P470 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P471 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P472 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P473 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P474 {
      
    }
  
    .P475 {
      
    font-size: 10pt;
  
    }
  
    .P476 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P477 {
      
    font-size: 10pt;
  
    }
  
    .P478 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P479 {
      
    font-size: 10pt;
  
    font-family: Helvetica1;
  
    }
  
    .P480 {
      
    font-family: Arial;
  
    }
  
    .P481 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P482 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P483 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P484 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P485 {
      
    font-size: 10pt;
  
    }
  
    .P486 {
      
    font-size: 10pt;
  
    }
  
    .P487 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.635cm;
  
    margin-right: 0cm;
  
    }
  
    .P488 {
      
    margin-left: 0.635cm;
  
    margin-right: 0cm;
  
    }
  
    .P489 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0.635cm;
  
    margin-right: 0cm;
  
    }
  
    .P490 {
      
    margin-left: 0.635cm;
  
    margin-right: 0cm;
  
    }
  
    .P491 {
      
    font-size: 10pt;
  
    }
  
    .P492 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P493 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0.499cm;
  
    margin-right: 0cm;
  
    }
  
    .P494 {
      
    }
  
    .P495 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P496 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P497 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 3.969cm;
  
    }
  
    .P498 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P499 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P500 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P501 {
      
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P502 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P503 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P504 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P505 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 1.323cm;
  
    margin-right: 0cm;
  
    }
  
    .P506 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P507 {
      
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P508 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P509 {
      
    font-style: normal;
  
    }
  
    .P510 {
      
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P511 {
      
    font-style: italic;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P512 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P513 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P514 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P515 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P516 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P517 {
      
    font-weight: bold;
  
    font-family: Courier New2;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P518 {
      
    font-size: 6pt;
  
    }
  
    .P519 {
      
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P520 {
      
    font-size: 10pt;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P521 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P522 {
      
    margin-left: 0.053cm;
  
    margin-right: 1.217cm;
  
    }
  
    .P523 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0.053cm;
  
    margin-right: 1.217cm;
  
    }
  
    .P524 {
      
    font-weight: bold;
  
    }
  
    .P525 {
      
    margin-left: 0.053cm;
  
    margin-right: 1.27cm;
  
    }
  
    .P526 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0.053cm;
  
    margin-right: 1.27cm;
  
    }
  
    .P527 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P528 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P529 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P530 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P531 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P532 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P533 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P534 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P535 {
      
    font-family: Courier New2;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P536 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P537 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P538 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P539 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    margin-left: 0.053cm;
  
    margin-right: 0cm;
  
    }
  
    .P540 {
      
    font-size: 10pt;
  
    }
  
    .P541 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P542 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P543 {
      
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P544 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P545 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P546 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P547 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P548 {
      
    font-size: 10pt;
  
    }
  
    .P549 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P550 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P551 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P552 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P553 {
      
    }
  
    .P554 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P555 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P556 {
      
    margin-left: 0cm;
  
    margin-right: 1.508cm;
  
    }
  
    .P557 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.508cm;
  
    }
  
    .P558 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.508cm;
  
    }
  
    .P559 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P560 {
      
    margin-left: 0cm;
  
    margin-right: 1.561cm;
  
    }
  
    .P561 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.561cm;
  
    }
  
    .P562 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.926cm;
  
    }
  
    .P563 {
      
    margin-left: 0cm;
  
    margin-right: 0.926cm;
  
    }
  
    .P564 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    margin-left: 0cm;
  
    margin-right: 0.926cm;
  
    }
  
    .P565 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P566 {
      
    font-size: 10pt;
  
    }
  
    .P567 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P568 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P569 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P570 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P571 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P572 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P573 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P574 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P575 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P576 {
      
    }
  
    .P577 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P578 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 3.969cm;
  
    }
  
    .P579 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 3.969cm;
  
    }
  
    .P580 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P581 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P582 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P583 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P584 {
      
    margin-left: 0cm;
  
    margin-right: 1.244cm;
  
    }
  
    .P585 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.244cm;
  
    }
  
    .P586 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P587 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P588 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P589 {
      
    }
  
    .P590 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P591 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P592 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P593 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P594 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P595 {
      
    margin-left: 0cm;
  
    margin-right: 1.402cm;
  
    }
  
    .P596 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.402cm;
  
    }
  
    .P597 {
      
    margin-left: 0cm;
  
    margin-right: 1.429cm;
  
    }
  
    .P598 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P599 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P600 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P601 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P602 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P603 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P604 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.429cm;
  
    }
  
    .P605 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P606 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.429cm;
  
    }
  
    .P607 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P608 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P609 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P610 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P611 {
      
    margin-left: 0cm;
  
    margin-right: 1.27cm;
  
    }
  
    .P612 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.27cm;
  
    }
  
    .P613 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P614 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P615 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P616 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P617 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P618 {
      
    margin-left: 0cm;
  
    margin-right: 1.191cm;
  
    }
  
    .P619 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.191cm;
  
    }
  
    .P620 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P621 {
      
    font-size: 10pt;
  
    font-family: Helvetica1;
  
    }
  
    .P622 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P623 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P624 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P625 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P626 {
      
    font-size: 6pt;
  
    font-family: Arial;
  
    }
  
    .P627 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P628 {
      
    font-size: 7pt;
  
    font-family: Arial;
  
    }
  
    .P629 {
      
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P630 {
      
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P631 {
      
    font-size: 6pt;
  
    font-family: Arial;
  
    }
  
    .P632 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P633 {
      
    font-weight: normal;
  
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P634 {
      
    font-weight: normal;
  
    font-size: 6pt;
  
    font-family: Arial;
  
    }
  
    .P635 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P636 {
      
    font-weight: normal;
  
    font-size: 6pt;
  
    font-family: Courier New2;
  
    }
  
    .P637 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P638 {
      
    }
  
    .P639 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P640 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P641 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.217cm;
  
    }
  
    .P642 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P643 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.27cm;
  
    }
  
    .P644 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.244cm;
  
    }
  
    .P645 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P646 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    color: #000000;
  
    }
  
    .P647 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P648 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P649 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P650 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P651 {
      
    font-family: Bitstream Vera Sans;
  
    }
  
    .P652 {
      
    font-size: 10pt;
  
    font-family: Bitstream Vera Sans;
  
    }
  
    .P653 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.27cm;
  
    }
  
    .P654 {
      
    margin-left: 0cm;
  
    margin-right: 1.27cm;
  
    }
  
    .P655 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.296cm;
  
    }
  
    .P656 {
      
    margin-left: 0cm;
  
    margin-right: 1.296cm;
  
    }
  
    .P657 {
      
    font-size: 10pt;
  
    font-family: Helvetica1;
  
    }
  
    .P658 {
      
    font-size: 9pt;
  
    font-family: Arial;
  
    }
  
    .P659 {
      
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P660 {
      
    font-family: Helvetica1;
  
    }
  
    .P661 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P662 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P663 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P664 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P665 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P666 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P667 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P668 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P669 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P670 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    }
  
    .P671 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P672 {
      
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P673 {
      
    font-family: Arial;
  
    }
  
    .P674 {
      
    font-size: 10pt;
  
    font-family: Courier;
  
    }
  
    .P675 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P676 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P677 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P678 {
      
    font-weight: bold;
  
    margin-top: 0cm;
  
    margin-bottom: 0.499cm;
  
    }
  
    .P679 {
      
    margin-top: 0cm;
  
    margin-bottom: 0.499cm;
  
    }
  
    .P680 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P681 {
      
    font-weight: bold;
  
    }
  
    .P682 {
      
    font-weight: bold;
  
    }
  
    .P683 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P684 {
      
    font-weight: bold;
  
    }
  
    .P685 {
      
    font-weight: bold;
  
    font-style: italic;
  
    margin-top: 0cm;
  
    margin-bottom: 0.499cm;
  
    }
  
    .P686 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 1.27cm;
  
    margin-right: 0cm;
  
    }
  
    .P687 {
      
    }
  
    .P688 {
      
    font-family: Courier New1;
  
    }
  
    .P689 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P690 {
      
    font-weight: normal;
  
    }
  
    .P691 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P692 {
      
    font-family: Courier New2;
  
    }
  
    .P693 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P694 {
      
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P695 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P696 {
      
    }
  
    .P697 {
      
    }
  
    .P698 {
      
    }
  
    .P699 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P700 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P701 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P702 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P703 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P704 {
      
    margin-left: 0cm;
  
    margin-right: 1.799cm;
  
    }
  
    .P705 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.799cm;
  
    }
  
    .P706 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P707 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P708 {
      
    margin-left: 0cm;
  
    margin-right: 1.746cm;
  
    }
  
    .P709 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    margin-left: 0cm;
  
    margin-right: 1.746cm;
  
    }
  
    .P710 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 1.746cm;
  
    }
  
    .P711 {
      
    margin-left: 0cm;
  
    margin-right: 1.746cm;
  
    }
  
    .P712 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .P713 {
      
    }
  
    .P714 {
      
    font-weight: normal;
  
    font-size: 12pt;
  
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P715 {
      
    }
  
    .P716 {
      
    }
  
    .P717 {
      
    font-weight: bold;
  
    }
  
    .P718 {
      
    font-weight: bold;
  
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .P719 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .P720 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P721 {
      
    font-size: 10pt;
  
    }
  
    .P722 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P723 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P724 {
      
    font-weight: bold;
  
    }
  
    .P725 {
      
    }
  
    .P726 {
      
    text-decoration: underline;
  
    }
  
    .P727 {
      
    font-weight: bold;
  
    }
  
    .P728 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P729 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P730 {
      
    font-weight: bold;
  
    }
  
    .P731 {
      
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P732 {
      
    font-family: Arial;
  
    margin-left: 0cm;
  
    margin-right: 0.053cm;
  
    }
  
    .P733 {
      
    font-weight: bold;
  
    font-style: italic;
  
    }
  
    .P734 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P735 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-family: Arial;
  
    }
  
    .P736 {
      
    font-size: 10pt;
  
    font-family: Helvetica1;
  
    }
  
    .P737 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P738 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P739 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P740 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P741 {
      
    }
  
    .P742 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .P743 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P744 {
      
    font-size: 6pt;
  
    font-family: Arial;
  
    }
  
    .P745 {
      
    font-size: 6pt;
  
    font-family: Arial;
  
    }
  
    .P746 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P747 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P748 {
      
    }
  
    .P749 {
      
    font-size: 6pt;
  
    font-family: Arial;
  
    }
  
    .P750 {
      
    }
  
    .P751 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P752 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P753 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P754 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P755 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P756 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P757 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P758 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P759 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .P760 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    }
  
    .P761 {
      
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    }
  
    .P762 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P763 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P764 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P765 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .P766 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    text-decoration: underline;
  
    }
  
    .P767 {
      
    font-size: 8pt;
  
    font-family: Courier New1;
  
    }
  
    .P768 {
      
    font-size: 8pt;
  
    font-family: Courier New1;
  
    }
  
    .P769 {
      
    font-size: 10pt;
  
    }
  
    .P770 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P771 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    text-decoration: underline;
  
    }
  
    .P772 {
      
    font-size: 8pt;
  
    font-family: Courier New2;
  
    }
  
    .P773 {
      
    font-size: 10pt;
  
    text-decoration: underline;
  
    }
  
    .P774 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    }
  
    .P775 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P776 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P777 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P778 {
      
    font-weight: normal;
  
    font-size: 8pt;
  
    }
  
    .P779 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P780 {
      
    font-weight: bold;
  
    font-size: 11pt;
  
    font-family: Arial;
  
    }
  
    .P781 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P782 {
      
    }
  
    .P783 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    }
  
    .P784 {
      
    font-size: 10pt;
  
    }
  
    .P785 {
      
    margin-top: 0cm;
  
    margin-bottom: 0cm;
  
    }
  
    .P786 {
      
    }
  
    .P787 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .P788 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .P789 {
      
    }
  
    .P790 {
      
    }
  
    .P791 {
      
    }
  
    .P792 {
      
    }
  
    .T1 {
      
    color: #000000;
  
    }
  
    .T2 {
      
    color: #000000;
  
    }
  
    .T3 {
      
    font-weight: normal;
  
    text-decoration: underline;
  
    color: #000000;
  
    }
  
    .T4 {
      
    text-decoration: underline;
  
    color: #000000;
  
    }
  
    .T5 {
      
    font-family: Arial;
  
    }
  
    .T6 {
      
    font-family: Arial;
  
    }
  
    .T7 {
      
    font-weight: bold;
  
    }
  
    .T8 {
      
    font-weight: normal;
  
    }
  
    .T9 {
      
    font-weight: bold;
  
    font-family: Arial;
  
    }
  
    .T10 {
      
    font-weight: normal;
  
    font-family: Arial;
  
    }
  
    .T11 {
      
    font-weight: normal;
  
    font-family: Times New Roman1;
  
    }
  
    .T12 {
      
    font-weight: normal;
  
    font-family: Courier New2;
  
    }
  
    .T13 {
      
    font-family: Courier New2;
  
    }
  
    .T14 {
      
    font-weight: normal;
  
    font-size: 12pt;
  
    font-family: Courier New2;
  
    }
  
    .T15 {
      
    font-size: 12pt;
  
    font-family: Courier New2;
  
    }
  
    .T16 {
      
    font-style: italic;
  
    }
  
    .T17 {
      
    font-style: normal;
  
    }
  
    .T18 {
      
    font-weight: bold;
  
    font-style: normal;
  
    }
  
    .T19 {
      
    font-weight: normal;
  
    font-style: normal;
  
    }
  
    .T20 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T21 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T22 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    color: #000000;
  
    }
  
    .T23 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T24 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T25 {
      
    font-family: Courier New1;
  
    }
  
    .T26 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T27 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T28 {
      
    font-size: 10pt;
  
    }
  
    .T29 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T30 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T31 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T32 {
      
    }
  
    .T33 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T34 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T35 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T36 {
      
    font-weight: normal;
  
    color: #000000;
  
    }
  
    .T37 {
      
    font-weight: normal;
  
    }
  
    .T38 {
      
    font-size: 8pt;
  
    }
  
    .T39 {
      
    font-weight: bold;
  
    }
  
    .T40 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T41 {
      
    font-weight: bold;
  
    font-style: italic;
  
    }
  
    .T42 {
      
    font-weight: normal;
  
    font-style: italic;
  
    }
  
    .T43 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T44 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T45 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T46 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T47 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T48 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T49 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T50 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T51 {
      
    text-decoration: underline;
  
    }
  
    .T52 {
      
    font-style: italic;
  
    text-decoration: underline;
  
    }
  
    .T53 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T54 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T55 {
      
    font-weight: bold;
  
    }
  
    .T56 {
      
    }
  
    .T57 {
      
    font-weight: bold;
  
    font-family: Arial;
  
    }
  
    .T58 {
      
    font-weight: normal;
  
    font-family: Arial;
  
    }
  
    .T59 {
      
    font-weight: normal;
  
    font-family: Courier New1;
  
    }
  
    .T60 {
      
    font-family: Arial;
  
    }
  
    .T61 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T62 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T63 {
      
    font-family: Times New Roman1;
  
    }
  
    .T64 {
      
    font-size: 10pt;
  
    font-family: Courier;
  
    }
  
    .T65 {
      
    font-family: Courier;
  
    }
  
    .T66 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T67 {
      
    font-weight: normal;
  
    }
  
    .T68 {
      
    }
  
    .T69 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T70 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T71 {
      
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    }
  
    .T72 {
      
    font-family: Arial;
  
    }
  
    .T73 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T74 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T75 {
      
    font-style: italic;
  
    }
  
    .T76 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T77 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T78 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T79 {
      
    font-weight: normal;
  
    text-decoration: underline;
  
    }
  
    .T80 {
      
    font-weight: normal;
  
    font-style: italic;
  
    text-decoration: underline;
  
    }
  
    .T81 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T82 {
      
    font-size: 10pt;
  
    font-family: Wingdings;
  
    }
  
    .T83 {
      
    font-weight: bold;
  
    text-decoration: underline;
  
    }
  
    .T84 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .T85 {
      
    font-weight: bold;
  
    }
  
    .T86 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T87 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T88 {
      
    }
  
    .T89 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T90 {
      
    font-family: Arial;
  
    }
  
    .T91 {
      
    font-weight: bold;
  
    font-family: Arial;
  
    }
  
    .T92 {
      
    font-weight: normal;
  
    font-family: Arial;
  
    }
  
    .T93 {
      
    font-weight: normal;
  
    font-family: Courier;
  
    }
  
    .T94 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T95 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T96 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T97 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T98 {
      
    }
  
    .T99 {
      
    font-family: Courier New1;
  
    }
  
    .T100 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T101 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T102 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T103 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T104 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T105 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T106 {
      
    }
  
    .T107 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T108 {
      
    font-family: Wingdings 2;
  
    }
  
    .T109 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T110 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T111 {
      
    font-size: 10pt;
  
    }
  
    .T112 {
      
    font-size: 10pt;
  
    }
  
    .T113 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T114 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T115 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T116 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T117 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    }
  
    .T118 {
      
    font-weight: normal;
  
    }
  
    .T119 {
      
    font-weight: bold;
  
    }
  
    .T120 {
      
    font-size: 10pt;
  
    }
  
    .T121 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    text-decoration: underline;
  
    }
  
    .T122 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    text-decoration: underline;
  
    }
  
    .T123 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    text-decoration: underline;
  
    }
  
    .T124 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    text-decoration: underline;
  
    }
  
    .T125 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T126 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T127 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T128 {
      
    font-weight: bold;
  
    font-family: Arial;
  
    }
  
    .T129 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T130 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T131 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T132 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T133 {
      
    font-weight: bold;
  
    font-family: Courier New2;
  
    }
  
    .T134 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T135 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T136 {
      
    font-size: 10pt;
  
    font-family: Helvetica1;
  
    }
  
    .T137 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T138 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .T139 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    }
  
    .T140 {
      
    font-family: Courier New2;
  
    }
  
    .T141 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T142 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T143 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T144 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T145 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T146 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T147 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T148 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T149 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T150 {
      
    font-size: 8pt;
  
    font-family: Arial;
  
    }
  
    .T151 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T152 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T153 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T154 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T155 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T156 {
      
    font-size: 10pt;
  
    }
  
    .T157 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T158 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T159 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T160 {
      
    font-family: Courier New2;
  
    }
  
    .T161 {
      
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T162 {
      
    font-style: italic;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T163 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T164 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T165 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T166 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    color: #000000;
  
    }
  
    .T167 {
      
    font-weight: bold;
  
    font-family: Courier New1;
  
    }
  
    .T168 {
      
    font-style: italic;
  
    font-family: Courier New1;
  
    }
  
    .T169 {
      
    font-size: 10pt;
  
    }
  
    .T170 {
      
    font-size: 10pt;
  
    }
  
    .T171 {
      
    font-weight: normal;
  
    }
  
    .T172 {
      
    font-weight: bold;
  
    }
  
    .T173 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T174 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T175 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Courier New2;
  
    }
  
    .T176 {
      
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T177 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T178 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    }
  
    .T179 {
      
    font-style: normal;
  
    font-family: Courier New2;
  
    }
  
    .T180 {
      
    font-size: 10pt;
  
    font-family: Courier;
  
    }
  
    .T181 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Courier;
  
    }
  
    .T182 {
      
    font-style: italic;
  
    }
  
    .T183 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    color: #000000;
  
    }
  
    .T184 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T185 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T186 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T187 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T188 {
      
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T189 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T190 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T191 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T192 {
      
    font-weight: bold;
  
    font-size: 12pt;
  
    }
  
    .T193 {
      
    font-size: 10pt;
  
    font-family: Wingdings 2;
  
    }
  
    .T194 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T195 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T196 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T197 {
      
    font-style: italic;
  
    font-family: Arial;
  
    }
  
    .T198 {
      
    font-weight: bold;
  
    font-style: normal;
  
    font-family: Arial;
  
    }
  
    .T199 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-family: Arial;
  
    }
  
    .T200 {
      
    font-weight: normal;
  
    font-style: normal;
  
    font-family: Arial;
  
    }
  
    .T201 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T202 {
      
    font-weight: normal;
  
    font-family: Courier;
  
    }
  
    .T203 {
      
    font-weight: bold;
  
    }
  
    .T204 {
      
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T205 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T206 {
      
    font-weight: bold;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T207 {
      
    font-weight: normal;
  
    font-style: italic;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T208 {
      
    font-weight: bold;
  
    font-style: italic;
  
    }
  
    .T209 {
      
    font-size: 11pt;
  
    font-family: Times New Roman1;
  
    }
  
    .T210 {
      
    font-size: 11pt;
  
    font-family: Times New Roman1;
  
    }
  
    .T211 {
      
    font-weight: bold;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T212 {
      
    font-family: Courier New1;
  
    }
  
    .T213 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T214 {
      
    font-size: 10pt;
  
    font-family: Courier New1;
  
    }
  
    .T215 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    }
  
    .T216 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    }
  
    .T217 {
      
    font-family: Courier New2;
  
    }
  
    .T218 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Bitstream Vera Sans Mono1;
  
    }
  
    .T219 {
      
    text-decoration: underline;
  
    }
  
    .T220 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T221 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T222 {
      
    font-weight: bold;
  
    text-decoration: underline;
  
    }
  
    .T223 {
      
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    }
  
    .T224 {
      
    font-weight: bold;
  
    font-size: 10pt;
  
    font-family: Times New Roman1;
  
    }
  
    .T225 {
      
    font-weight: normal;
  
    font-size: 10pt;
  
    font-family: Arial;
  
    text-decoration: underline;
  
    }
  
    .T226 {
      
    font-size: 10pt;
  
    font-family: Arial;
  
    }
  
    .T227 {
      
    font-size: 10pt;
  
    }
  
    .fr1 {
      
    }
  
    .fr2 {
      
    }
  
    .fr3 {
      
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .fr4 {
      
    margin-left: 0.319cm;
  
    margin-right: 0.319cm;
  
    }
  
    .fr5 {
      
    margin-left: 0.319cm;
  
    margin-right: 0.319cm;
  
    }
  
    .fr6 {
      
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .fr7 {
      
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .fr8 {
      
    margin-left: 0cm;
  
    margin-right: 0cm;
  
    }
  
    .Sect1 {
      
    }
  
    .Sect2 {
      
    }
  
    .Sect3 {
      
    }
  
    .gr1 {
      
    }
  
    .gr2 {
      
    }
  
    .gr3 {
      
    }
  
    .gr4 {
      
    }
  
    .gr5 {
      
    }
  
    .gr6 {
      
    }
  
    .gr7 {
      
    }
  
    .gr8 {
      
    }
  
    .gr9 {
      
    }
  
    .gr10 {
      
    }
  
    .gr11 {
      
    }
  
    .gr12 {
      
    }
  
    .gr13 {
      
    }
  
    .gr14 {
      
    }
  
    .gr15 {
      
    }
  
    .gr16 {
      
    }
  
    .gr17 {
      
    }
  
    .gr18 {
      
    }
  
    .gr19 {
      
    }
  
    .gr20 {
      
    }
  
    .gr21 {
      
    }
  
    .gr22 {
      
    }
  
    .gr23 {
      
    }
  
    .gr24 {
      
    }
  
    .gr25 {
      
    }
  
    .gr26 {
      
    }
  
    .gr27 {
      
    }
  
    .gr28 {
      
    }
  
    .gr29 {
      
    }
  
    .gr30 {
      
    }
  
    .gr31 {
      
    }
  
    .gr32 {
      
    }
  
    .gr33 {
      
    }
  
    .gr34 {
      
    }
  
    .gr35 {
      
    }
  
    .gr36 {
      
    }
  
    .gr37 {
      
    }
  
    .gr38 {
      
    }
  
    .gr39 {
      
    }
  
    .gr40 {
      
    }
  
    .gr41 {
      
    }
  
    .gr42 {
      
    }
  
    .gr43 {
      
    }
  
    .gr44 {
      
    }
  
    .gr45 {
      
    }
  </style></header><body><p class="P1"/><p class="Standard"/><p class="instruction"/><p class="P3"/><p class="P4">Study Guide for </p><p class="instruction"/><p class="P5"/><p class="P5"/><p class="P5"/><p class="P6">Linux System Administration 1 </p><p class="P7"/><p class="P8">Lab work for LPI 101 </p><p class="P9"/><p class="P9">version 0.2</p><p class="P9"/><p class="instruction"/><p class="instruction"/><p class="instruction"/><p class="P10">released under the GFDL by LinuxIT</p><p class="instruction"/><p class="instruction"/><p class="instruction"/><p class="instruction"/><p class="instruction"/><p class="instruction"><img alt="Graphic150" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000201000005AF0000028D79A14D17.png"/></p><p class="instruction"/><p class="instruction"/><p class="P11"/><p class="P11"/><p class="P11"/><p class="P11"/><p class="P11"/><p class="P12"/><p class="P12"/><p class="P13"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Preformatted Text">Copyright (c) 2005 LinuxIT.</p><p class="Preformatted Text">Permission is granted to copy, distribute and/or modify this document</p><p class="Preformatted Text">under the terms of the GNU Free Documentation License, Version 1.2</p><p class="Preformatted Text">or any later version published by the Free Software Foundation;</p><p class="P14">with the Invariant Sections being History, Acknowledgements, with the Front-Cover Texts being &#8220;released under the GFDL by LinuxIT&#8221;.</p><p class="P15"/><p class="P15"/><p class="P16">see full license agreement on p.164</p><p class="P13"/><section class="Introduction:"><title>Introduction:</title><section class="Acknowledgments"><title>Acknowledgments</title><p class="Standard">The original material was made available by LinuxIT's technical training centre <link title="" href="http://www.linuxit.com/">www.linuxit.com</link><span class="T2">.</span> Many thanks to Andrew Meredith for suggesting the idea in the first place. A special thanks to all the students who have helped dilute the technical aspects of Linux administration through their many questions, this has led to the inclusion of more illustrations attempting to introduce concepts in a user friendly way. Finally, many thanks to Paul McEnery for the technical advice and for starting off some of the most difficult chapters such as the ones covering the X server (101), modems (102) and the Linux kernel (102).</p><p class="Standard"/><p class="Standard">The manual is available online at <link title="" href="http://savannah.nongnu.org/projects/lpi-manuals/">http://savannah.nongnu.org/projects/lpi-manuals/. Thank you to the Savannah Volunteers for assessing the project and providing us with the Web space. </link></p></section><section class="History"><title>History</title><p class="Standard">First release (version 0.0) October 2003. Reviewed by Adrian Thomasset.</p><p class="Standard">Revised January 2004 after review by Andrew Meredith.</p><p class="Standard">November 2004. Section on expansion cards added in 'Hardware Configuration' chapter by Adrian Thomasset</p><p class="Standard">December 2004. Index and mapped objectives added by Adrian Thomasset.</p><p class="Standard">January 2005. Glossary of terms, command and file review added at end of chapters by Adrian Thomasset </p><p class="Standard">June 2005. Added new entries in line with recommendations from Sernet LATP process, by Andrew Meredith with additional text supplied by Andrew D Marshall and review by Adrian Thomasset. Section on Debian tools supplied by Duncan Thomson.</p></section><section class="Dramatis Personi"><title>Dramatis Personi</title><p class="Standard">Adrian Thomasset&lt;<link title="" href="mailto:adriant@linuxit.com">adriant@linuxit.com</link>&gt;http://www.linuxit.com/</p><p class="Standard">Andrew Meredith&lt;<link title="" href="mailto:andrew@anvil.org">andrew@anvil.org</link>&gt;http://www.anvil.org/</p><p class="Standard">Andrew D Marchall&lt;<link title="" href="mailto:admarshall@gmail.com">admarshall@gmail.com</link>&gt;<link title="" href="http://h0lug.sourceforge.net/">http://h0lug.sourceforge.net/</link></p><p class="P14"><span class="T5">Duncan Thomson&lt;</span><link title="" href="mailto:thom-ci0@paisley.ac.uk">thom-ci0@paisley.ac.uk</link><span class="T5">&gt;http://www.paisley.ac.uk/</span></p></section><section class="Goals"><title>Goals</title><p class="Standard">This manuals primary aim is to provide explanations, examples and exercises for those preparing for the Linux Professional Institute (LPI) Certification Programme 1 (LPIC-1), Exam 101.</p><p class="Standard"/><p class="Standard">Three core sources of criteria guide this manual to its primary goals:</p><ol><li><p class="P19">The LPI's Exam-101 "Objectives".</p></li><li><p class="P19">Its LPI-Approved Training Materials (LATM) criteria.</p></li><li><p class="P19">The Linux Documentation Project (LDP or TLDP) Author Guide (AG).</p><p class="P19"/></li></ol><p class="Standard">The LPI's Exam-101 Objectives and LATM criteria are summarized below. The Objectives are also online at:<br/><br/><link title="" href="http://www.lpi.org/en/obj_101.html">http://www.lpi.org/en/obj_101.html</link></p><p class="Standard"/><p class="Standard">The LDP Author Guide [<link title="" href="http://www.tldp.org/LDP/LDP-Author-Guide/">http://www.tldp.org/LDP/LDP-Author-Guide/</link>] provides a consistent, comprehensive set of guidelines for those wanting to publish HOWTOs, Tutorials and Manuals via the world's largest GNU/Linux documentation system, the LDP.</p><p class="Standard"/><p class="Standard">This manual adopts as its second prime objective, on equal footing with its first, the LDP Author Guide's challenge to prospective LDP authors, "to massage all of the raw data into a readable, entertaining and understandable whole." [LDP-AG, 4.1. Writing the Text]</p><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/></section><section class="Intended Training Schedules "><title>Intended Training Schedules </title><p class="Standard">The content herein is designed to accompany practical courses preparing for the LPI 101 exam of the LPIC-1 programme. While this material was generally structured to work with a course of 24-32 hours in consecutive 8-hour sessions, it is modularized to also work for shorter or longer sessions, consecutive or otherwise.</p></section><section class="Intended Audience &amp; Prerequisites"><title>Intended Audience &amp; Prerequisites</title><p class="Standard">This manual's material assumes its users will already have:<br/></p><ol><li><p class="P20">Extensive experience (several years) using Intel x86 computers, including a strong knowledge of hardware components and their interaction with basic operating system (OS) components.<br/></p></li><li><p class="P20">A general knowledge of computing and networking basics such as binary and hexadecimal maths, common units of measure (bytes, KB vs Kb, Mhz, etc), file-system structures, Ethernet and Internet networking operations and hardware, etc.<br/></p></li><li><p class="P20">More than three cumulative months of practical experience using a GNU/Linux, BSD or Unix OS, logged in and working at the command-line (in a text terminal or console) either locally or remotely. </p></li></ol><p class="Standard"/><p class="Standard">Those with less experience, however, should not be discouraged from using this manual, if (and only if) they are willing to spend extra time catching up on the prerequisite background skills and knowledge; a challenging task, but not an impossible one.</p><p class="Standard"/><p class="Standard">Further references and examples are provided for the various uses of commands, as well as exercises and accompanying answers demonstrating exam-like problem-solving. All are optional with those most recommended either discussed or referenced in the manual's body.</p></section><section class="The LPI Certification Program"><title>The LPI Certification Program</title><p class="Standard">There are currently two LPI certification levels. The first level LPIC-1 is granted after passing both exams LPI 101 and LPI 102. Similarly passing the LPI 201 and LPI 202 exams will grant the second level certification LPIC-2.</p><p class="Standard"/><p class="Standard">There are no certification pre-requisites for LPI 101 and 102. However the exams for LPIC-2 can only be attempted once LPIC-1 has been obtained. </p></section><section class="Instructor Notice"><title>Instructor Notice</title><p class="Standard">There are no instructor notes with this manual. The following issues must be considered.</p><p class="Standard">The exercises in the sections <span class="T7">Managing Devices</span> and <span class="T7">The Linux Filesystem </span>both assume that a new partition can be created. Make sure during the installation that a large extended partition with at least 100MB free space is available after all the partitions have been created.</p><p class="Standard">The following RPM packages are needed for the exercises:</p><p class="P21">rpm-build</p><p class="P21">sharutils</p></section><section class="No Guarantee"><title>No Guarantee</title><p class="Standard">The manual comes with no guarantee at all.</p></section><section class="Resources"><title>Resources</title><p class="Standard"><link title="" href="http://Www.lpi.org/">www.lpi.org</link></p><p class="Standard"><link title="" href="http://www.linux-praxis.de/">www.linux-praxis.de</link></p><p class="Standard"><link title="" href="http://www.lpiforums.com/">www.lpiforums.com</link></p><p class="Standard"><link title="" href="http://www.tldp.org/">www.tldp.org</link></p><p class="P22">www.fsf.org</p><p class="Standard"><link title="" href="http://www.linuxit.com/">www.linuxit.com</link></p><p class="P23"/></section><section class="Notations"><title>Notations</title><p class="Standard"><span class="T8">Commands and filenames will appear in the text in </span><span class="T9">bold</span><span class="T10">.</span></p><p class="P24"/><p class="Standard"><span class="T11">The </span><span class="T12">&lt;&gt;</span> symbols are used to indicate a non optional argument.</p><p class="Standard">The <span class="T13">[]</span> symbols are used to indicate an optional argument</p><p class="P24"/><p class="P24">Commands that can be typed directly in the shell are highlighted as below</p><p class="P24"/><p class="P24"/><table><caption>Table134</caption><tr><td>command</td></tr></table><p class="P24"/><p class="P24">or </p><p class="P24"/><table><caption>Table103</caption><tr><td>command</td></tr></table><p class="P26"/></section></section><section class="Installation"><title>Installation</title><p class="P32"/><p class="P32"/><p class="P33">Prerequisites</p><p class="P32"/><p class="P32">None</p><p class="P32"/><p class="P32"/><p class="P33">Goals</p><p class="P32"/><p class="P32">Understand the layout of a typical Linux installation CD</p><p class="P32">Perform different types of installations</p><p class="P32">Create a simple partition scheme (see also p.28)</p><p class="Standard"/><p class="Standard"/><p class="P34">Contents</p><p class="P34"/><p class="P32"/><p class="P32"/><p class="P32"/><p class="P32"/><p class="P35"/><p class="P36"/><p class="P32"/><section class="1. The Installation CD "><title>1. The Installation CD </title><p class="P32"/><p class="P32">The various Linux distributions have different names for the directories on the installation CD. The generic structure of the CDROM is as follows:</p><p class="P32"/><table><caption>Table98</caption><tr><th>Generic Installation CD layout</th></tr><tr><td>
       cdrom
      
       
      
       
      
       
      
       
      
       
      
       packages
      
       images
      
       dosutils
      </td></tr></table><p class="P32"/><p class="P21"/><p class="P21"/><p class="P21">packages<span class="T8">: This directory contains the pre-compiled packages. Here are the associated names for the main distrubutions: </span></p><p class="P41"><span class="T16">debian</span><span class="T17">: </span><span class="T18">dist</span> </p><p class="P42">mandrake<span class="T17">: </span><span class="T18">Mandrake</span></p><p class="P43">redhat<span class="T17">: </span><span class="T18">RedHat</span></p><p class="P42">suse<span class="T17">: </span><span class="T18">suse</span></p><p class="P32"/><p class="P41">Initially all the software installed on the system comes from these packaged files. See the section on package managers on p.108 for more details.</p><p class="P21"/><p class="P32"><span class="T7">images:</span><span class="T8"> This directory contains various &#8220;images&#8221;. These are special flat files often containing directory structures. An initial ramdisk (initrd) is an example of an image file. There are different types of images necessary to:</span></p><p class="P41"/><p class="P41">- boot the installation process</p><p class="P41">- provide additional kernel modules </p><p class="P41">- rescue the system</p><p class="P32"/><p class="P32">Some of these files can be copied to a floppy disk when the installation is started using floppies rather than the CDROM. The Linux tool used to do this is <span class="T7">dd</span><span class="T8">. There is a tool called </span><span class="T7">rawrite</span><span class="T7"> </span><span class="T8">which does the same under DOS. </span></p><p class="P41"/><p class="P32"><span class="T8">The</span> image is a special file which may contain subdirectories (much like an archive file). </p><p class="P32"/><table><caption>Table99</caption><tr><th>Image file structure</th></tr><tr><td>
       
      
       DIR1
       Image file 
       DIR2
      </td></tr></table><p class="P32"/><p class="P32"/><p class="P32"/><p class="P32"/><p class="P32">An image file can be mounted on a loop device. If the image file name is called <span class="T16">Image</span><span class="T17"> then the following command will allow one to view the content of this file in the </span><span class="T18">/mnt/floppy</span><span class="T19"> directory:</span></p><p class="P44"/><p class="P45">mount -o loop /path/to/Image /mnt/floppy</p><p class="P32"/><p class="Standard"><span class="T20">dosutils</span><span class="T21">: this directory contains DOS tools which may be used to prepare a Linux installation such as the </span></p><p class="Standard"><span class="T20">rawrite.exe </span><span class="T21">tool mentioned above. Another tool is the </span><span class="T20">fips</span><span class="T21"> utility which non destructively partions a </span><link title="" href="../../../../tmp/C:/">C:\</link><span class="T21"> drive in two provided the underlying filesystem type is FAT and not NTFS.</span></p><p class="Standard"/></section><section class="2. Local Installations"><title>2. Local Installations</title><p class="P47"/><p class="P48">The easiest and most common type of installation is a local installation. Most distributions are a CD iso image with an automatic installation script. On machines with no CD-ROM hardware it is still possible to start an installation from a floppy.</p><p class="P49"/><p class="P50"/><p class="P50">CD-ROM installation</p><p class="P49"/><p class="P51">Change the settings in the BIOS for the computer to boot from CD. The installation is menu driven and allows for advanced and basic configuration.</p><p class="P52"/><p class="P52"/><p class="P52">Floppy Installation</p><p class="P50"/><p class="P53">If for some reason you don't boot using the CD-ROM you will need to create a floppy installation image. This can happen if the CD is not bootable or you have downloaded a non-iso image of the distribution. </p><p class="P54"/><table><caption>Table1</caption><tr><td>Making a bootable installation disk</td><td/></tr><tr><td>dd if=/path/to/&lt;image_name&gt; of=/dev/fd0</td><td>on a linux box</td></tr><tr><td>rawrite.exe</td><td>under Windows (not NT)</td></tr></table><p class="P49"/><p class="P57"><span class="T23">For RedHat distributions the installation images are in the </span><span class="T24">images</span><span class="T23"> directory. The basic image is </span><span class="T24">boot.img</span><span class="T23">. Other images are more specialised like </span><span class="T24">bootnet.img</span><span class="T23"> or </span><span class="T24">pcmcia.img</span><span class="T23">.</span></p><p class="P58"><span class="T23">In a Suse distribution the floppy image is in the </span><span class="T24">disks</span><span class="T23"> directory and the image is called </span><span class="T24">bootdisk</span><span class="T23">.</span></p><p class="P49"/><p class="P49"/></section><section class="3. Network Installation"><title>3. Network Installation</title><p class="P49"/><p class="P49"/><p class="P57"><span class="T23">For a RedHat installation this is only a specialised floppy installation. Make a bootable floppy using the </span><span class="T24">bootnet.img</span><span class="T23"> image:</span></p><p class="P49"/><p class="P49"/><table><caption>Table95</caption><tr><td>dd /mnt/cdrom/images/bootnet.img of=/dev/fd0</td></tr></table><p class="P49"/><p class="P49"/><p class="P57"><span class="T23">The first part of the installation is text based and will allow you to set up the keyboard and the network parameters needed. The rest of the installation can be done via FTP, NFS or HTTP. Originally protocols that allowed a full mount (NFS) would also allow the install to be done in graphical mode, while file retrieval protocols (FTP HTTP) would only allow text mode.</span> With most modern distributions this is no longer the case.</p><p class="P57"/><p class="P57">Also notice that most modern distributions offer network installations directly from the CD (e.g Mandrake disk 2 will start a network type installation or Fedora Core can take the parameter <span class="T16">askmethod</span><span class="T17"> at boot time).</span></p><p class="P49"/><p class="P49"/><p class="P49"/><p class="P49"/><p class="P49"/><p class="P49"/><p class="P49"/><p class="P49"/><p class="P49"/><p class="P59"/></section><section class="4. Rescue disk"><title>4. Rescue disk</title><p class="P49"/><p class="P60">If a Linux system is corrupt it is possible to boot the computer using a rescue disk. This is a small version of Linux that will mount a minimal virtual filesystem into memory.</p><p class="P61"/><p class="P57"><span class="T23">The Linux operating system runs entirely in RAM. The aim is to access the root filesystem on the PC hard drive</span>.<span class="T26"> Most rescue disks can determine this automatically. Assuming the root filesystem was found on the first logical partition of the computer's first IDE disk (/dev/hda5), the rescue disk script can then mount this resource on a subdirectory of the filesystem in RAM, say /mnt/system. </span></p><p class="P62"/><p class="P63"/><p class="P64">Changing perspectives</p><p class="P65"/><p class="P62"><span class="T8">In this situation we have </span><span class="T7">two root filesystems</span><span class="T8"> as depicted below. To use the root filesystem on the hard drive as our top directory we need to change our perspective (change root). The </span><span class="T7">chroot</span><span class="T8"> tool does just that:</span></p><p class="P57"/><table><caption>Table228</caption><tr><td>chroot /mnt/sysimage</td></tr></table><p class="P67"/><p class="P68"/><table><caption>Table100</caption><tr><td>Rescue mode</td></tr><tr><td>
       
       
       
      
       
      
       
      
       
       RAM kernel
       
      
       
      
       
      
       
      
       
      
       
       initrd 
       
      
       
      
       
      
       
      
       
      
       
       
       
      
       
      
       
      
       
      root filesystem in RAM root filesystem on PC hard drive</td></tr></table><p class="P51"/><p class="P70"/><p class="P71">Getting started</p><p class="P59"/><p class="P72"><span class="T29">Old Method</span><span class="T23">:</span></p><p class="P59"/><ol><li><p class="P73"><span class="T23">Make a bootable floppy using the </span><span class="T30">boot.img</span><span class="T23"> image file: dd if=boot.img of=/dev/fd0</span></p></li><li><p class="P73"><span class="T23">Copy the </span><span class="T30">rescue.img</span><span class="T23"> image file to a second floppy: dd if=rescue.img of=/dev/fd0</span></p></li><li><p class="P73"><span class="T23">Boot the system using with the </span><span class="T30">boot.img</span><span class="T23"> diskette</span></p></li><li><p class="P74">At the LILO prompt type "linux rescue". You should see something like</p></li></ol><p class="P59"/><p class="P49">Insert root file system disk:</p><p class="P59"/><ol><li><p class="P75"><span class="T23">Insert the </span><span class="T30">rescue.img</span><span class="T23"> diskette and press enter</span></p></li><li><p class="P76">The boot process will continue until you get a shell prompt</p></li><li><p class="P76">You may still need to determine where the root filesystem is on the hard drive (not covered)</p></li></ol><p class="P59"/><p class="P59"/><p class="P77">New Method:</p><p class="P59"/><p class="P49">1. Insert the Linux installation disk (Suse, RedHat, Mandrake ...)</p><p class="P49">2. At the prompt type &#8220;linux rescue&#8221;</p><p class="P49">3. Follow the instructions.</p><p class="P49">4. The instuction should say where the root filesystem is mounted</p><p class="P58"><span class="T23">5. If the root filesystem is mounted on </span><span class="T31">/mnt/sysimage </span><span class="T23">then enter the following command </span></p><p class="P58"/></section><section class="5. Partitioning Schemes"><title>5. <span class="T32">Partitioning</span> Schemes</title><span class="T32">Partitioning</span><p class="P78"/><p class="Standard"><span class="T33">To access resources on a hard drive the operating system uses a mechanism called 'mounting'. For UNIX type operating systems this involves attaching a disk to any directory which is then called a </span><span class="T34">mount point</span><span class="T33">. </span></p><p class="P79"/><p class="P78"><span class="T8">The</span> figure below shows a possible partitioning scheme. Here many resources (not only local disks and partitions, but possibly network shares, CD-ROMs, etc) are attached on various mount points </p><p class="P78"/><p class="P78">To the user the file system layout is simply a tree of directories and subdirectories. </p><p class="P78"/><p class="P80">Forming a tree-like filesystem structure </p><p class="P78"/><p class="Standard"><span class="T33">The root of the tree structure is called </span><span class="T34"/><span class="T34">root</span><span class="T33"> </span><span class="T33">and is represented by a forward slash &#8220;</span><span class="T34">/</span><span class="T33">&#8221;. The root mount point</span> is also the first directory on which the operating system will attach a disk or resource, also called the <span class="T7">root device</span>.</p><p class="P78"/><p class="P78">Once the root is mounted the directories and subdirectories present on the root device can be used as further mount points for other devices, forming a succession of directories ordered like a tree.</p><p class="P78"/><p class="P78">The process is made possible as follows:</p><p class="P78">1. The bootloader will load a kernel telling it where the root device is (also see "Booting Linux" LPI 102) </p><p class="P78">2. The other directories are mounted following instructions from the <span class="T7">/etc/fstab</span><span class="T8"> file (see p.</span><span class="T8">33</span><span class="T8">)</span></p><p class="P81"><img alt="Graphic4" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000000000002D00000021CF2F25855.png"/></p><p class="P81">Mount points on the file system </p><p class="P78"/><p class="P78"/><p class="P78"/><p class="P80">Creating the Disk Layout </p><p class="P78"/><p class="Standard"><span class="T33">When installing Linux one has to </span>create a partition scheme. This is a particular stage of the installation process and is done most often with a GUI tool such as Yast or DiskDruid. These tools allow one to do three things: </p><p class="Standard"/><ol><li><ol><li><p class="P82">create partitions of a given size</p></li><li><p class="P82">select the filesystem type (see p.42)</p></li><li><p class="P82">assign a mount point for each partition. </p></li></ol></li></ol><p class="Standard"/><p class="Standard"/><p class="Standard">Some installations have an 'expert mode' where it is possible to use <span class="T7">fdisk</span><span class="T8"> (see p.</span><span class="T8">29</span><span class="T8">) to create the partitions only. </span></p><p class="P83"/><p class="P83">A minimal partition scheme involves one root device and another partition for swapping. There are no rules when creating a disk layout but one generally takes into account the function of the computer (desktop, mail server, etc). </p><p class="P78"/><p class="P78"/><p class="Standard"><span class="T35">The </span><span class="T35">SWAP</span><span class="T35"> partition</span></p><p class="Standard"/><p class="Standard">When creating a partition scheme one also has to make decisions about the amount of swap space needed. Once again, there are no rules. The amount of swap space needed depends of the type of applications that will run on the PC (desktop, server, 3D rendering, etc. ). However as a rule of thumb, for a 2.4 kernel with an average amount of RAM (e.g less than 256MB) one will generally create a swap space twice as large as the amount of RAM. With older 2.2 kernels one would create a swap partition of the same size as the amount of RAM. </p><p class="Standard"/><p class="Standard">Swapping is generally done using a partition. In the partition table the hexadecimal value for a swap partition is 82.</p><p class="Standard"/><p class="Standard"/><table><caption>Table220</caption><tr><td>NOTICE</td></tr><tr><td>Unlike partitions used for storing data a swap partition is never mounted. One also doesn't assign a mount point for such partitions. To create a SWAP space during the installation on simply selects the 'filesystem type' labelled 'SWAP'. Once the system is running information about the SWAP partitions is available in /proc/swaps </td></tr></table><p class="Standard"/><p class="Standard">One can also create SWAP space areas using files rather than partitions (see LPI 201). This is often used for emergencies once a system is running and not during the installation.</p><p class="Standard"/></section><section class="6. Easy Dual Booting "><title>6. Easy Dual Booting </title><p class="P84"/><p class="P84">(This section is not for exam purposes and can be left out completely).</p><p class="P84"/><p class="P85">If Windows9x/2k is already installed on the system the installation setup will automatically configure LILO for dual booting.</p><p class="P85"/><p class="P85"/><p class="P86"><span class="T29">Pre-installation</span><span class="T23">:</span></p><p class="P85"/><p class="P85">Before altering the system you should run a defragmentation program over the whole disk. This will make sure that all the blocks used by the Windows operating system are rearranged at the beginning of the disk.</p><p class="P85"/><p class="P85">Next, using PartitionMagic or fips, partition the C:\ drive in two. The Windows programs are located at the beginning of the hard disk in the first partition. The second partition must be large enough to hold a Linux installation. </p><p class="P85"/><p class="P85">Notice: The average amount of space needed for a Linux distribution is 4GB. </p><p class="P85"/><p class="P86"><span class="T29">Starting the installation from DOS</span><span class="T23">:</span></p><p class="P85"/><p class="P85">For non-NT systems restart your computer in DOS command mode. If you are installing RedHat then you can run E:\DOSUTILS\AUTOBOOT.BAT. This will start the installation program. Similarly if you are installing Suse you can run E:\setup.exe under DOS.</p><p class="P85"/><p class="P87"/><p class="P87"/><p class="P88"><span class="T29">The hard drive from a Windows' perspective</span><span class="T23">:</span></p><p class="P85"/><p class="P85">When running Windows the OS will only see the FAT and NTFS filesystems. The rest of the disk where Linux is installed will be inaccessible.</p><p class="P89"/><p class="P85"/><p class="P86"><span class="T29">The hard drive from a Linux point of view</span><span class="T23">:</span></p><p class="P85"/><p class="P85">When running Linux the Windows partition should be called /dev/hda1 (since it's the first partition on the first physical disk). By default this partition is not mounted. You can make a directory /dos or /mnt/dos and mount this partition. The disk partition corresponding to C:\ is then accessible.</p><p class="P85"/><p class="Standard"/><p class="P90"/></section><section class="7. Exercises and Summary"><title>7. Exercises and Summary</title><p class="P91"/><p class="Standard"><span class="T31">Review </span><span class="T31">Questions</span> (answers p.150)</p><p class="P92"/><p class="P93">Yes or No</p><p class="P66"/><p class="Standard">1. The <span class="T7">rawrite </span>tool runs under Linux and is used to copy an image file onto a floppy disk_____</p><p class="Standard"/><p class="Standard">2. When devising a new partition scheme on an empty disk any disk partition can be chosen as the root </p><p class="Standard">device_____</p><p class="Standard"/><p class="P94"/><p class="P95">Glossary</p><p class="P95"/><table><caption>Table218</caption><tr><td>Term</td><td>Description</td></tr><tr><td>virtual filesystem</td><td>a filesystem is a data structure that allows data on a disk to be organised and accessed by the user. However to the user data is simply located in a series of directories and subdirectories. These directories form a tree structure with a top directory called the root and noted " / ". This structure is also called the 'virtual filesystem' because one doesn't need to know anything about the disk layout or partitioning scheme in order to use it. This is different to the situation when using a DOS based system; there if the disk has four partitions all the users will need to know that data can be in either C:\, D:\, E:\ or F:\ and, in this example, that the first CD-ROM is the G:\ device </td></tr><tr><td>mount point</td><td>a directory where a partition is attached in order to make the device available to the system</td></tr><tr><td>partitioning scheme</td><td>action performed during the installation to fix the number of partitions and mount points in order to create a standard 'virtual filesystem' on which software is installed. The standard which decides where software components are installed or where user home directories are kept is called the filesystem hierarchy standard (FHS) and should influence our choices when installing Linux (e.g most software is installed in the /usr directory, therefore always make sure that this directory is on a fairly large partition, at least 2 GB in most cases) </td></tr><tr><td>rescue mode</td><td>action of running a Linux operating system entirely in RAM together with a small root filesystem containing enough tools to access the hard drive. This is generally started with an installation CD</td></tr><tr><td>root (/)</td><td>the top directory where a first partition is attached. Either all the directories and subdirectories needed can be found on this partition or certain subdirectories of root can be used as mount points to attach further partitions (this depends on the partition scheme chosen during the installation!)</td></tr></table><p class="P97"/><p class="P91"><span class="T38"/></p><p class="P91"><span class="T39">Commands</span></p><p class="P91"><span class="T38"/></p><table><caption>Table219</caption><tr><td>Command</td><td>Description</td></tr><tr><td>chroot</td><td>change into a directory and consider that directory as the root (/). By default chroot tries to run the Bash shell /bin/bash, but it is possible to specify any other command (see 'chrooted servers' in LPI 202) </td></tr><tr><td>dd</td><td>tool used to copy files as well as portions of a device (e.g hard drive, CD-ROM or floppy). An installation CD contains files called 'image files' which are copies of installation or driver disks that can be copied back onto a floppy </td></tr><tr><td>fips.exe</td><td>a utility found on most Linux distribution CDs that is used to resize a FAT partition in order to make space for a dual boot Windows/Linux system</td></tr><tr><td>rawrite</td><td>a DOS equivalent of dd</td></tr></table><p class="P91"/><p class="P91"/><p class="P98">Exercises</p><p class="P91"/><p class="P91"><span class="T7">1. </span>Do a local CD installation. The following points outline a suggested strategy. The <span class="T7">OPTIONAL </span><span class="T8">points should be attempted only by advanced users familiar with package management and the </span><span class="T7">vi </span><span class="T8">editor. </span></p><p class="P99"/><p class="P100"><span class="T31">(i) Installation Type</span><span class="T40">: choose</span><span class="T23"> &#8220;Custom&#8221; </span></p><p class="P101"/><p class="P102"><span class="T31">(ii) Disk Partitioning Setup</span><span class="T40">: </span><span class="T23">Partition the disk manually with Disk Druid: </span></p><p class="P103"/><p class="P104">This is a suggestion for a partitioning scheme using about 3GB of hard disk space. If you have more space available then make <span class="T7">/usr</span><span class="T8"> larger and consider installing more packages than those suggested in step </span><span class="T7">(iv)</span></p><p class="P105"/><p class="P105">IMPORTANT<span class="T8">: Leave a free partition of at least 100MB. We will need this later!!</span></p><p class="P106"/><p class="P103">/boot20M</p><p class="P103">/250M</p><p class="P103">/usr2300M</p><p class="P103">/home50M</p><p class="P103">/tmp100M</p><p class="P103">/var150M</p><p class="P103">SWAP128M Notice that SWAP is a filesystem type and that no mount point is defined &#8211; see p.6 </p><p class="P91"/><p class="P102"><span class="T31">(iii)</span><span class="T23"> </span><span class="T31">(OPTIONAL) </span><span class="T23">Install LILO on /dev/hda2 or not at all. In all cases do not use the suggested /dev/hda, which is the MBR. </span></p><p class="P107"><span class="T16">We deliberately don't want the installation to boot properly. The bootloader will be fixed in step </span><span class="T41">2(i)</span><span class="T42"> in rescue mode.</span> </p><p class="P101"/><p class="P102"><span class="T31">(iv) </span><span class="T23">Packages to install: (the names may vary from one distribution to another)</span></p><p class="P107"/><p class="P103">&#8220;X Window System&#8221; + &#8220;GNOME desktop environment&#8221; OR &#8220;KDE desktop environment&#8221;</p><p class="P103">&#8220;Editors&#8221;</p><p class="P103">&#8220;Graphical Internet&#8221;</p><p class="P108">&#8220;Software Development&#8221; [This is important, we will need this to compile packages later]</p><p class="P99"/><p class="P100"><span class="T31">(v) </span><span class="T23">Don&#8217;t create a bootable floppy </span></p><p class="P109"/><p class="P91"><span class="T7">2.</span><span class="T8"> </span><span class="T7">(OPTIONAL) </span>Rescue the system:</p><p class="P101"/><p class="P102"><span class="T31">(i) </span><span class="T23">Reboot with the installation CDROM. At the prompt type:</span></p><p class="P102"><span class="T23"/><span class="T43">linux rescue</span></p><p class="P110"/><p class="P102"><span class="T44">(ii) </span><span class="T45">Read all the instructions until you get to a prompt. Use the </span><span class="T44">chroot</span><span class="T45"> command as suggested.</span></p><p class="P110"/><p class="P102"><span class="T44">(iii) </span><span class="T46">You first need to install the </span><span class="T44">lilo</span><span class="T46"> package. Edit</span><span class="T45"> /etc/lilo.conf (use </span><span class="T44">vi</span><span class="T45">). You should have</span></p><p class="P111">boot=/dev/fd0</p><p class="P111">prompt</p><p class="P111">linear</p><p class="P111">timeout=50</p><p class="P111">image=/boot/vmlinuz-&lt;kernel-version&gt;</p><p class="P111">label=linux </p><p class="P111">read-only</p><p class="P111">root=/dev/&lt;root-partition&gt;</p><p class="P110"/><p class="P102"><span class="T44">(v)</span><span class="T45"> Run </span><span class="T44">/sbin/lilo</span><span class="T45">. If an error occurs you may have to replace </span><span class="T43">linear</span><span class="T45"> by </span><span class="T43">lba32</span><span class="T45"> depending on your disk.</span></p></section></section><section class="Hardware Configuration"><title>Hardware Configuration</title><p class="P113"/><p class="P113"/><p class="P114">Prerequisites</p><p class="P115"/><p class="P115">None</p><p class="P115"/><p class="P114">Goals</p><p class="P115"/><p class="P115">Understand hardware resource allocation (IRQs, I/O ports and DMA)</p><p class="P115">Overview hardware devices such as expansion cards, USB and SCSI devicesDetection of network interfaces and printers (no configuration)</p><p class="P115">Understand basic configuration steps for modems and sound cards</p><p class="P115"/><p class="P116">Contents</p><p class="P117"/><p class="P120"/><p class="P121"/><p class="P122"/><p class="P113"/><section class="1. Resource Allocation"><title>1. Resource Allocation</title><p class="P123"/><p class="P123"/><p class="P113">To allow peripherals and devices on the PC to communicate directly with system resources, in particular the CPU, the system allocates resources such as lines and channels for each device. These resources are Interrupt Request Lines (IRQ), Input/Output addresses and Direct Memory Access channels (DMA).</p><p class="P113"/><p class="P113"/><p class="Standard"><span class="T47">I</span><span class="T47">RQs</span><span class="T48">: The Interrupt Request Lines allow devices to request CPU time. The CPU will stop its current activity and process the instructions sent by the device. IRQs range from </span><span class="T49">0</span><span class="T48"> to </span><span class="T49">15</span><span class="T48">.</span></p><p class="P113"/><p class="Standard"><span class="T47">I/O address</span><span class="T48">: These represent specific addresses in the system&#8217;s memory map. The CPU will then communicate with the device by </span><span class="T50">reading and writing to memory</span><span class="T48"> at the specified address.</span></p><p class="P113"/><p class="P113"><span class="T51">DMA</span>: Certain devices can access the system&#8217;s memory through a DMA channel, allowing them to write and process data without accessing the CPU. This can enhance performance.</p><p class="P113"/><p class="P113"/><p class="P113"/><p class="P124">&#9679; Listing Allocated Resources</p><p class="P113"/><p class="P113">The kernel keeps information related to allocated resources in the <span class="T7">/proc</span> directory. The relevant files are:</p><p class="P113"/><p class="P113"/><p class="P113"><span class="T52">/</span><span class="T52">proc/dma</span><br/><span class="T52">/proc/interrupts</span><br/><span class="T16">/proc/ioports</span><br/><span class="T16">/proc/pci</span></p><p class="P113"/><p class="P113"/><p class="Standard"><span class="T48">Allocated resources can also be listed using tools such as </span><span class="T53">lspci</span><span class="T54"> and </span><span class="T53">dmesg</span><span class="T48">:</span></p><p class="P113"/><p class="P113"><span class="T7">lspci</span>: lists chipset information of all attached PCI components. Lists I/O and IRQ settings with the <span class="T7">-v </span>flag .<span class="T8"> Also notice the </span><span class="T7">-b</span><span class="T8"> (BUS centric) option which shows allocations assigned by the BIOS rather than the kernel.</span></p><p class="P125"/><p class="P113"><span class="T7">dmesg</span><span class="T8">. Continuously displays kernel messages. It also displays the kernel messages logged at boot time during the &#8220; kernel&#8221; stage . At this stage the kernel scans all the hardware on the system and can automatically allocate modules (drivers) for given chipsets. These messages are also available in </span><span class="T7">/var/log/dmesg</span><span class="T8">. </span></p><p class="P113"/><p class="P113"/><p class="P113"/><p class="P113">&#9679; <span class="T7">Typical Resources</span></p><p class="P125"/><table><caption>Table105</caption><tr><td>Device</td><td>I/O port</td><td>IRQ</td></tr><tr><td>/dev/ttyS0</td><td>0x03f8</td><td>4</td></tr><tr><td>/dev/ttyS1</td><td>0x02f8</td><td>3</td></tr><tr><td>/dev/lp0</td><td>0x378</td><td>7</td></tr><tr><td>/dev/lp1</td><td>0x278</td><td>5</td></tr><tr><td>soundcard</td><td>0x220</td><td/></tr></table><p class="P125"/><p class="P113"/><p class="P113"/><p class="P113"/><p class="P113"/><p class="P113"/><p class="P113"/><p class="P113"/><p class="P113">M<span class="T55">anual Resourse Allocation</span></p><p class="P125"/><p class="P125"/><table><caption>Table101</caption><tr><td>NOTICE:This is a very common example, however since kernel modules are only discussed in LPI 102 some may find it difficult. You may skip this example and go to section 2 </td></tr></table><p class="P125"/><p class="P125"/><p class="P123"><span class="T51">Example</span>: configuring two ethernet cards</p><p class="P113"/><p class="P113"/><p class="Standard"><span class="T49">1.</span><span class="T48"> For statically compiled modules, parameters can be passed to the kernel at boot time. A typical example is when two ethernet cards are present and only the first one is detected. The following line tells the kernel that:</span></p><p class="P113"/><p class="P131">- there is an ethernet card using IRQ 10 and I/O 0x300</p><p class="P131">- there is another ethernet card using IRQ 9 and I/O 0x340</p><p class="P113"/><p class="P113"/><p class="P132">ether=10,0x300,eth0ether=9,0x340,eth1</p><p class="P113"/><p class="P113"/><p class="P113">You type this line at the LILO/GRUB &#8216;boot:&#8217; prompt, or else, as with the RAM settings before, edit </p><p class="P15"><span class="T57">/etc/lilo.conf </span><span class="T58">(use an </span><span class="T59">append=</span><span class="T58"> statement)</span><span class="T57"> </span><span class="T60">or </span><span class="T57">/etc/grub.conf</span><span class="T60">.</span></p><p class="P113"/><p class="Standard"><span class="T48">Notice that the </span><span class="T61">ether=</span><span class="T48"> statement is a generic kernel command similar to </span><span class="T62">root=</span><span class="T48">, </span><span class="T61">mem=</span><span class="T48"> or </span><span class="T61">init=</span><span class="T48">.</span></p><p class="P113">Also notice that you need not specify any information about the ethernet card (Intel, Netgear ...)</p><p class="P113"/><p class="P113"/><p class="Standard"><span class="T49">2.</span><span class="T48"> For dynamically compiled modules, IRQ and I/O address settings can be defined using </span><span class="T49">/etc/modules.conf</span><span class="T48"> (or </span><span class="T49">/etc/conf.modules</span><span class="T48">). Assuming that in the above example both cards where using the </span><span class="T61">e100.o</span><span class="T48"> kernel module, then </span><span class="T49">/etc/modules.conf</span><span class="T48"> would contain the following:</span></p><p class="P113"/><p class="P113"/><p class="P132">alias eth0 e100 </p><p class="P132">alias eth1 e100 </p><p class="P132"/><p class="P132"/><p class="P132">options eth0 io=0x300 irq=10</p><p class="P132">options eth1 io=0x340 irq=9</p><p class="P113"/><p class="P113"/></section><section class="2. PC Expansion Cards"><title>2. PC Expansion Cards</title><p class="P113"/><p class="P113">ISA and PCI are the most common types of expansion cards. With the latest 2.4 kernel there is very little to be done in order to configure these. In the case of ISA buses however, and only with earlier kernels, it was necessary to scan the <span class="T8">ISA bus in order to detect existing expansion cards (sound, ethernet, etc). </span></p><p class="P113"/><p class="P113">The <span class="T16">isapnptools</span><span class="T17"> package provided the </span><span class="T18">pnpdump</span><span class="T19"> tool which scanned the ISA bus for 'Plug and Play' (pnp) devices. The output would contain the chipset of the card together with I/O port, DMA and IRQ settings. This output would be redirected to </span><span class="T18">/etc/isapnp.conf</span><span class="T18"> </span><span class="T19">where changes could be made if needed. At boot time the </span><span class="T18">isapnp</span><span class="T18"> </span><span class="T19">tool would read </span><span class="T18">isapnp.conf</span><span class="T19"> and would configure these </span><span class="T19">ISA PnP</span><span class="T19"> devices.</span></p><p class="P133"/><p class="P133">Since kernel 2.4 PnP initialisation is supported through a kernel module called isapnp.o</p><p class="P113"/><p class="P113"/><p class="P113"/></section><section class="3. USB Support"><title>3. USB Support</title><p class="P113"/><p class="P113">The Universal Serial Bus (USB) is a communication architecture designed to connect devices to a PC. These devices are divided into four classes:</p><p class="P113"/><p class="P113">Display Devices</p><p class="P113">Communication Devices</p><p class="P113">Audio Devices</p><p class="P113">Mass Storage Devices</p><p class="P113">Human Interface Devices (HID)</p><p class="P113"/><p class="Standard"><span class="T48">The devices are plugged into a USB port which is driven by a USB controller. Support for USB controllers is present in the Linux kernel since version </span><span class="T53">2.2.7 </span><span class="T48">( </span><span class="T26">The Linux USB sub-system HOWTO)</span></p><p class="P113"/><p class="P113"><span class="T7">Host Controlers</span> </p><p class="P113"/><p class="P113">There are 3 types of USB host controllers:</p><p class="P113"/><table><caption>Table102</caption><tr><td colspan="2">Host Controler Kernel Module</td></tr><tr><td>OHCI (Compaq)</td><td>usb-ohci.o</td></tr><tr><td>UHCI (Intel)</td><td>usb-uhci.o</td></tr><tr><td>EHCI (USB v 2.0)</td><td>ehci-hdc.o </td></tr></table><p class="P113"/><p class="P113">Once a USB device is plugged into a PC we can list the devices with<span class="T7">lsusb</span>:</p><p class="P113"/><table><caption>Table104</caption><tr><td> lsusb </td></tr><tr><td>Bus 001 Device 001: ID 0000:0000 </td></tr><tr><td>Bus 001 Device 002: ID 04a9:1055 Canon, Inc.</td></tr></table><p class="P113"/><p class="P113"/><p class="P124">Hotplugging </p><p class="P125"/><p class="P125">Hotplug is a mechanism used to keep the state of the operating system updated when pluggable hardware devices are added or removed. In most cases the kernel signals an event by passing parameters to the script <span class="T7">/sbin/</span><span class="T7">hotplug</span>. </p><p class="P125"/><p class="P125">This <span class="T7">hotplug</span><span class="T7"> </span>script runs all the scripts in <span class="T7">/etc/hotplug.d</span> (the default is <span class="T7">default.hotplug</span>) which in turn starts the appropriate agent listed in <span class="T7">/etc/hotplug</span>. The names of the agents correspond to different attachment types such as <span class="T17">ieee1394, net, pci, scsi and usb.</span></p><p class="P133"/><p class="P133">The following log describes what happens when a USB camera is initialised: </p><p class="P133"/><table><caption>Table154</caption><tr><td>Stage 1: USB kernel modules identify USB event and vendor/product ID:</td></tr><tr><td>13:26:19 kernel: hub.c: new USB device 00:07.2-1, assigned address 5</td></tr><tr><td>13:26:19 kernel: usb.c: USB device 5 (vend/prod 0x4a9/0x3058) is not claimed by any active driver.</td></tr></table><p class="P125"/><p class="P125"/><table><caption>Table155</caption><tr><td>Stage 2:The event arguments are passed to default.hotplug</td></tr><tr><td>13:26:19 default.hotplug[10507]: arguments (usb) env (DEVFS=/proc/bus/usb OLDPWD=/ PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add PWD=/etc/hotplug HOME=/ SHLVL=2 DEVICE=/proc/bus/usb/001/005 PRODUCT=4a9/3058/1 TYPE=255/255/255 DEBUG=yes _=/bin/env)</td></tr></table><p class="Standard"/><p class="Standard"/><table><caption>Table156</caption><tr><td>Stage 3: The usb.agent associates the product to a usbcam (using usb.usermap)</td></tr><tr><td>13:26:19 default.hotplug[10507]: invoke /etc/hotplug/usb.agent ()</td></tr><tr><td>13:26:23 usb.agent[10507]: Setup usbcam for USB product 4a9/3058/1</td></tr><tr><td>13:26:23 usb.agent[10507]: Module setup usbcam for USB product 4a9/3058/1</td></tr><tr><td>13:26:38 devlabel: devlabel service started/restarted </td></tr></table><p class="P113"/><p class="P113">From this we can see that <span class="T7">Step 1 </span><span class="T8">involves the kernel modules and </span><span class="T7">Step 2-3</span><span class="T8"> involve the hotplug mechanism. One can also see that the correct USB map must be available in order to fully initialise the device.</span></p><p class="P113"/><p class="P113"/><p class="P124">The usbmgr tool</p><p class="P113"/><p class="P113">On Debian systems an alternative to hotplug is provided with the <span class="T7">usbmgr</span><span class="T7"> </span>package. The main files are:</p><p class="P113"/><p class="Standard"><span class="T64">/usr/sbin/usbmgr</span><span class="T48">The daemon that listens for USB related events</span> </p><p class="P113"><span class="T65">/usr/sbin/dump_usbdev</span>Tool to list USB devices (similar to lsusb)</p><p class="P113"><span class="T65">/etc/usbmgr/</span><span class="T65">usbmgr.conf</span>Configuration file containing vendor/product IDs</p><p class="P113"/><p class="P113"/></section><section class="4. SCSI Devices"><title>4. SCSI Devices</title><p class="P113"/><p class="P124">Types of SCSI devices</p><p class="P125"/><p class="P125">There are two types of SCSI interfaces:</p><p class="P125"/><p class="P125">- an 8-bit interface with a bus that supports 8 devices, this includes the controller, so there is only space for 7 block devices (tapes, disks, etc)</p><p class="P125">- a 16-bit interface (WIDE) with a bus that supports 16 devices including the controller, so there can only be 15 block devices.</p><p class="P125"/><p class="P125">SCSI devices are uniquely identified using a set of 3 numbers called the <span class="T7">SCSI ID</span>:</p><p class="P125"/><p class="P125">a. the SCSI channel</p><p class="P125">b. the device ID number</p><p class="P125">c. the logical unit number LUN</p><p class="P125"/><p class="P124"/><p class="P124">The SCSI Channel</p><p class="P125"/><p class="P125">Each SCSI adapter supports one data channel on which to attach SCSI devices (disc, CDROM, etc)</p><p class="P125">These channels are numbered from 0 onwards.</p><p class="P125"/><p class="P125"/><p class="P124">Device ID number</p><p class="P125"/><p class="P125">Each device is assigned a unique <span class="T7">ID</span> number that can be set using jumpers on the disk. The IDs range from 0 to 7 for 8-bit controllers and from 0 to 15 for 16-bit controllers. </p><p class="P125"/><p class="P124">Logical Units</p><p class="P125"/><p class="P137">The Logical Unit Number (LUN) is used to differentiate between devices within a SCSI target number. This is used, for example, to indicate a particular partition within a disk drive or a particular tape drive within a multi-drive tape robot. It is not seen so often these days as host adapters are now less costly and can accommodate more targets per bus.</p><p class="P113"/><p class="P113"/><p class="P124">Hardware Detection</p><p class="P113"/><p class="P125">All detected devices are listed in the <span class="T7">/proc/scsi/scsi</span> file. The example below is from the SCSI-2.4-HOWTO</p><p class="P125"/><table><caption>Table152</caption><tr><td>/proc/scsi/scsi</td></tr><tr><td>Attached devices:</td></tr><tr><td>Host: scsi0 Channel: 00 Id: 02 Lun: 00</td></tr><tr><td>Vendor: PIONEER Model: DVD-ROM DVD-303 Rev: 1.10</td></tr><tr><td>Type: CD-ROM ANSI SCSI revision: 02</td></tr><tr><td>Host: scsi1 Channel: 00 Id: 00 Lun: 00</td></tr><tr><td>Vendor: IBM Model: DNES-309170W Rev: SA30</td></tr><tr><td>Type: Direct-Access ANSI SCSI revision: 03</td></tr></table><p class="P125"/><p class="P125">The <span class="T7">scsi_info</span> tool uses the information in <span class="T7">/proc/scsi/scsi</span> to printout the SCSI_ID and the model of a specified device. From the file above <span class="T7">scsi_info</span><span class="T7"> </span>would produce the following output:</p><p class="P125"/><table><caption>Table153</caption><tr><td> scsi_info /dev/sda</td></tr><tr><td>SCSI_ID="0,0,0"</td></tr><tr><td>MODEL="IBM DNES-309170W"</td></tr><tr><td>FW_REV="SA30"</td></tr></table><p class="P125"/><p class="P113"/><p class="P113"/><p class="P124">Booting from SCSI disks</p><p class="P113"/><p class="P113">The system will boot from the device with SCSI ID 0 by default. This can be changed in the SCSI BIOS which can be configured at boot time.</p><p class="P113"/><p class="Standard"><span class="T48">If the PC has a mixture of SCSI and IDE disks, then the boot order must be selected in the systems BIOS first.</span> </p><p class="P113"/></section><section class="5. Network cards"><title>5. Network cards</title><p class="P143"/><p class="P91"/><p class="P113">The network interface card (NIC) must be supported by the kernel. You can get information about your current card using either of the following:</p><p class="P124"/><p class="P113"><span class="T7">dmesg</span>, <span class="T55">lspci</span>, <span class="T55">scanpci</span>, <span class="T7">/proc/interrupts</span>, <span class="T7">/sbin/lsmod</span>.or<span class="T55"> /etc/modules.conf</span>:</p><p class="P113"/><p class="P113"/><table><caption>Table150</caption><tr><th>dmesg</th></tr><tr><td>&#9658;Linux Tulip driver cersion 0.9.14 (February 20, 2001)</td></tr><tr><td>PCI: Enabled device 00:0f.0 (0004 -&gt;0007)</td></tr><tr><td>PCI: Found IRQ 10 for device 00:0f.0</td></tr><tr><td>eth0: Lite-On 82cl68 PNIC rev 32 at 0xf800, 00:0A:CC:D3:6E:0F,</td></tr><tr><td>IRQ 10</td></tr><tr><td>eth0: MII transceiver #1 config 3000 status 7829 advertising</td></tr></table><p class="P113"/><p class="P113"/><p class="P145"><span class="T28"><img alt="Graphic8" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T61">cat /proc/interrupts</span></p><p class="P146"><span class="T48">&#9658;</span><span class="T61">0: 8729602 XT-PIC timer</span></p><p class="P147">1: 4 XT-PIC keyboard</p><p class="P148">2: 0 XT-PIC cascade</p><p class="P147">7: 0 XT-PIC parport0</p><p class="P149"> 8: 1 XT-PIC rtc</p><p class="P150">10: 622417 XT-PIC eth0</p><p class="P147"> 11: 0 XT-PIC usb-uhci</p><p class="P151"> 14: 143040 XT-PIC ide0</p><p class="P152">15: 180 XT-PIC ide1</p><p class="P153"/><p class="P153"/><p class="P153"><img alt="Graphic9" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/><span class="T25">/sbin/lsmod</span></p><p class="P145"><span class="T48">&#9658;</span><span class="T61">Module Size Used by</span></p><p class="P154"><span class="T27">tulip 37360 1 (autoclean)</span></p><p class="P155"/><p class="P155">From the examples above we see that the Ethernet card&#8217;s chipset is Tulip, the i/o address is 0xf800 and the IRQ is 10. This information can be used either if the wrong module is being used or if the resources (i/o or IRQ) are conflicting. </p><p class="P155"/><p class="P156"><span class="T48">This information can either be used to insert a module with a different i/o address (using the </span><span class="T53">modprobe</span><span class="T48"> or </span><span class="T53">insmod</span><span class="T48"> utilities) or can be saved in </span><span class="T53">/etc/modules.conf</span><span class="T48"> (this will save the settings for the next bootup).</span></p><p class="P91"/><p class="P91"/></section><section class="6. Setting up modems"><title>6. Setting up modems</title><p class="P91"/><p class="P91">We first need to detect the modem. If the modem is an external modem all one needs to consider is the serial port it is using. However when dealing with a built-in PCI modem we need information about the I/O port and interrupt used by the device in order to determine which serial device should be configured.</p><p class="P91"/><p class="Standard"><span class="T45">&#9679;</span><span class="T23"> </span><span class="T31">The Modem device</span></p><p class="P91"/><p class="P91">If we have an external modem we can go straight to the next section 'The serial port'. </p><p class="P91"/><p class="Standard"><span class="T23">A PCI modems device can be detected with </span><span class="T31">lspci</span><span class="T40">. </span>(the listing below is from PCI-Modem micro-HOWTO):</p><p class="P91"/><table><caption>Table223</caption><tr><td> lspci -v </td></tr><tr><td>----- snip -----</td></tr><tr><td>&#9658; 00:0c.0 Serial controller:US Robotics/3Com 56K FaxModem Model 5610 (rev 01) (prog-if 02 [16550])</td></tr><tr><td>Subsystem: US Robotics/3Com USR 56k Internal FAX Modem (Model 2977)</td></tr><tr><td>Flags: medium devsel, IRQ 11</td></tr><tr><td>I/O ports at e800 [size=8]</td></tr><tr><td>Capabilities: &lt;available only to root&gt;------ snip ----</td></tr></table><p class="P91"/><p class="P91"/><p class="P91"/><p class="P91">Notice that the I/O port is 0xe800 and the IRQ is 11 </p><p class="P91"/><p class="P91">We can now use this information and assign these resources to a serial port device. </p><p class="P91"/><p class="P91"><span class="T68">&#9679;</span> <span class="T7">The serial port</span></p><p class="P91"/><p class="P91">The modem uses a serial interface for communications. Information is sent through the telephone line as a sequence of bits (serial) over two wires (in and out). Incoming sequential data is translated into parallel data for the PC bus and vice versa for bits of data leaving the computer. The translation is done by a UART chip located on the serial port of the motherboard or inside an internal (PCI) modem. </p><p class="P91"/><p class="P91">To see which serial ports were detected at boot time on the system, we do the following:</p><p class="P91"/><p class="P159"><span class="T28"><img alt="Graphic145" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"> </span><span class="T27">dmesg | grep </span><span class="T43">ttyS</span></p><p class="P160"/><p class="P159"><span class="T48">&#9658;</span><span class="T69"> </span><span class="T70">/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4<br/> /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3</span></p><p class="P161"/><p class="P162"/><p class="P91">So far, these are preconfigured serial ports with I/O ports and IRQs generally used by a hardware serial port. </p><p class="P91"/><table><caption>Table224</caption><tr><td>NOTICE</td></tr><tr><td>When configuring an external modem one only has to consider serial devices with IRQ 3 or IRQ 4. The I/O ports reported above are also standard addresses used by hardware serial ports</td></tr></table><p class="P91"/><p class="P91">The following table shows the equivalence between DOS COM ports and Linux serial devices.</p><p class="P91"/><p class="P163">Serial port equivalence DOS-Linux</p><p class="P163"/><table><caption>Table2</caption><tr><td>DOS</td><td>Linux</td></tr><tr><td>COM1</td><td>/dev/ttyS0</td></tr><tr><td>COM2</td><td>/dev/ttyS1</td></tr><tr><td>COM3</td><td>/dev/ttyS2</td></tr></table><p class="P91"/><p class="P91"/><p class="P91">One can also use <span class="T55">setserial</span><span class="T8"> to scan the serial devices</span>. With the <span class="T55">-g</span> option this utility will tell you which serial devices are in use:</p><p class="P91"/><p class="P91"/><p class="P159"><span class="T28"><img alt="Graphic10" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"> </span><span class="T43">setserial</span><span class="T43"> -g /dev/ttyS[01]</span></p><p class="P160"/><p class="P160"><span class="T72">&#9658;</span> /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4</p><p class="P160">/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3</p><p class="P160"/><p class="P162"/><p class="P162"/><p class="P162">Now if we have a PCI modem as the one detected using <span class="T7">lspci</span><span class="T8"> on p.</span><span class="T8">16</span><span class="T8"> we need to remember the I/O port and IRQ setting used:</span></p><p class="P167"/><table><caption>Table225</caption><tr><td colspan="2">Hardware setting for the PCI modem on p.16</td></tr><tr><td>I/Oport</td><td>0xe800</td></tr><tr><td>IRQ</td><td>11</td></tr></table><p class="P162"/><p class="P162"/><p class="P162">This time we will use <span class="T7">setserial </span><span class="T8">to assign these values to a serial device (other than the hardware serial devices) as follows:</span></p><p class="P167"/><p class="P167"/><p class="P159"><span class="T28"><img alt="Graphic146" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"> </span><span class="T43">setserial /dev/ttyS4 port 0xe800 irq 11 autoconfig</span> </p><p class="P160"/><p class="P167"/><p class="P167"/><p class="P170"><span class="T23">The </span><span class="T73">autoconfig</span> option automatically sets the correct UART. This command can be saved in a shell script called <span class="T13">serial.rc</span> and will configure the serial port every time we boot.</p><p class="P162"/><p class="P162"/><p class="P162"/><p class="Standard"><span class="T23">A symbolic link called </span><span class="T31">/dev/modem</span><span class="T31"> </span><span class="T40">pointing to the used serial port is often used to reference the modem</span>.</p><p class="P91"/><p class="P162">Manually linking the modem device</p><p class="P91"/><p class="P145"><span class="T28"><img alt="Graphic11" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T43"> ln -s /dev/ttyS1 /dev/modem</span></p><p class="P171"/><p class="P91"/><p class="P91"/><p class="P91">The <span class="T7">setserial</span><span class="T7"> </span><span class="T8">tool is also used to set the speed of the serial port.</span></p><p class="P91"/><table><caption>Table212</caption><tr><td>setserial speed option</td><td>Description</td></tr><tr><td>spd_hi</td><td>use 56kb instead of 38.4kb</td></tr><tr><td>spd_vhi</td><td>use 115kb instead of 38.4kb</td></tr><tr><td>spd_shi</td><td>use 230kb instead of 38.4kb</td></tr><tr><td>spd_warp</td><td>use 460kb instead of 38.4kb</td></tr><tr><td>spd_cust</td><td>use the custom divisor to set the speed at 38.4kb (baud rate = baud_base / custom_divisor)</td></tr><tr><td>spd_normal</td><td>use 38.4kb when a baud rate of 38.4kb is selected</td></tr></table><p class="P91"/><p class="P91"/><p class="Standard"><span class="T23">For example setting the speed for the serial port </span><span class="T74">/dev/ttyS4</span> to 115kb is done as follows:</p><p class="P173"/><p class="P173"/><table><caption>Table213</caption><tr><td> setserial /dev/ttyS4 spd_vhi</td></tr></table><p class="P176"/><p class="P91"/><p class="P91"/><p class="Standard"><span class="T45">&#9679;</span><span class="T31"> </span><span class="T31">Dialup Configuration</span></p><p class="P163"/><p class="P162"><span class="T17">The </span><span class="T18">wvdial</span><span class="T19"> commandline tool has a setup script called </span><span class="T18">wvdialconf</span><span class="T19"> which will scan the system for modems (all serial and USB ports are scanned automatically). Once the script has run a skeleton configuration file is generated:</span></p><p class="P176"/><p class="P176"/><p class="P176"/><p class="P176"/><p class="P176"/><p class="P176"/><p class="P162"><span class="T75">Sample /etc/wvdial.conf file</span>:</p><p class="P162"/><p class="P177">[Dialer Defaults]</p><p class="P177">Modem = /dev/ttyS1</p><p class="P178">Baud = 115200</p><p class="P177">Init1 = ATZ</p><p class="P177">Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 S11=55 +FCLASS=0</p><p class="P177">; Phone = &lt;Target Phone Number&gt;</p><p class="P177">; Username = &lt;Your Login Name&gt;</p><p class="P177">; Password = &lt;Your Password&gt;</p><p class="P179"/><p class="P91"/><p class="P180"><span class="T23">A quick way to get started is to replace</span><span class="T74"> Defaults</span><span class="T23"> with the name of your provider say WorldISP, fill in the Usernam/Password entries and type the following:</span></p><p class="P173"/><table><caption>Table3</caption><tr><td> wvdial WorldISP</td></tr></table><p class="P176"/><p class="P181"/><p class="P181"/><p class="P181">One can also use <span class="T7">minicom </span><span class="T8">to configure a connection. This tools is first configured with the </span><span class="T7">-s</span><span class="T8"> switch:</span></p><p class="P182"/><p class="P173"/><table><caption>Table211</caption><tr><td> minicom -s[configuration] Filenames and paths File transfer protocols Serial port setup Modem and dialing Screen and keyboard Save setup as dfl Save setup as.. Exit Exit from Minicom</td></tr></table><p class="P186"/><p class="P181"><span class="T8">All the work done on serial ports will be useful in the '</span><span class="T12">Serial port setup</span><span class="T8">'</span> section, whereas dialling information (given by the ISP) can be entered by selecting the menu '<span class="T13">Modem and dialing</span>' </p><p class="P170"/><p class="P170">Once the modem is set up and is capable of dialling the outside world then it is possible to establish a serial connection to a remote host. To get a fully networked connection (i.e assign an IP address to a network interface) we still need to start the <span class="T7">pppd</span> which will create a <span class="T16">ppp0</span><span class="T17"> network interface and uses</span> the point to point protocol PPP to enable TCP/IP networking. With tools like <span class="T7">wvdial</span><span class="T8"> this is done automatically when needed.</span> </p><p class="P170"/><p class="P187"><span class="T45">&#9679; </span><span class="T45"/>WinModems</p><p class="P170"/><p class="P170">If all the above configurations fails then it likely that you have a modem that may only work with some added drivers. Such modems are called <span class="T16">winmodems </span><span class="T17">(see the winmodem HOWTO for some colourful definitions!).</span></p><p class="P188"/><p class="P170"><span class="T17">A winmodem that can be made to work under Linux is also called a </span><span class="T16">linmodem</span><span class="T17">. (see the linmodem HOWTO for more details)</span></p><p class="P188"/><p class="P188"/><p class="P188"/><ol><li><p class="P189">ISDN</p></li></ol><p class="P190"/><p class="P191">ISDN is a digital version of the &#8220;Plain Old Telephone Service&#8221; (POTS). It functions in a similar way, but instead of allowing a single direct analogue path, offers a number of 64KBit/S traffic or bearer channels and a low bandwidth data channel. ISDN2, the basic service offered in many countries, is a so called 2B+D service as it offers two bearer channels and a data channel.</p><p class="P191"/><p class="P191">There are a number of ways of using ISDN with a Linux machine. The simplest is to employ an external ISDN device that does the dialing, authentication and session for you, presenting the connection over an Ethernet network.</p><p class="P191"/><p class="P191">If the Linux machine is to be directly interfaced to the ISDN connection, a device called a Terminal Adapter (TA) will be required. The details of the various different interfaces to TAs are outside the scope of this course, but fall mainly into the following camps.</p><p class="P190"/><p class="P192">Modem Style AT command Interface</p><p class="P192"/><p class="P193">With serial connected TAs and some USB devices, the Linux machine is presented with an AT command interface exactly as if the TA were a modem. The TA can therefore be set up as if it were a modem. This has the advantage of being simple to do, but is less efficient than some other methods as it treats the data path as if it were a modem as well. Modems require that some characters are escaped as they have an active effect. ISDN has no such restriction and can pass any character.</p><p class="P192"/><p class="P192">PCI/ISA/PCCARD ISDN adapter cards and isdn4linux</p><p class="P192"/><p class="P192"><span class="T8">A far more efficient way of using your ISDN line is to use an adapter card connected directly to a machine bus. The isdn4linux project seeks to encapsulate a lot of the details of making a connection over ISDN and present the finished connection as just another network interface. The package</span> isdn4k-utils <span class="T8">contains all the necessary software. Under Red Hat related Linux distributions the tool </span>&#8220;system-config-network&#8221; <span class="T8">will set this all up.</span></p><p class="P192"/><p class="P192"/><p class="P192"/><ol><li><p class="P194">ADSL</p></li></ol><p class="P195"/><p class="P196">Asynchronous Digital Subscriber Line (ADSL) has largely replaced ISDN and private leased lines as the mass market higher bandwidth Internet connection method of choice. As with ISDN the Linux user has a number of strategy choices. The simplest, again as with ISDN, is to employ any of a number of different stand alone ADSL Router devices. These present the outside link via an Ethernet router. No special considerations need be taken on the Linux machine. The ADSL router is treated as an ordinary router. Many of these ADSL router devices are actually themselves embedded Linux machines. If the Linux user requires a closer connection to the ADSL service, they will probably need to acquire equipment and an ISP account capable of Point-to-Point Protocol over Ethernet (PPPoE). There are ADSL projects based around particular chipsets, but they have their own specific requirements and configuration methods.</p><p class="P195"/><p class="P192">PPPoE</p><p class="P192"/><p class="P197"><span class="T45">ADSL is not a single protocol but rather a basket of related and interconnected protocols topped off with Point-to-Point Protocol (PPP). If the equipment and the ISP account are compliant, the Linux user can employ PPPoE to form the external connection. The Linux machine would initiate a PPPoE session and aim it at the MAC address of the ADSL equipment. The ADSL equipment would set up the layers beneath the PPP session and pass the PPP frames across those layers. The package &#8220;</span><span class="T44">pppoe</span><span class="T45">&#8221; contains all necessary software and setup information.</span></p><p class="P170"/><p class="P170"/><p class="P170"/><p class="P170"/><p class="P170"/></section><section class="7. Printer Configuration"><title>7. Printer Configuration</title><p class="P91"/><p class="P91">Printing is covered in depth in LPI 102. From a hardware perspective, the printers are detected at boot time automatically and can be seen in the <span class="T7">dmesg</span><span class="T8"> output.</span></p><p class="P91"/><p class="P91">Linux printing happens in two stages. First the raw data is filtered into a postscript format, then the printing itself is handled by the ghostscript, or <span class="T55">gs</span> utility.</p><p class="P91"/><p class="P198">Using printtool<span class="T79">(</span><span class="T80">not examined</span><span class="T79">)</span></p><p class="P91"/><p class="Standard"><span class="T23">This utility creates an entry in </span><span class="T30">/etc/printcap</span><span class="T23">. The main features which need to be specified are the location of the </span><span class="T81">input_filter=</span><span class="T23">if, the </span><span class="T81">spool_directory=</span><span class="T23">sd and the </span><span class="T81">printer_device=</span><span class="T23">lp. </span></p><p class="P91"/><p class="P91">If the <span class="T55">printtool</span> fails to detect which parallel port corresponds to the printer device you can use the <span class="T55">dmesg</span> utility to recall the kernel's initial parallel port scan.</p><p class="P91"/><p class="P91"/><p class="P91">Here is an example of a system with a local printer plugged into the first parallel port /dev/lp0</p><p class="P91"/><table><caption>Table4</caption><tr><td>Parallel port scan at the end of dmesg</td></tr><tr><td>parport0: PC-style at 0x378 (0x778) [SPP,ECP,ECPEPP,ECPPS2]parport0: detected irq 7; use procfs to enable interrupt-driven operation.parport_probe: succeededparport0: Printer, HEWLETT-PACKARD DESKJET 610Clp0: using parport0 (polling)</td></tr></table><p class="P170"/><p class="P162"/><p class="P162"/><table><caption>Table5</caption><tr><td>Sample /etc/printcap file</td></tr><tr><td># This file can be edited with the printtool in the control-panel.##PRINTTOOL3## LOCAL cdj550 300x300 a4 {} DeskJet550 3 {}lp:\:sd=/var/spool/lpd/lp:\:mx#0:\:sh:\:lp=/dev/lp0:\:if=/var/spool/lpd/lp/filter:</td></tr></table><p class="P163"/><p class="P163"/><p class="P163">Figure 7: The gtk-based printtool GUI</p><p class="P163"/><p class="P198"><img alt="Graphic16" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000000000002660000014B7F8D0DD9.png"/></p><p class="P198"/><p class="P198"/><p class="P198">Using cups</p><p class="P91"/><p class="P91">Cups is a newer administration and configuration tool for printers. It's main configuration files are stored in</p><p class="P91"><span class="T55">/etc/cups</span>. The printing process is the same except that <span class="T55">cups</span> uses its own filters situated in <span class="T55">/usr/lib/cups</span>. </p><p class="P91"/><p class="Standard"><span class="T23">The configuration tool for CUPS is a Web based GUI running on port </span><span class="T30">631</span><span class="T23">.</span></p><p class="P91"/><p class="Standard"><span class="T82">&#61510;</span><span class="T23"> When using cups </span><span class="T30">lpd</span><span class="T23"> is replaced by the </span><span class="T30">cupsd </span><span class="T23">daemon.</span></p><p class="Standard"/><table><caption>Table121</caption><tr><td>NOTICE</td></tr><tr><td>A local printer is physically detected at boot time for both USB and parallel connections. Information on the boot process is displayed at any time with dmesg </td></tr></table><p class="P32"/><p class="P32"/></section><section class="8. Sound Cards"><title>8. Sound Cards</title><p class="Standard"/><p class="Standard">There are two sound support projects for Linux, namely the open sound system (OSS) and the advanced Linux sound architecture (ALSA). In fact the OSS is a commercial project which supports sound drivers on other UNIX platforms. The original modified OSS drivers where introduced as part of the Linux 2.0 kernel.</p><p class="Standard"/><p class="Standard">The ALSA project is more recent and has only been integrated into the Linux 2.6 kernel. For kernels older than 2.6, using ALSA drivers often means recompiling the kernel except for some Linux distributions such as Suse which adopted ALSA at an early stage.</p><p class="Standard"/><p class="Standard">In most cases the card is configured when the system is installed. Graphical sound configuration tools are also included with all main Linux distributions. </p><p class="Standard"/><p class="Standard"/><p class="P95">Detecting the sound card</p><p class="Standard"/><p class="Standard">As usual we will use <span class="T7">dmesg</span><span class="T8"> to see if the kernel has detected the sound card as follows:</span></p><p class="P83"/><p class="P173"/><table><caption>Table214</caption><tr><td> dmesg | grep -i audioNeoMagic 256AV/256ZX audio driver, version 1.1pInitialized NeoMagic 256ZX audio in PCI native mode</td></tr></table><p class="P176"/><p class="P202"/><table><caption>Table215</caption><tr><td>NOTICE</td></tr><tr><td>The command above may return nothing, in which case you must search the output of dmesg again and try to determine which device corresponds to the sound card</td></tr></table><p class="P83"/><p class="P83"/><p class="P95">Using the sndconfig tool<span class="T8"> (LPI101 objective p.</span><span class="T8">152</span><span class="T8">)</span></p><p class="P83"/><p class="P83">The above sound card would be fully configured if we could find the correct kernel module using the information found with <span class="T7">dmesg</span>. In the OSS framework this kernel module is then associated to a device name used by applications called <span class="T16">sound-slot-0</span><span class="T41"> </span><span class="T17">(for the first sound device).</span> </p><p class="P83"/><p class="P83">This is what a sound configuration tool will do automatically for us. We choose (since it is an LPI101 objective) to discuss <span class="T7">sndconfig</span>. </p><p class="P83"/><p class="P83"/><p class="P83">This is a RedHat tool that configures audio devices using the OSS modules. You may need to install <span class="T7">sndconfig</span> as it is no longer installed on most Linux distributions. Then one simply types:</p><p class="P83"/><p class="P173"/><table><caption>Table216</caption><tr><td> sndconfig</td></tr></table><p class="P203"/><p class="P83">A graphical menu will be started with a message suggesting it will now probe for audio devices on you system. Select 'OK'. </p><p class="P83"/><p class="P83">On our system the following hardware was detected:</p><p class="P83"/><p class="P83">Neomagic Corporation | NM2360 [MagicMedia 256ZX Audio]</p><p class="Standard"/><p class="Standard">If no device is detected you will be presented with a list of manufacturers and card models supported by OSS from which to choose. If this happens, you may want to check the output of <span class="T7">lspci</span><span class="T8"> again and also the following site with supported models: http://www.opensound.com/osshw.html</span> </p><p class="Standard"/><p class="Standard">Once a model has been chosen <span class="T83">sndconfig</span><span class="T79"> will attempt to load the associated kernel module and play a sample (surprise!) sound. If this worked then the </span><span class="T83">/etc/modules.conf</span><span class="T79"> (covered in LPI 102) is automatically modified for us. To illustrate how our particular card has been configured here is the sound module entry:</span></p><p class="P204"/><table><caption>Table217</caption><tr><td>/etc/modules.conf (entry for sound card used in this section)</td></tr><tr><td>alias sound-slot-0 nm256_audio</td></tr></table><p class="P206"/></section><section class="9. Exercises and Summary"><title>9. Exercises and Summary</title><p class="P207"/><p class="P207"/><p class="Standard"><span class="T84">Review </span><span class="T84">Questions</span> (answers p.150)</p><p class="P207"/><p class="P207"/><p class="P208">Yes or No</p><p class="P207"/><p class="P207">1. The root partition of a Linux system must always be on an IDE disk__________</p><p class="P207"/><p class="P207">2. A Linux system can support any USB device as long as the kernel has </p><p class="P207">been compiled with USB support__________</p><p class="P207"/><p class="P207"/><p class="P207"/><p class="P207"/><p class="P209">Glossary</p><p class="Standard"/><p class="Standard"/><table><caption>Table183</caption><tr><td>Term</td><td>Definition</td></tr><tr><td>DMA</td><td>Direct Memory Access allows certain hardware components to access memory to perform read-writes without having to interrupt the CPU</td></tr><tr><td>I/O address</td><td>a predefined memory range used by hardware devices and the CPU to perform read and write operations</td></tr><tr><td>IRQ</td><td>signal sent to the CPU by a device in order to interrupt the current process and get it to do something else</td></tr><tr><td>resource allocation</td><td>collection of DMA, i/o port and IRQ settings allocated to a hardware device</td></tr><tr><td>SCSI</td><td>interface used to transfer data between a device and the computer bus. For example the device can be a hard drive, a tape drive, a CD-ROM, a CD writer or a scanner</td></tr><tr><td>USB</td><td>Universal Serial Bus is a standard allowing external hardware devices to be attached to a computer without having to reboot. The design consists of a host controller to which is attached an initial hub device. This hub can then accommodate USB devices or more hub devices allowing to attach up to 127 devices (including hubs) to a single host controller </td></tr></table><p class="P207"/><p class="P207"/><p class="P207"/><p class="P209">Resources</p><p class="Standard"/><p class="Standard"/><p class="Standard">The Winmodems-and-Linux HOWTO</p><p class="Standard">The Serial HOWTO</p><p class="Standard">The Modem HOWTO</p><p class="Standard">The Linux USB sub-system (http://www.linux-usb.org/)</p><p class="Standard">SCSI terminology (http://www.scsita.org/terms/scsiterms.html)</p><p class="Standard">The Linux 2.4 SCSI subsystem HOWTO</p><p class="Standard">The Ethernet HOWTO</p><p class="Standard">The Printing HOWTO</p><p class="Standard">The Sound HOWTO</p><p class="Standard">The isdn4linux project (<link title="" href="http://www.isdn4linux.de/">http://www.isdn4linux.de/</link>)</p><p class="Standard">The Roaring Penguin PPPoE project (<link title="" href="http://www.roaringpenguin.com/penguin/open_source_rp-pppoe.php">http://www.roaringpenguin.com/penguin/open_source_rp-pppoe.php</link>)</p><p class="Standard"/><p class="Standard"/><p class="P210"/><p class="P210"/><p class="P210"/><p class="P210">Files</p><p class="P210"/><table><caption>Table178</caption><tr><td>File</td><td>Description</td></tr><tr><td>/etc/isapnp.conf</td><td>a configuration file for isapnp - see isapnp.conf(5)</td></tr><tr><td>/proc/dma</td><td>list of currently used DMA channels</td></tr><tr><td>/proc/interrupts</td><td>list of currently used interrupts</td></tr><tr><td>/proc/ioports</td><td>list of currently used i/o ports</td></tr><tr><td>/proc/pci</td><td>list current information about the PCI bus</td></tr><tr><td>/etc/hotplug/usb.usermap</td><td>list of recognised USB devices</td></tr><tr><td>/var/log/dmesg</td><td>log file for current and boot time kernel messages </td></tr><tr><td>/proc/scsi/scsi</td><td>information about all SCSI devices &#8211; see scsi_info(8)</td></tr></table><p class="P32"/><p class="P32"/><p class="P21">Commands</p><p class="P32"/><table><caption>Table179</caption><tr><td>Command </td><td>Description</td></tr><tr><td>dmesg</td><td>print kernel message since boot time </td></tr><tr><td>hotplug</td><td>program used by the kernel to handle hardware related events - see hotplug(8)</td></tr><tr><td>isapnp</td><td>tool used to initialise ISA cards prior to kernel 2.4 &#8211; see isapnp(8)</td></tr><tr><td>lspci</td><td>list all PCI devices &#8211; see lspci(8)</td></tr><tr><td>lsusb</td><td>list all USB devices &#8211; see lsusb(8)</td></tr><tr><td>pnpdump</td><td>pnpdump(8) &#8211; dump ISA Plug-And-Play devices resource information</td></tr><tr><td>scsi_info</td><td>scsi_info(8) &#8211; SCSI device description tool</td></tr><tr><td>setserial</td><td>setserial(8) - get/set Linux serial port information</td></tr><tr><td>usbmgr</td><td>user space daemion which loads or unloads USB modules. It is an alternative to hotplug and generally used on Debian based systems </td></tr><tr><td>usb.agent</td><td>a hotplug agent which handles USB related events</td></tr><tr><td>usbmodules</td><td>usbmodules(8) &#8211; lists driver modules that may be able to manage interfaces on currently plugged in USB devices. usbmodules may be used by /sbin/hotplug or one of its agents (normally /etc/hotplug/usb.agent) when USB devices are "hot plugged" into the system</td></tr><tr><td>wvdial</td><td>a PPP dialer &#8211; see wvdial(1)</td></tr></table><p class="P32"/><p class="P32"/><p class="P32"/><p class="P21">Exercises</p><p class="Standard"/><p class="P211"><span class="T86">1.</span><span class="T45"> Use the </span><span class="T86">dmesg</span><span class="T45"> command to view the </span><span class="T86">/var/log/dmesg</span><span class="T45"> file. Search for keywords such as </span><span class="T87">USB, tty</span><span class="T45"> or </span><span class="T87">ETH0</span><span class="T45">. </span></p><p class="P212">- What are the names of the USB controllers used? </p><p class="P212">- What are the IRQs for the first two serial ports?</p><p class="P143"/><p class="Standard"><span class="T86">2. </span><span class="T45">Investigate the contents of the following files:</span></p><p class="P213"><span class="T88">/proc/ioports</span><span class="T89"><br/></span><span class="T88">/proc/interrupts</span></p><p class="P213"><span class="T88">/proc/pci</span></p><p class="P213"><span class="T88">/proc/dma</span></p><p class="P143"/><p class="Standard"><span class="T86">3.</span><span class="T45">The PCI bus:</span></p><p class="P213"><span class="T45">- Investigate the output of </span><span class="T86">lspci -v </span><span class="T45">and </span><span class="T86">scanpci &#8211;v</span><span class="T45">. What type of ethernet card is </span></p><p class="P212">present? </p><p class="P213"><span class="T45">- Verify that there are as many &#8216;</span><span class="T87">bus </span><span class="T45">&#8217; entries listed with </span><span class="T44">lspci </span><span class="T46">and</span><span class="T45"> </span><span class="T86">/proc/pci</span><span class="T45">. </span></p><p class="P214"/><p class="P214"/><p class="Standard"><span class="T86">4.</span><span class="T45">USB tools: </span></p><p class="P213"><span class="T45">- Use </span><span class="T86">lsmod</span><span class="T45"> and </span><span class="T86">lsusb</span><span class="T45"> to determine which host controller is used on your </span></p><p class="P212">system, UHCI, OHCI or EHCI (for USB v 2.0).</p><p class="Standard"><span class="T45">- Use </span><span class="T86">usbmodules</span><span class="T45"> to list the kernel module which can handle the plugged in interface.</span></p><p class="P143"/><p class="P215">5.<span class="T8">SCSI devices</span></p><p class="Standard"><span class="T90">- Given the following contents of the file </span><span class="T91">/proc/scsi/scsi</span><span class="T92"> deduce the output of the command </span><span class="T91">scsi_info</span><span class="T90"> (see p.</span><span class="T90">15</span><span class="T90">)</span><span class="T92">:</span></p><p class="Standard"><span class="T92"/></p><p class="Standard"><span class="T93">Attached devices: </span></p><p class="Standard"><span class="T93">Host: scsi0 Channel: 00 Id: 00 Lun: 00</span></p><p class="Standard"><span class="T93">Vendor: PHILIPS Model: CDRW48A Rev: P1.3</span></p><p class="Standard"><span class="T93">Type: CD-ROM ANSI SCSI revision: 02</span></p><p class="Standard"><span class="T92"/></p><p class="Standard"><span class="T92"/></p><p class="P216"/></section></section><section class="Managing Devices"><title>Managing Devices</title><p class="P207"/><p class="P207"/><p class="P113"/><p class="P217">Prerequisites</p><p class="P218"/><p class="P218">Experience with the Linux installation process (also see the section <span class="T7">Installation </span><span class="T8">on </span>p.1)</p><p class="P218"/><p class="P217">Goals</p><p class="P218"/><p class="P218">Understand the difference between a primary, an extended and a logical partition</p><p class="P218">Use partitioning tools when appropriate ( before or after an installation ) </p><p class="P218">Install and customise the boot loaders LILO and GRUB</p><p class="P218">Understand mount points and the role of the <span class="T7">/etc/fstab </span><span class="T8">file</span> </p><p class="P218"/><p class="P218"/><p class="P219">Contents</p><p class="P220"/><p class="P223"/><p class="P224"/><p class="P225"/><p class="P207"/><section class="1. Disks and Partitions"><title>1. Disks and Partitions</title><p class="P91"/><p class="P91"/><p class="Standard"><span class="T29">Physical disks</span><span class="T23">: </span></p><p class="P91"/><p class="P226"><span class="T23">On a running Linux system, disks are represented by entries in the </span><span class="T30">/dev</span><span class="T23"> directory. The kernel communicates with devices using a unique major/minor pair combination. All major numbers are listed in </span><span class="T30">/proc/devices</span><span class="T23">. For example the first IDE controller&#8216;s major number is </span><span class="T30">3</span><span class="T23">:</span></p><p class="P227"/><p class="P228"/><p class="P228">Block devices:</p><p class="P228">1 ramdisk</p><p class="P228">2 fd</p><p class="P228">3 ide0</p><p class="P229"/><p class="P226"><span class="T23">Hard disk descriptors in </span><span class="T30">/dev</span><span class="T23"> begin with </span><span class="T81">hd</span><span class="T23"> (IDE) or </span><span class="T81">sd</span><span class="T23"> (SCSI), a SCSI tape would be </span><span class="T81">st</span><span class="T23">, and so on. Since a system can have more than one block device, an additional letter is added to the descriptor to indicate which device is considered.</span></p><p class="P230"/><p class="P227"/><table><caption>Table6</caption><tr><td>Table 1</td><td>Physical block devices</td></tr><tr><td>hda</td><td>Primary Master</td></tr><tr><td>hdb</td><td>Primary Slave</td></tr><tr><td>hdc</td><td>Secondary Master</td></tr><tr><td>hdd</td><td>Secondary Slave</td></tr><tr><td>sda</td><td>First SCSI disk</td></tr><tr><td>sdb</td><td>Second SCSI disk</td></tr></table><p class="P227"/><p class="P227"/><p class="P227">NB Inserting a new SCSI hard drive with a target number between two existing drives will bump up the device letter of the higher numbered drive. This can cause chaos within a disk system.</p><p class="P227"/><p class="P227"/><p class="Standard"><span class="T29">Disk </span><span class="T29">Partitions</span><span class="T23">:</span></p><p class="P91"/><p class="P91">Disks can further be partitioned. To keep track of the partitions a number is added at the end of each physical device.</p><p class="P163"/><p class="P163"/><table><caption>Table7</caption><tr><td>Table 2</td><td>Partitions </td></tr><tr><td>hda1</td><td>First partition on first hard disk</td></tr><tr><td>hda2</td><td>Second partition on first hard disk</td></tr><tr><td>sdc3</td><td>Third partition on third SCSI disk</td></tr></table><p class="Standard"/><p class="P91"/><p class="P91">IDE type disks allow 4 <span class="T75">primary</span> partitions, one of which can be <span class="T16">extended</span>. The extended partition can further be divided into <span class="T75">logical</span> partitions. There can be a maximum of 64 partitions on an IDE disk and 16 on a SCSI disk. </p><p class="P237"/><p class="P237"/><p class="P237"/><p class="P237"/><p class="P237"/><p class="Standard"><span class="T94">Example 1</span><span class="T23">: The primary partitions (1,2,3,4) and (1,2,5,6,7,8)</span></p><p class="P91"/><p class="P91"><img alt="Graphic17" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000000000002D00000021C50A6C9A5.png"/></p><p class="P238"/><p class="P238"/><p class="P238"/><p class="P238"/><p class="P239"><span class="T95">Typical output of </span><span class="T96">fdisk</span><span class="T96"> -l</span><span class="T23"> </span></p><p class="P240"/><table><caption>Table8</caption><tr><td>Device Boot Start End Blocks Id System/dev/hda1 * 1 748 6297448+ b Win95 FAT32/dev/hda2 785 788 32130 83 Linux/dev/hda3 789 2432 13205430 5 Extended/dev/hda5 789 1235 3590496 83 Linux/dev/hda6 1236 1618 3076416 83 Linux/dev/hda7 1619 1720 819283+ 83 Linux/dev/hda8 1721 1784 514048+ 83 Linux/dev/hda9 1785 1835 409626 83 Linux/dev/hda10 1836 1874 313236 83 Linux/dev/hda11 1875 1883 72261 82 Linux swap</td></tr></table><p class="P240"/><p class="P243"/><p class="P243">On this system the main feature to notice is that there are 3 primary partitions. The third partition is extended (/dev/hda3) and holds 8 logical partitions. The primary partition /dev/hda3 is not used. In fact /dev/hda3 acts as a 'container' and a filesystem exists only on the enclosed logical partitions.</p><p class="P244"/><p class="P245"/><table><caption>Table116</caption><tr><td>NOTICE</td></tr><tr><td>Make sure to distinguish between primary, extended and logical partitions. Also make sure you understand the naming convention for the IDE disks and controllers. </td></tr></table><p class="Standard"/><p class="Standard"/><p class="P244"/><p class="P244"/><p class="P244"/><p class="P244"/></section><section class="2. Partitioning Tools:"><title>2. Partitioning Tools:</title><p class="P246"/><p class="P247"><span class="T23"/><span class="T97">1. Before installation</span><span class="T23">:(not for exam purpose)</span></p><p class="P248"/><p class="P248">PartitionMagic </p><p class="P247"><span class="T31">fips</span><span class="T23"> </span></p><p class="P249"/><p class="P250"/><p class="P250">Notice that <span class="T7">fips</span> only handles <span class="T7">fat16 </span>and<span class="T7"> fat32</span>. On the other hand, <span class="T7">PartitionMagic</span> is much more versatile and can handle most common UNIX formats as well.</p><p class="P248"/><p class="P247"><span class="T31">No partitioning</span><span class="T23"> is needed if for example C:\ and D:\ exist and the D:\ drive is empty.</span></p><p class="P251"/><p class="P252">Partitioning before installation:</p><p class="P252"/><p class="P252"/><p class="P253"><img alt="Graphic18" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000000000002D00000021C6B842F36.png"/></p><p class="P254"/><p class="P254"/><p class="P254"/><p class="P255"><span class="T97">2. During installation</span><span class="T23">:(not for exam purpose)</span></p><p class="P249"/><p class="P256"><span class="T23">While installing Linux you will have the choice of creating new partitions and associating each partition to a mount point (see p.</span><span class="T23">5</span><span class="T23">). </span></p><p class="P84"/><p class="P84">For advanced users this is done in two steps:</p><p class="P84"/><p class="P256"><span class="T23">1. Use the </span><span class="T31">fdisk</span><span class="T23"> tool to create new partitions</span></p><p class="P84">2. Associate a mount point to each partition</p><p class="P84"/><p class="P84"/><p class="P84">For intermediate users most distributions include a user friendly tool that does both these steps at once:</p><p class="P257"/><p class="P256"><span class="T31">diskdrake </span><span class="T23">(Mandrake) </span></p><p class="P256"><span class="T31">DiskDruid</span><span class="T23"> (RedHat) </span></p><p class="P84"/><p class="P84"/><p class="P84"/><p class="P84">Finally, for beginners and busy sysadmin&#8217;s, the latest Linux distributions will automatically assign a partition scheme. </p><p class="P84"/><p class="P246"/><p class="P246"/><p class="P245"><span class="T97">3. On a Running System</span><span class="T74">:</span></p><p class="P246"/><p class="P245"><span class="T23">Once the operating system is installed you can use the </span><span class="T31">fdisk</span><span class="T23"> utility to configure new partitions.</span></p><p class="P246"/><p class="P245"><span class="T23">We will next look at the basic syntax for </span><span class="T31">fdisk</span></p><p class="P246"/><p class="P246"/><p class="P246"/><p class="P245"><span class="T74">Example</span><span class="T23">:</span></p><p class="P246"/><p class="P246"/><p class="P246">1) Start partitioning the first hard drive: </p><p class="P246"/><p class="P258"/><p class="P259"><span class="T98"><img alt="Graphic19" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T98"/><span class="T99">fdisk /dev/hda</span></p><p class="P260"/><p class="P260"/><p class="P246"/><p class="P245"><span class="T23">2) Type </span><span class="T31">m</span><span class="T23"> for help. Then create a new partition with </span><span class="T31">n</span><span class="T23">.</span></p><p class="P246"/><p class="P246">3) To write the changes to disk type <span class="T7">w</span>.</p><p class="P246"/><p class="P246">4) REBOOT.</p><p class="P246"/><p class="P246"/><p class="P246">These four points outline the steps you would follow to create new partitions. The last point</p><p class="P245"><span class="T23">is often overlooked. This forces the partition table in the master boot record </span><span class="T31">MBR</span><span class="T23"> to be reread.</span></p><p class="P246"/><p class="P246"/><table><caption>Table117</caption><tr><td>NOTICE</td></tr><tr><td>You need to create a filesystem on a new partition with mkfs or mke2fs before using it</td></tr></table><p class="P89"/><p class="P246">This ends the survey of available partitioning tools. We next take a look at bootloaders.</p><p class="P246"/></section><section class="3. Bootloaders"><title>3. Bootloaders</title><p class="P78"/><p class="P78">The MBR occupies the first sector of the disk (512 bytes) and contains the partition tables together with a bootloader. At boot time the bootloader reads the partition tables looking for a partition marked &#8220;active&#8221; and loads the first sector of this partion.</p><p class="P78"/><p class="P262"/><ol><li><p class="P263">LILO the Linux Bootloader</p></li></ol><p class="P264"/><p class="P78">There are roughly 3 parts involved:</p><p class="P78"/><p class="P78">1. LILO</p><p class="P78"/><p class="Standard"><span class="T33">This is the loader itself. LILO is installed on the MBR and loads the second stage bootloader, generally situated in </span><span class="T34">/boot/boot.b</span><span class="T33">. </span></p><p class="P78"/><p class="P78"/><p class="P78">2. /etc/lilo.conf</p><p class="P78"/><p class="P78">The main options are specified here </p><p class="P265"/><p class="P266"/><p class="P267"><span class="T55">boot</span><span class="T8">*</span>where LILO should be installed (/dev/hda is the MBR)</p><p class="P268"><span class="T34">install</span><span class="T33">which second stage to install (</span><span class="T34">boot.b</span><span class="T33"> is the default)</span></p><p class="P268"><span class="T34">prompt</span><span class="T33">give the user a chance to choose an OS to boot</span></p><p class="P268"><span class="T34">default</span><span class="T33">name of the image that will be booted by default</span></p><p class="P268"><span class="T34">timeout</span><span class="T33">used with prompt, causes LILO to pause (units are 1/10 of a sec)</span></p><p class="P268"><span class="T34">image</span><span class="T100">*</span><span class="T34"/><span class="T33">path to the kernel to boot (one can use &#8216;other&#8217; to chain load)</span></p><p class="P268"><span class="T34">label</span><span class="T100">*</span><span class="T34"/><span class="T33">name of the image. This is the name a user can type at the boot prompt</span></p><p class="P268"><span class="T34">root</span><span class="T100">*</span><span class="T34"/><span class="T33">the name of the disk device which contains the root filesystem </span><span class="T34">/</span></p><p class="P268"><span class="T34">read-only</span><span class="T100">*</span><span class="T34"/><span class="T33">mount the root filesystem read-only for </span><span class="T34">fsck</span><span class="T33"> to work properly</span></p><p class="P268"><span class="T34">append</span><span class="T33">give kernel parameters for modules that are statically compiled.</span></p><p class="P268"><span class="T34">linear/lba32</span><span class="T33">these options are mutually exclusive. Both ask LILO to read the disk using Linear Block Addressing. </span><span class="T34">linear </span><span class="T33">is typically used for very large disks. </span><span class="T35">lba32</span><span class="T100"> is used to allow boot time access to data beyond the first </span><span class="T100">1024 cylinders</span><span class="T100"> (also see p.</span><span class="T100">36</span><span class="T100">)</span></p><p class="P267"/><p class="P78"/><p class="P78"/><p class="P78">3. /sbin/lilo</p><p class="P78"/><p class="P78">This binary reads it&#8217;s configuration file /etc/lilo.conf and installs the LILO bootloader.</p><p class="P78"/><p class="Standard"><span class="T33"/><span class="T34">/sbin/lilo</span><span class="T33"> should be run every time a change is made to </span><span class="T34">/etc/lilo.conf</span><span class="T33"> </span></p><p class="P78"/><p class="P78"/><p class="P78"/><p class="P78"/><ol><li><p class="P269">GRUB the Grand Unified Bootloader</p></li></ol><p class="P78"/><p class="P78"/><p class="P78">GRUB is also installed on the MBR. You can either alter this MBR with the <span class="T55">/sbin/</span><span class="T55">grub</span> shell or use a configuration file called <span class="T7">/boot/grub/</span><span class="T55">grub.conf</span> which will be read by <span class="T55">/sbin/</span><span class="T55">grub-install</span> </p><p class="P78"/><p class="Standard"><span class="T33">Detailed information about GRUB can be found in the </span><span class="T34">info </span><span class="T33">pages</span></p><p class="P78"/><p class="P78"/><p class="P78">Main sections in <span class="T55">/boot/grub/grub.conf</span>:</p><p class="P78"/><p class="P78">1. General/Global</p><p class="P265"/><p class="P270"><span class="T34">default</span><span class="T33">image that will boot by default (the first entry is 0)</span></p><p class="P270"><span class="T34">timeout</span><span class="T33">prompt timeout in seconds</span></p><p class="P78"/><p class="P78">2. Image</p><p class="P265"/><p class="P270"><span class="T34">title</span><span class="T33">name of the image</span></p><p class="P271"><span class="T34">root</span><span class="T33">where the 2</span><span class="T101">nd</span><span class="T33"> stage bootloader and kernel are e.g (hd0,0) is /dev/hda</span></p><p class="P271"><span class="T34">kernel</span><span class="T33">path for the kernel starting from the previous root e.g /vmlinuz</span></p><p class="P270"><span class="T34">ro</span><span class="T33">read-only</span></p><p class="P270"><span class="T34">root</span><span class="T33">the filesystem root</span></p><p class="P270"><span class="T34">initrd</span><span class="T100">path to the initial root disk</span></p><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><table><caption>Table97</caption><tr><td>Examplegrub.conf </td></tr><tr><td>default=0</td></tr><tr><td>timeout=10</td></tr><tr><td>splashimage=(hd0,0)/grub/splash.xpm.gz</td></tr><tr><td>title Linux (2.4.18-14)</td></tr><tr><td>root (hd0,0)</td></tr><tr><td>kernel /vmlinuz-2.4.18-14 ro root=/dev/hda5</td></tr><tr><td>initrd /initrd-2.4.18-14.img</td></tr></table><p class="P265"/><p class="P265"/><p class="P265"/></section><section class="4. Managed devices"><title>4. Managed devices</title><p class="P78"/><p class="Standard"><span class="T33">At boot time the </span><span class="T34">/etc/</span><span class="T34">fstab</span><span class="T33"> file assigns mount points for block devices.</span></p><p class="P78"/><p class="P78"/><p class="P81">The /etc/fstab format</p><p class="P78"/><p class="P78"/><table><caption>Table151</caption><tr><td>device mount-point fstype options dump-number fsck-number</td></tr></table><p class="P78"/><p class="P81"/><p class="P81"/><p class="P81">Sample /etc/fstab</p><p class="P81"/><p class="P275">LABEL=//ext2defaults1 1</p><p class="P275">LABEL=/boot /boot ext2defaults1 2</p><p class="P275">LABEL=/home /home ext3defaults1 2</p><p class="P275">/dev/fd0/mnt/floppy autonoauto,owner0 0</p><p class="P275">LABEL=/usr/usrext2defaults1 2</p><p class="P275">LABEL=/var/varext3defaults1 2</p><p class="P275">none/procprocdefaults0 0</p><p class="P275">none/dev/shmtmpfsdefaults0 0</p><p class="P275">none/dev/pts devpts gid=5,mode=6200 0</p><p class="P275">/dev/hdc9swap,pri=-1swapdefaults0 0</p><p class="P275">/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0</p><p class="P78"/><p class="P78"/><p class="P78">The <span class="T7"/><span class="T7">mount</span><span class="T7"> </span><span class="T8">command is used to make a particular device available on a specific directory (mount point). The syntax is:</span></p><p class="P79"/><p class="P79"/><p class="P276"><span class="T35">mount</span><span class="T35"> -t [FSTYPE] -o [OPTIONS] DEVICE DIRECTORY</span> </p><p class="P78"/><p class="P78">For example we can mount a CDROM on the mount point <span class="T7">/mnt/cdrom</span><span class="T8"> with:</span></p><p class="P79"/><p class="P78"/><p class="P277"><span class="T28"><img alt="Graphic93" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T102">mount -t iso9660 /dev/cdrom /mnt/cdrom</span></p><p class="P278"/><p class="P279"/><p class="P78"/><p class="P78"/><p class="Standard"><span class="T33">On a running system the </span><span class="T34">/etc/fstab</span><span class="T33"> file also acts as a </span><span class="T103">shortcut</span><span class="T33"> for assigning a resource to a specific directory. For example:</span></p><p class="P78"/><p class="P78"/><p class="P277"><span class="T28"><img alt="Graphic21" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T102">mount /dev/cdrom</span></p><p class="P278"/><p class="P280"/><p class="P78"/><p class="Standard"><span class="T33">The </span><span class="T34">mount </span><span class="T33">utility reads </span><span class="T34">fstab </span><span class="T33">and deduces where to mount the resource. Notice that some of the devices are accessed using a label. Labels are assigned to devices with the </span><span class="T34">tune2fs</span><span class="T33"> tool:</span></p><p class="P78"/><p class="P78"/><p class="P277"><span class="T28"><img alt="Graphic22" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T102">tune2fs -L /usr/local /dev/hdb12</span></p><p class="P278"/><p class="P78"/><p class="P78"/><p class="P78"/><table><caption>Table119</caption><tr><td colspan="2">Option summary for mount:</td></tr><tr><td>rw,ro</td><td>read-write and read-only</td></tr><tr><td>noauto</td><td>the device is not mounted at boot time</td></tr><tr><td>users</td><td>the device can be read and unmounted by all users</td></tr><tr><td>user </td><td>the device can be unmounted only by the user</td></tr><tr><td>owner</td><td>the device will change it's permission and belong to the user that mounted it</td></tr><tr><td>usrquota</td><td>start user quotas on the device</td></tr><tr><td>grpquota</td><td>start group quotas on the device</td></tr></table><p class="P78"/><p class="P246"/><p class="P246"/><table><caption>Table118</caption><tr><td>NOTICE</td></tr><tr><td>Remember that mount -a will mount all filesytems in /etc/fstab that have not been mounted and do not have the option noauto</td></tr></table><p class="P89"/><p class="P281"/><p class="P281">The <span class="T7"/><span class="T7">umount</span><span class="T8"> command will unmount a device. Notice that the command is misspelled! The syntax is:</span></p><p class="P282"/><p class="P282"/><p class="P283">umount DEVICE<span class="T8"> or </span>MOUNT-POINT</p><p class="P281"/><p class="P281"/><p class="P281">For example the following commands will both unmount the CDROM device:</p><p class="P281"/><p class="P78"/><p class="P277"><span class="T28"><img alt="Graphic95" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T102">umount /dev/cdrom</span></p><p class="P278"/><p class="P284"/><p class="P284">or</p><p class="P284"/><p class="P277"><span class="T28"><img alt="Graphic96" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T102">umount /mnt/cdrom</span></p><p class="P278"/><p class="P285"/><p class="P281"/><p class="P281"/></section><section class="5. Quotas"><title>5. Quotas</title><p class="P78"/><p class="P78">The quota tools allow administrators to set up quotas without having to reboot. Here are the steps.</p><p class="P78"/><p class="Standard"><span class="T34">1.</span><span class="T33"> Edit </span><span class="T34">/etc/fstab</span><span class="T34"> </span><span class="T33">and add </span><span class="T104">usrquota</span><span class="T102"> </span><span class="T33">to the options</span></p><p class="P265"/><p class="Standard"><span class="T34">2.</span><span class="T33"> Remount the partition:</span></p><p class="P78"/><p class="P286"><span class="T28"><img alt="Graphic23" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T33"/><span class="T102">mount -o remount &lt;device&gt;</span><span class="T33"> </span></p><p class="P287"/><p class="P265"/><p class="Standard"><span class="T34">3.</span><span class="T33"> Start the quota stats: </span></p><p class="P78"/><p class="P286"><span class="T28"><img alt="Graphic24" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T33"/><span class="T102">quotacheck</span><span class="T102"> -ca</span><span class="T33"> </span></p><p class="P287"/><p class="P78"/><p class="Standard"><span class="T33">The preliminary </span><span class="T34">aquota.user</span><span class="T34"> </span><span class="T100">database</span><span class="T34"> </span><span class="T33">file</span><span class="T34"> </span><span class="T33">is generated at the top of the directory.</span></p><p class="P78"/><p class="P78"/><p class="Standard"><span class="T34">4.</span><span class="T33"> Edit quotas for each user: </span></p><p class="P78"/><p class="P288"><span class="T28"><img alt="Graphic25" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T33"/><span class="T102">edquota</span><span class="T102"> -u </span><span class="T105">&lt;user&gt;</span></p><p class="P289"/><p class="P78"/><p class="P78">Here a soft/hard limit must be set for both the number of blocks and inodes available for each user.</p><p class="P78"/><p class="Standard"><span class="T33">The system will allow the user to exceed the soft limit during a certain </span><span class="T34">grace</span><span class="T33"> period. After the grace period has expired the soft limit will be enforced as a hard limit.</span></p><p class="P78"/><p class="Standard"><span class="T34">5.</span><span class="T33"> START enforcing quotas:</span></p><p class="P15"/><p class="P288"><span class="T28"><img alt="Graphic26" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T33"/><span class="T102">quotaon</span><span class="T102"> &#8211;a</span></p><p class="P290"/><p class="P78"/><p class="Standard"><span class="T33">Users can query the quota status with </span><span class="T34">quota</span><span class="T33">. The system administrator can generate reports with </span><span class="T34">repquota</span><span class="T33"> or </span><span class="T34">quotastats</span><span class="T33">.</span></p><p class="P78"/><p class="P281"/></section><section class="6. Exercises and Summary"><title>6. Exercises and Summary</title><p class="P207"/><p class="P207"/><p class="Standard"><span class="T84">Review </span><span class="T84">Questions</span> (answers p.150)</p><p class="P207"/><p class="P208">Yes or No</p><p class="Standard"/><p class="Standard">1. When LILO is installed and further changes are made to <span class="T7">lilo.conf</span> it is </p><p class="Standard">not necessary to re-run <span class="T7">/sbin/lilo</span>______</p><p class="Standard"/><p class="Standard">2. When GRUB is installed and further changes are made to <span class="T7">grub.conf</span> it is </p><p class="Standard">not necessary to re-run <span class="T7">grub-install</span>______</p><p class="Standard"/><p class="P207"/><p class="P207">3. If <span class="T7">/root</span> is beyond the 1024 cylinder limit then a Linux system may not boot______</p><p class="P207"/><p class="P207">4. Quotas may only be used on an entire partition______</p><p class="P207"/><p class="P207"/><p class="P207"/><p class="P95">Glossary</p><p class="Standard"/><p class="Standard"/><table><caption>Table210</caption><tr><td>Term</td><td>Description</td></tr><tr><td>partition</td><td>an independent section of a hard drive which can either be used to directly store data or can be further divided into (logical) partitions. Since all partitions mounted and manipulated by the operating system have a separate filesystem and are considered as independent devices, a partition is also sometime called a 'device' or even a 'filesystem' </td></tr><tr><td>primary (partition)</td><td>partition described by one of the original partition record kept in the partition table. Only four such records are available, therefore disks can only have four primary partitions </td></tr><tr><td>extended (partition)</td><td>a primary partition whose partition record contains a linked list of partition records making it possible to create further partitions called 'logical partitions' as opposed to primary </td></tr><tr><td>logical (partition)</td><td>a partition contained in an extended partition</td></tr><tr><td>MBR</td><td>the first sector (512 bytes) of a hard drive which contains the boot loader and the disks partition tables</td></tr><tr><td>1024 cylinder limit</td><td>when using CHS addressing old BIOS systems would use 10 bits to read the number of cylinders ,8 bits for the heads and 6 bits for the sectors. This would allow access to disks with a maximum size of (2^10)*(2^8)*(2^6-1)*512 bytes which corresponds to 8.5 GB (metric). When running /sbin/lilo addresses are given in CHS form (unless lba32 or linear is used) for the BIOS to read. If the second stage boot loader /boot/boot.b is 'further' than 1024 cylinders away from the MBR then the system will not boot </td></tr><tr><td>bootloader</td><td>code stored in the first 512 bytes of a disk which is read by the BIOS and used to start an operating system </td></tr><tr><td>GRUB</td><td>Grand Unified Bootloader</td></tr><tr><td>LILO</td><td>Linux boot Loader</td></tr><tr><td>quotas</td><td>mechanism available per device to set restrictions on the amount of inodes and data blocks per user or group</td></tr><tr><td>grace</td><td>time limit for files and data that have exceeded their soft limit</td></tr></table><p class="P207"/><p class="P207"/><p class="P209">Files</p><p class="Standard"/><table><caption>Table209</caption><tr><td>File</td><td>Description</td></tr><tr><td>/boot/boot.b</td><td>The LILO second stage bootloader</td></tr><tr><td>grub.conf</td><td>configuration file for GRUB</td></tr><tr><td>/etc/fstab</td><td>fstab(5) &#8211; The file fstab contains descriptive information about the various file systems. fstab is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file</td></tr><tr><td>/etc/lilo.conf</td><td>configuration file read by the bootloader installation mapper /sbin/lilo</td></tr><tr><td>/proc/devices</td><td>devices found on the system and their associated major number</td></tr><tr><td>aquota.user</td><td>database file stored on the root of the device where user quotas are inforced</td></tr></table><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="P95">Commands</p><p class="Standard"/><table><caption>Table208</caption><tr><td>Command</td><td>Description or apropos</td></tr><tr><td>/sbin/lilo</td><td>lilo(8) &#8211; install boot loader</td></tr><tr><td>edquota</td><td>edquota(8) &#8211; edit user quotas</td></tr><tr><td>fdisk</td><td>fdisk(8) &#8211; partition table manipulator for Linux</td></tr><tr><td>grub-install</td><td>grub-install(8) - install GRUB on your drive</td></tr><tr><td>mount</td><td>mount(8) &#8211; mount a file system</td></tr><tr><td>quotas</td><td>quota(1) &#8211; display disk usage and limits</td></tr><tr><td>quotacheck</td><td>quotacheck(8) &#8211; scan a filesystem for disk usage, create, check and repair quota (database) files</td></tr><tr><td>quotaon</td><td>quotaon(8) / quotaoff &#8211; turn filesystem quotas on and off</td></tr><tr><td>quotastats</td><td>quotastats(8) &#8211; program to query quota statistics</td></tr><tr><td>repquota</td><td>repquota(8) &#8211; summarize quotas for a filesystem</td></tr><tr><td>tune2fs</td><td>tune2fs(8) &#8211; adjust tunable filesystem parameters on second extended filesystems</td></tr><tr><td>usrquota,grpquota</td><td>(not a command) option set in /etc/fstab to enable quotas on a device</td></tr><tr><td>umount</td><td>umount(8) &#8211; unmount file systems</td></tr></table><p class="P207"/><p class="P207"/><p class="P209">Exercises</p><p class="P207"/><p class="P245"><span class="T30">1.</span><span class="T23"> Create 1 new partition on the </span><span class="T30">/dev/hda</span><span class="T23"> device using </span><span class="T30">fdisk</span><span class="T23">.</span></p><p class="P245"/><p class="P245"><span class="T27">fdisk /dev/hda</span></p><p class="P294"/><p class="P294">HINT: To create a new partition type <span class="T55">n</span>. The partition type defaults to <span class="T55">83</span> (Linux)</p><p class="P295"><span class="T23">To write the new partition table type </span><span class="T30">w</span><span class="T23">. </span></p><p class="P294">The partition table needs to be read: REBOOT the computer !</p><p class="P294"/><p class="P296"/><p class="Standard"><span class="T86">2.</span><span class="T45"> Make a new filesystem (format) on one of the partitions:</span></p><p class="P214"/><p class="P296"><span class="T57"/><span class="T59">mkfs &lt;device&gt;</span> </p><p class="P143"/><p class="P143"/><p class="Standard"><span class="T86">3.(i) </span><span class="T46">Make a directory called </span><span class="T44">data in the root directory.</span></p><p class="P215"/><p class="P143"><span class="T7"/><span class="T12">mkdir /data</span></p><p class="P215"/><p class="P143"><span class="T7">(ii) </span><span class="T8">Edit</span> <span class="T55">/etc/fstab</span> and allocate the mount point <span class="T55">/data</span> to this new resource</p><p class="P143"/><p class="P143"><span class="T13">&lt;device&gt;/dataext2defaults0 2</span></p><p class="P297"/><p class="Standard"><span class="T86">4.</span><span class="T45"> Force </span><span class="T86">mount</span><span class="T45"> to read </span><span class="T86">/etc/fstab</span><span class="T45">:</span></p><p class="P214"/><p class="P298"><span class="T60"/><span class="T8">mount &#8211;a</span></p><p class="P214"/><p class="P214"><span class="T8">If this doesn't work check that each entry is correct in the </span><span class="T106">fstab</span> <span class="T8">and make sure that the directory </span><span class="T106">/data</span><span class="T8"> exists (</span><span class="T106">2 (i)</span><span class="T8">)</span></p><p class="P299"/><p class="Standard"><span class="T86">5. </span><span class="T45">Follow the steps in this chapter to enforce quotas on this device</span>. </p><p class="P143"/><p class="P143">After step <span class="T7">(2)</span><span class="T8"> run the </span><span class="T7">mount</span><span class="T8"> command and look at the output. Which option from </span></p><p class="P143"><span class="T8"/><span class="T7">/etc/fstab</span><span class="T8"> can be seen showing that quotas are availabe on the device? _________ </span></p><p class="P143"/><p class="P143">After step <span class="T7">(3)</span><span class="T8"> which file is created in the </span><span class="T7">/data</span><span class="T8"> directory? __________</span></p><p class="P143"/><p class="P143">Before testing quotas for with non-root users, add read-write permissions on <span class="T7">/data</span></p><p class="P299"/><p class="P299"><span class="T13">chmod o+rw /data</span></p><p class="P143"/><p class="P143">In extreme cases it may be easier to reboot and let the init scripts build the <span class="T7">aquota.user</span> (or <span class="T7">aquota.group</span><span class="T8">)</span> file. If nothing is showing with the <span class="T7">quotas</span><span class="T8">, </span><span class="T7">repquota</span><span class="T8">, or </span><span class="T7">quotastats</span> tools make sure you have read-write access for everyone on <span class="T7">/data </span><span class="T8">[chmod a+rw /data ]</span></p><p class="P143"/><p class="Standard"><span class="T86">6.</span><span class="T45"> (OPTIONAL) The instructor computer has a NFS share. Find out which directory is shared and edit </span><span class="T86">/etc/fstab</span><span class="T45"> to mount this share on </span><span class="T86">/mnt/nfs</span><span class="T46">. Use the </span><span class="T44">noauto</span><span class="T45"> option fot the share not to mount at boot time.</span></p><p class="P143"/><p class="P214">7. SWAPPING bootloaders<span class="T8"> </span></p><p class="P143"/><p class="P143">a. Uninstall LILO from the MBR (or the floppy) </p><p class="Standard"><span class="T86"/><span class="T107">lilo &#8211;u</span></p><p class="Standard"><span class="T45">b. Modify the </span><span class="T86">grub.conf</span><span class="T45"> sample on p. 28 to reflect your system</span></p><p class="Standard"><span class="T45">c. Install GRUB on the floppy with </span><span class="T86">grub-install /dev/fd0</span><span class="T45"> </span></p><p class="P78"/><p class="P300"/></section></section><section class="The Linux Filesystem"><title>The Linux Filesystem</title><p class="P207"/><p class="P113"/><p class="P113"/><p class="P217">Prerequisites</p><p class="P218"/><p class="P218">Experience with the Linux installation process (also see the section <span class="T7">Installation </span><span class="T8">on </span>p.1)</p><p class="P218"/><p class="P217">Goals</p><p class="P218"/><p class="P218">Introduce the base directories and concepts from the File System Hierarchy (FHS)</p><p class="P218">Make a filesystem of any type (e.g EXT2or EXT3) on a partition </p><p class="P218">Monitor free space per device or directory</p><p class="P218">Understand the UNIX-like file and directory permissions </p><p class="P218"/><p class="P218"/><p class="P302">Contents</p><p class="P72"/><p class="P303"/><p class="P302"/><p class="P207"/><p class="P304"/><section class="1. The Filesystem Structure"><title>1. The Filesystem Structure</title><p class="P91"/><p class="P91">A filesystem is similar to a tree structure. The root of the tree is represented at the top and the leaves below.</p><p class="P91"/><p class="P91">As mentioned earlier, once partitions have been created each partition must be given a <span class="T16">mount point</span>. This is typically done at installation time. To help us understand where things are kept, let us look at the Linux file system hierarchy.</p><p class="P91"/><p class="P91">The top of a Linux file system hierarchy starts at root (/). This is similar to C:\ under DOS except that C:\ is also the first device, whereas the root directory can be mounted anywhere.</p><p class="P143"/><p class="P143"/><p class="P143">Figure 1: The base directories</p><p class="P305"><img alt="Graphic27" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000000000002D00000021C0B500BB0.png"/></p><p class="P113"/><p class="P91"/><p class="Standard"><span class="T23">The base directories are the first subdirectories under the root directory. These are installed by an </span><span class="T74">rpm </span><span class="T23">package usually called </span><span class="T74">filesystem</span><span class="T23">.</span></p><p class="P113"/><p class="P113"/><table><caption>Table106</caption><tr><td>rpm -ql filesystem</td></tr></table><p class="P113"/><p class="P113"/><p class="P113">During the booting process the kernel first mounts the root (/) partition. In order to mount and check any further partitions and filesystems a certain number of programs such as <span class="T7">fsck</span>, <span class="T7">insmod</span> or <span class="T7">mount</span> must be available. </p><p class="P47"/><p class="P47"/><p class="P113"><span class="T108">&#61503;</span>The directories <span class="T7">/dev</span>, <span class="T41">/bin</span>, <span class="T41">/sbin</span>, <span class="T41">/etc</span> and <span class="T41">/lib</span> must be subdirectories of root (/) and not mounted on separate partitions. Added to this, there must be an empty directory <span class="T7">/proc</span> on the root device used by the kernel to report information about the operating system (e.g processes, memory statistics, etc ...)<span class="T8"> </span></p><p class="P306"/><p class="P306"/><p class="P306"/><p class="P306">Base directories:</p><p class="P47"/><p class="P47"/><ol><li><p class="P307">/bin and /sbin</p></li></ol><p class="P202">Contain binaries needed to boot up the system and essential commands.</p><p class="P308"/><p class="P308"/><ol><li><p class="P309">/dev</p></li></ol><p class="P310">Location for device or special files</p><p class="P310"/><p class="P310"/><ol><li><p class="P311">/etc</p></li></ol><p class="P312"><span class="T8">Host specific configuration files</span></p><p class="P310"/><p class="P310"/><ol><li><p class="P313">/lib</p></li></ol><p class="P310">Shared libraries for binaries in <span class="T7">/bin</span> and <span class="T7">/sbin</span>. Also contains kernel modules</p><p class="P310"/><p class="P310"/><ol><li><p class="P314">/mnt/ or /media (Suse)</p></li></ol><p class="P310">Mount point for external filesystems</p><p class="P310"/><p class="P310"/><ol><li><p class="P315">/proc</p></li></ol><p class="P316">Kernel information. Read-only except for <span class="T7">/proc/sys/</span></p><p class="P310"/><p class="P310"/><ol><li><p class="P317">/boot</p></li></ol><p class="P310">Contains the Linux kernel, the system maps and the &#8220;second stage&#8221; bootloaders.</p><p class="P310"/><p class="P310"/><ol><li><p class="P318">/home (optional)</p></li></ol><p class="P310">The directories for users. Initially contains the contents from <span class="T7">/etc/skel/</span></p><p class="P310"/><p class="P310"/><ol><li><p class="P318">/root (optional)</p></li></ol><p class="P310">The directory for user root</p><p class="P310"/><p class="P310"/><ol><li><p class="P318">/tmp</p></li></ol><p class="P312"><span class="T8">Temporary files </span></p><p class="P310"/><p class="P310"/><ol><li><p class="P318">/usr</p></li></ol><p class="P312"><span class="T8">User Specific Resource. Mainly static and shareable content</span></p><p class="P310"/><p class="P310"/><ol><li><p class="P318">/usr/local or /opt (optional)</p></li></ol><p class="P245"><span class="T109"/><span class="T110">Add-on software applications. Can also contain shared libraries for add-on software</span>.</p><p class="P245"/><p class="P245"/><ol><li><p class="P318">/var/www, /var/ftp/ or /srv (Suse)</p></li></ol><p class="P312"><span class="T8">Location for HTML pages and anonymous FTP directories.</span></p><p class="P310"/><p class="P310"/><ol><li><p class="P318">/var</p><p class="P319">Variable data, such as spools and logs. Contains both shareable (eg. /var/spool/mail) and non-shareable (eg. /var/log/) subdirectories.</p></li></ol><p class="P91"/><p class="P91"/></section><section class="2. Formatting and File System Consistency"><title>2. Formatting and File System Consistency</title><p class="P78"/><p class="P78"/><p class="P91">In order to organise data on a disk partition one needs to create a file system. At installation time you will be asked which type of file system must be used. </p><p class="P91"/><p class="Standard"><span class="T23">Many file system types are supported. The </span><span class="T30">ext2</span><span class="T23"> file system type is the default and is also known as &#8220;Linux Native&#8221;. In some more recent installers, ext3 is the default. This is really only an ext2 filesystem with a journal patched on top.</span></p><p class="P91"/><p class="Standard"><span class="T23">A different file system type must be used for SWAP. The file system for Swap is of type </span><span class="T30">swap</span><span class="T23"> and cannot be anything else.</span></p><p class="P78"/><p class="P78"/><p class="P78"/><p class="Standard"><span class="T33">Lets take a closer look at the </span><span class="T35">ext2</span><span class="T33"> (second extended) file system. The </span><span class="T35">ext2</span><span class="T33"> consists of blocks of size 1024 bytes =1 KB (default). Without entering into too much detail, there are three types of blocks:</span></p><p class="P80"/><p class="P78">&#9679; Superblocks: </p><p class="P78"/><p class="P78"/><p class="P78">Repeated every 8193 blocks. Contains information about block-size, free inodes, last mounted time, etc &#8230;</p><p class="P78"/><p class="P78">&#9679; Inodes: </p><p class="P78"/><p class="P78"/><p class="P78">Contains pointers to data blocks. The first 12 blocks of data are directly accessed. If the data exceeds 12KB, then indirect inodes act as relays. </p><p class="P78">Each inode is 256 bytes and contains the user, group, permissions and time stamp of the associated data.</p><p class="P78"/><p class="Standard"><span class="T33">&#9679; </span><span class="T33">Data Blocks</span><span class="T111">: </span></p><p class="P78"/><p class="P78">These are either files or directories and contain the actual data.</p><p class="P78"/><p class="Standard"/><p class="P78"/><p class="P78">The file systems supported by the kernel allow one to read from a pre-formatted disk. To create these file systems while running a Linux system one also needs to install the associated formatting tools.</p><p class="P78"/><p class="Standard"><span class="T33">The formatting tool for </span><span class="T35">ext2 </span><span class="T33">is </span><span class="T35">mkfs.ext2</span><span class="T33"> or </span><span class="T35">mke2fs</span><span class="T33">. Similarly the formatting tool for the </span><span class="T35">xfs</span><span class="T33"> file system type from Silicon Graphics will be </span><span class="T35">mkfs.xfs</span><span class="T33"> and may have to be installed separately.</span></p><p class="P78"/><p class="Standard"><span class="T33">The </span><span class="T35">mkfs</span><span class="T33"> tool acts as a front for all these file system types. The syntax is:</span></p><p class="P78"/><p class="P322"><span class="T112">mkfs &#8211;t &lt;fstype&gt; &lt;DEVICE&gt;</span> </p><p class="P78"/><p class="P78"/><p class="P78">Notice that the <span class="T7">ext3</span> is an <span class="T7">ext2</span> file system type on which a journaling system has been added (see the exercises for details). </p><p class="P78"/><p class="P78"/><p class="P78"/><p class="P78"/><p class="Standard"><span class="T113">Example 1</span><span class="T33">: Making a jfs filesystem</span></p><p class="P78"/><p class="P323"><span class="T28"><img alt="Graphic28" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T102">mkfs &#8211;t jfs /dev/hda12</span></p><p class="P324"/><p class="P78"/><p class="P78"/><p class="P78"/><p class="Standard"><span class="T113">Example 2</span><span class="T33">: Making a ext2 filesystem</span></p><p class="P325"/><p class="P326"><span class="T28"><img alt="Graphic29" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T102">mke2fs /dev/hda11 [or mkfs &#8211;t ext2 /dev/hda11]</span></p><p class="P327"/><p class="Standard"><br/></p><p class="P78"/><p class="Standard"><span class="T33">If the file system is damaged or corrupt, then the </span><span class="T35">fsck</span><span class="T33"> utility should be run against the partition (the minimum requirement is that the file system be unmounted or mounted read-only).</span></p><p class="P78"/><p class="Standard"><span class="T35">fsck</span><span class="T33"> acts as a front that automatically detects the file system type of a partition. Then as with </span><span class="T35">mkfs</span><span class="T33">, the tools </span><span class="T35">fsck.ext2</span><span class="T33">, </span><span class="T35">fsck.ext3</span><span class="T33"> will be called accordingly. Since EXT2 is the main filesystem type for Linux there is a </span><span class="T35">e2fsck</span><span class="T100"> command that only handles this filesystem type.</span><span class="T33"> </span></p><p class="P78"/><p class="P78"/><p class="P78">You can explicitly specify a file system type with the following syntax:</p><p class="P78"/><p class="P329">fsck &#8211;t &lt;fstype&gt; &lt;device&gt;</p><p class="P330"/><p class="P330"/><p class="P156"><span class="T113">Example:</span><span class="T33"> Checking a </span><span class="T103">reiserfs</span><span class="T33"> filesystem on the /dev/sdb10 device:</span></p><p class="P325"/><p class="P331"><span class="T28"><img alt="Graphic30" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T61">fsck &#8211;t reiserfs /dev/sdb10</span></p><p class="P332">fsck.reiserfs /dev/sdb10</p><p class="P333"/><p class="P84"/><p class="P335"/><p class="P336">The <span class="T7">debugfs</span> and <span class="T7">dumpe2fs</span> are seldom used but can be useful in providing low level information about an ext2 or ext3 filesystem.</p><p class="P336"/><p class="P337">debugfs [ -b blocksize ] [ -s superblock ] [ -f cmd_file ] [ -R request ] [ -V ] [ [ -w ] [ -c ] [ -i ] [ device ] ]</p><p class="P336"/><p class="P336">The debugfs program is an interactive file system debugger. It can be used to examine and change the state of an ext2/3 file system. </p><p class="P336"/><p class="P336">Once in the debugfs shell, internal commands can then be used to change directory, examine inode data, remove files, create links, dump the ext3 journal logs etc. While this is a very powerful command, it should be used with caution, generally only after the fsck command has failed to make any headway.</p><p class="P336"/><p class="P336"/><p class="P336"/><p class="P337">dumpe2fs [ -bfhixV ] [ -ob superblock ] [ -oB blocksize ] device</p><p class="P336"/><p class="P336">dumpe2fs prints the super block and block group information for the filesystem present on <span class="T16">device</span>.</p><table><caption>Table236</caption><tr><td> dumpe2fs /dev/hda1dumpe2fs 1.35 (28-Feb-2004)Filesystem volume name: /boot1Last mounted on: &lt;not available&gt;Filesystem UUID: d741042c-3eaf-49ee-94c1-7dd8c5459764Filesystem magic number: 0xEF53Filesystem revision #: 1 (dynamic)Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_superDefault mount options: (none)Filesystem state: cleanErrors behavior: ContinueFilesystem OS type: LinuxInode count: 25584Block count: 102280Reserved block count: 5114Free blocks: 80564Free inodes: 25537First block: 1Block size: 1024Fragment size: 1024Reserved GDT blocks: 256Blocks per group: 8192Fragments per group: 8192Inodes per group: 1968Inode blocks per group: 246Filesystem created: Sat May 7 10:40:51 2005Last mount time: Sun May 29 04:08:01 2005Last write time: Sun May 29 04:08:01 2005Mount count: 10Maximum mount count: -1Last checked: Sat May 7 10:40:51 2005Check interval: 0 (&lt;none&gt;)Reserved blocks uid: 0 (user root)Reserved blocks gid: 0 (group root)First inode: 11Inode size: 128Journal inode: 8Default directory hash: teaDirectory Hash Seed: 50108791-6a0a-41ff-9608-0485c993eaf9Journal backup: inode blocksGroup 0: (Blocks 1-8192)Primary superblock at 1, Group descriptors at 2-2Block bitmap at 259 (+258), Inode bitmap at 260 (+259)Inode table at 261-506 (+260)0 free blocks, 1942 free inodes, 2 directoriesFree blocks:Free inodes: 27-1968[....]</td></tr></table><p class="P339"/></section><section class="3. Monitoring Disk Usage"><title>3. Monitoring Disk Usage</title><p class="P32"/><p class="P32"/><p class="Standard"><span class="T114">Using </span><span class="T115">mount</span><span class="T115"> </span><span class="T116">and </span><span class="T115">df</span><span class="T21">:</span></p><p class="P41"/><p class="P41">Both these tools work on a device level, as opposed to a directory level. The <span class="T7">mount </span>and <span class="T7">umount </span>tools maintain the list of mounted filesystems in <span class="T7">/etc/mtab</span>. <span class="T7"/></p><p class="P21"/><p class="P41">Typing <span class="T7">mount </span>with no options will show all filesystems currently mounted. The output is similar to <span class="T7">/etc/mtab</span>. Notice that the kernel also keeps track of mounted filesystems in <span class="T7">/proc/mounts</span>.</p><p class="P41"/><p class="P41">In addition to showing all mounted devices the <span class="T7">df </span>tool will also show <span class="T16">Used</span><span class="T17"> and </span><span class="T16">Available</span><span class="T17"> disk space. By default this is given in blocks of 1K.</span></p><p class="P41"/><p class="P41"/><p class="P41"/><table><caption>Table94</caption><tr><td>df -h</td></tr><tr><td/></tr><tr><td>Filesystem Size Used Avail Use% Mounted on</td></tr><tr><td>/dev/hda9 289M 254M 20M 93% /</td></tr><tr><td>/dev/hda2 23M 7.5M 14M 35% /boot</td></tr><tr><td>none 62M 0 61M 0% /dev/shm</td></tr><tr><td>/dev/hda5 1.4G 181M 1.1G 13% /share</td></tr><tr><td>/dev/hda7 787M 79M 669M 11% /tmp</td></tr><tr><td>/dev/hda3 4.3G 3.4G 813M 81% /usr</td></tr><tr><td>/dev/hda6 787M 121M 627M 17% /var</td></tr><tr><td>//192.168.123.2/share12G 8.8G 3.7G 71% /mnt/smb</td></tr></table><p class="Text body"/><p class="Text body"/><p class="Text body"/><p class="P341">Using <span class="T7">du</span><span class="T8">:</span></p><p class="P342">This tool will display <span class="T16">disk usage</span><span class="T17">. This is done on a per directory basis. Notice that </span><span class="T18">du</span><span class="T17"> cannot display available space since this information is only available at a device level.</span></p><p class="P343">The following command will list the current usage of the <span class="T7">/etc</span> directory in human readable units (using the <span class="T7">-h</span> switch) and will only print the grand total (using the <span class="T7">-s</span> switch):</p><table><caption>Table256</caption><tr><td>du -sh /etc</td></tr><tr><td/></tr><tr><td>62M /etc/</td></tr></table><p class="P345"/><p class="P346"/><p class="P346"/><p class="P346"/><p class="P346"/></section><section class="4. File Permissions and Attributes"><title>4. File Permissions and Attributes</title><p class="P347"/><p class="P348"/><p class="P348"><img alt="Graphic31" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000000000002D00000021C0686BA55.png"/></p><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348"/><p class="P349">Changing permissions and owners</p><p class="P162"/><p class="P170"><span class="T23">From the previous figure we see that permissions can be acted upon with </span><span class="T30">chmod</span><span class="T23">. There are 3 categories of ownership for each file and directory:</span></p><p class="P350"/><p class="P162"><span class="T55">u</span>: a valid user with an entry in /etc/passwd</p><p class="P170"><span class="T30">g</span><span class="T23">: a valid group with an entry in /etc/group</span></p><p class="P170"><span class="T30">o</span><span class="T23">: other</span></p><p class="P162"/><p class="P162"/><p class="P162">Example:</p><p class="P162"/><p class="P162">-rw-rw-r-- 1 jade sales 24880 Oct 25 17:28 libcgic.a</p><p class="P162"/><p class="P162">Changing Permissions with <span class="T7">chmod</span>:</p><p class="P162"/><table><caption>Table9</caption><tr><td>chmod g=r,o-r libcgic.a chmod g+w libcgic.a</td></tr></table><p class="P352"/><p class="P352"/><p class="P352">Changing user and group with <span class="T7">chown</span><span class="T8"> and </span><span class="T7">chgrp</span> :</p><p class="P352"/><table><caption>Table10</caption><tr><td>chown root libcgic.achgrp apache libcgic.a</td></tr></table><p class="P352"/><p class="P353"/><p class="P353"/><table><caption>Table120</caption><tr><td>NOTICE</td></tr><tr><td>A useful option for chmod, chown and chgrp is &#8211;R which recursively changes ownership and permissions through all files and directories indicated.</td></tr></table><p class="P354"/><p class="P354"/><p class="P354"/><p class="P349">Symbolic and octal notation</p><p class="P162"/><p class="P162">Permissions can be read=r, write=w and execute=x. The octal values of these permissions are listed in the next table.</p><p class="P162"/><p class="P162"/><p class="P170"><span class="T81"/><span class="T81">Octal </span><span class="T81">and symbolic permissions</span><span class="T23">.</span></p><p class="P162"/><table><caption>Table11</caption><tr><td>Symolic</td><td>octal</td><td>binary</td></tr><tr><td>read</td><td>4</td><td>' 100' </td></tr><tr><td>write</td><td>2</td><td>' 010' </td></tr><tr><td>execute</td><td>1</td><td>' 001' </td></tr></table><p class="P361"/><p class="P361"/><p class="P162">Permissions apply to the user, the group and to others. An item has a set of 3 grouped permissions for each of these categories.</p><p class="P162"/><p class="P162"/><p class="P162"/><p class="P176">How to read a 755 or -rwxr-xr-x permission </p><p class="P176"/><table><caption>Table12</caption><tr><td>user</td><td>group</td><td>other</td></tr><tr><td>rwx4+2+1=7</td><td>r_x4+1=5</td><td>r_x4+1=5</td></tr></table><p class="P176"/><p class="P363"/><p class="P363"/><p class="P349">The standard permission </p><p class="P162"/><p class="P162">UNIX system create files and directories with standard permissions as follows:</p><p class="P162"/><p class="P162">Standard permission for:</p><p class="P162"/><p class="P162">Files666-rw-rw-rw-</p><p class="P162">Directories777-rwxrwxrwx</p><p class="P162"/><p class="P349"/><p class="P349">Umask</p><p class="P162"/><p class="P170"><span class="T23">Every user has a defined </span><span class="T31">umask</span><span class="T23"> that alters the standard permissions. The </span><span class="T30">umask</span><span class="T23"> has an octal value and is subtracted(*) from the octal </span><span class="T81">standard permissions</span><span class="T23"> to give the files permission (this permission doesn't have a name and could be called the file's </span><span class="T81">effective</span><span class="T23"> permission).</span></p><p class="P162"/><p class="P162">(*) While subtraction works in most cases, it should be noted that technically the standard permissions and the umask are combined as follows:</p><p class="P162"/><p class="P162"/><table><caption>Table17</caption><tr><td>Final Permissions = Standard Permissions (logical AND) (NOT)Umask</td></tr></table><p class="P162"/><p class="P162">On systems where users belong to separate groups, the umask can have a value of 002. </p><p class="P170"><span class="T23">For systems which place all users in the </span><span class="T81">users</span><span class="T23"> group, the umask is likely to be 022.</span></p><p class="P162"/><p class="P162"/><p class="P162"/><p class="P349">SUID permissions</p><p class="P162"/><p class="Standard"><span class="T23">An executable can be assigned a special permission which will always make it run as the owner of this file. This permission is called </span><span class="T23">SUID</span><span class="T23"> meaning 'set user ID'. It has a symbolic value </span><span class="T30">s</span><span class="T23"> or a numerical value </span><span class="T30">4000</span><span class="T23">. </span></p><p class="P91"/><p class="P91">Administrative tools may have the SUID bit set in order to allow non-root users to change system files. </p><p class="P91"/><p class="P91">For example the <span class="T7">passwd</span><span class="T8"> command can be run by any user and will interactively change his or her current password. This password will be saved to </span><span class="T7">/etc/passwd</span><span class="T8"> or </span><span class="T7">/etc/shadow</span><span class="T8">. However both these files belong to user root with typical permissions of 644 and 600 respectively.</span></p><p class="P202"/><p class="Standard"><span class="T40">This problem has been solved by setting the SUID bit on </span><span class="T31">passwd</span><span class="T40"> hence forcing it to run as user root with the correct permissions</span> to modify <span class="T7">/etc/passwd</span><span class="T8"> or </span><span class="T7">/etc/shadow</span><span class="T8">. </span></p><p class="P83"/><p class="P83">The SUID on <span class="T7">passwd</span></p><p class="P83"/><table><caption>Table180</caption><tr><td>ls -l $(which passwd)</td></tr><tr><td>-r-s--x--x 1 root root 18992 Jun 6 2003 /usr/bin/passwd</td></tr></table><p class="P83"/><p class="P83"/><table><caption>Table181</caption><tr><td>NOTICE</td></tr><tr><td>The SUID bit is shown in symbolic form in the command above. It is possible to get more information about a file using stat as well as seeing the octal representation of the permissions as follows:</td></tr><tr><td>stat /usr/bin/passwd </td></tr><tr><td>File: `/usr/bin/passwd'</td></tr><tr><td>Size: 18992 Blocks: 40 IO Block: 4096 regular file</td></tr><tr><td>Device: 305h/773d Inode: 356680 Links: 1 </td></tr><tr><td>Access: (4511/-r-s--x--x) Uid: ( 0/ root) Gid: ( 0/ root)</td></tr></table><p class="P83"/><p class="P83"/><table><caption>Table182</caption><tr><td>WARNING! WARNING! WARNING! </td></tr><tr><td>The SUID permission is often associated with security issues. Here is an example that illustrates this. </td></tr><tr><td>1. A user would like to read user root' s mail. For this he changes the environmental variable as follows:</td></tr><tr><td> export MAIL=/var/spool/mail/root</td></tr><tr><td>2. The user then uses the command mail, hoping to see something!</td></tr><tr><td> mail</td></tr><tr><td>/var/spool/mail/root: Permission denied</td></tr><tr><td>So far it doesn't work. This would be too easy! </td></tr><tr><td/></tr><tr><td>But if root can be convinced to set the SUID bit on mail the previous commands would allow any user to read anybody's mail (including root). </td></tr></table><p class="P91"/><p class="P91"/><p class="P91"/><p class="P91">The next examples are dangerous. Why?</p><p class="P91"/><table><caption>Table13</caption><tr><td>chmod 4755 /bin/catchmod u+s /bin/grep</td></tr></table><p class="P369"/><p class="P91"/><p class="P91"/><p class="P348">SGID permissions</p><p class="P91"/><p class="Home1~LT~Notizen"><span class="T23">The SGID is a permission similar to SUID that is set for group members. The symbolic value is </span><span class="T30">s</span><span class="T23"> and the octal value of </span><span class="T30">2000</span><span class="T23">.</span></p><p class="P370"/><p class="Home1~LT~Notizen"><span class="T23">Setting </span><span class="T23">SGID </span><span class="T23">on a directory changes the group ownership used for files subsequently created in that directory to the directories group ownership. No need to use </span><span class="T43">newgrp </span><span class="T45">to change the effective group of the process prior to file creation (see exercise p.</span><span class="T45">55</span><span class="T45">) .</span></p><p class="P371"/><p class="P371">Examples:</p><p class="P371"/><table><caption>Table14</caption><tr><td>chmod 2755 /home/datachmod g+s /bin/wc</td></tr></table><p class="P348"/><p class="P348"/><p class="P348"/><p class="P348">The sticky bit</p><p class="P91"/><p class="Standard"><span class="T23">The sticky bit permission</span><span class="T30"> </span><span class="T23">with value </span><span class="T30">1000</span><span class="T23"> has the following effect:</span></p><p class="P91"/><ol><li><p class="P373">Applied to a directory it prevents users from deleting files unless they are the owner (ideal for directories shared by a group)</p></li><li><p class="P374"><span class="T23">Applied to a file this used to cause the file or executable to be loaded into memory and caused later access or execution to be faster. The symbolic value for an executable file is </span><span class="T30">t</span><span class="T23"> while for a non executable file this is </span><span class="T30">T</span><span class="T23">. As file system caching is more generic and faster, file sticky bits tend not be supported any more.</span></p></li></ol><p class="P91"/><p class="P91">Examples:</p><p class="P375"/><table><caption>Table15</caption><tr><td>chmod 1666 /data/store.txtchmod o+t /bin/bash</td></tr></table><p class="P375"/><p class="P375"/><p class="P375"/><p class="P376">File Attributes</p><p class="P377"/><p class="P377"/><p class="P377"/><p class="P378">Alongside the standard permissions there is another system that can be used to change the way a file can be used. File Attributes do not show up in the 'ls' command. The '<span class="T7">lsattr</span>' command must be used instead. The '<span class="T7">chattr</span>' command is used to set and drop these attributes.</p><p class="P378"/><p class="P378"/><p class="P378"/><p class="P378"/><p class="P378"/><p class="P378"/><p class="P378">The following attributes are available. Please note the case.</p><p class="P378"/><p class="P379"><span class="T121">'A' When a file with the &#8217;A&#8217; attribute set is accessed, its </span><span class="T121">atime</span><span class="T121"> (access time) record is not modified. This avoids a certain amount of disk I/O, typically for temporary files. Do be aware that some tools, such as tmpwatch, rely on the atime record to determine if the file has been used recently. If the atime record is not being updated the file's status might be misinterpreted.</span></p><p class="P378"/><p class="P378"/><p class="P378">'a' A file with the &#8216;a&#8217; attribute set can only be open in append mode for writing. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute. This is probably most effectively used on system log files, to prevent intruders removing evidence of their passage. Do be aware that in order for the intruder to have any chance of editing these log files, they need to have root access. With root access they could remove the 'a' attribute, make the edits and then re-establish the 'a' attribute.</p><p class="P378"/><p class="P378"/><p class="P379"><span class="T121">'c' A file with the &#8216;c&#8217; attribute set is automatically </span><span class="T121">compress</span><span class="T121">ed on the disk by the kernel. A read from this file returns uncompressed data. A write to this file compresses data before storing them on the disk. NB Sadly, while the attribute is set on the file and is displayed by the lsattr command, it is not yet honoured by the ext2 or ext3 filesystem kernel drivers.</span></p><p class="P378"/><p class="P378"/><p class="P379"><span class="T121">'D' When a directory with the &#8216;D&#8217; attribute set is modified, the changes are written </span><span class="T121">synchronous</span><span class="T121">ly on the disk; this is equivalent to the &#8216;</span><span class="T121">dirsync</span><span class="T121">&#8217; mount option applied to a subset of the files.</span><span class="T122"> </span><span class="T123">When this attribute is in operation against a directory, the following operations are synchronous within that directory: create, link, unlink, symlink, mkdir, rmdir, mknod and rename.</span></p><p class="P378"/><p class="P378"/><p class="P379"><span class="T121">'d' A file with the &#8216;d&#8217; attribute set is not candidate for backup when the </span><span class="T124">dump</span><span class="T121"> (8) program is run.</span></p><p class="P378"/><p class="P378"/><p class="P379"><span class="T121">'i' A file with the &#8216;i&#8217; (</span><span class="T121">immutable</span><span class="T121">) attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.</span></p><p class="P378"/><p class="P378"/><p class="P378">'j' A file with the &#8216;j&#8217; attribute has all of its data written to the ext3 journal before being written to the file itself, if the filesystem is mounted with the "data=ordered" or "data=writeback" options. When the filesystem is mounted with the "data=journal" option all file data is already journalled and this attribute has no effect. Only the superuser or a process possessing the CAP_SYS_RESOURCE capability can set or clear this attribute.</p><p class="P378"/><p class="P378"/><p class="P378">'s' When a file with the &#8216;s&#8217; attribute set is deleted, its blocks are zeroed and written back to the disk. NB As with the 'c' attribute, this attribute is honoured by everything except the kernel filesystem driver.</p><p class="P378"/><p class="P378"/><p class="P379"><span class="T121">'S' When a file with the &#8216;S&#8217; attribute set is modified, the changes are written synchronously on the disk; this is equivalent to the &#8216;</span><span class="T121">sync</span><span class="T121">&#8217; mount option applied to a subset of the files. It is most often used for the 'cooked files' used by database programs to hold their data. When used in this way the addition of two different caching systems together is avoided. The caching system of the database, which is optimised for that systems use of data, is allowed to write direct to disk.</span></p><p class="P378"/><p class="P378"/><p class="P378">'T' The 'T' attribute is only usable when using the 2.6.x kernel. The 'T' attribute is designed to indicate the top of directory hierarchies, this is designed for use by the Orlov block allocator. The newer file allocation policies of the ext2 and ext3 filesystems place subdirectories closer together allowing faster use of a directory tree if that directory tree was created with a 2.6 kernel.</p><p class="P378"/><p class="P378"/><p class="P378"/><p class="P378">'t' A file with the &#8217;t&#8217; attribute will not have a partial block fragment at the end of the file merged with other files (for those filesystems which support tail-merging). This is necessary for applications such as LILO which read the filesystems directly, and which don&#8217;t understand tail-merged files. Note: As of this writing, the ext2 or ext3 filesystems do not (yet, except in very experimental patches) support tail-merging.</p><p class="P378"/><p class="P378"/><p class="P379"><span class="T121">'u' When a file with the &#8216;u&#8217; attribute set is deleted, its contents are saved. This allows the user to ask for its </span><span class="T121">undeletion</span><span class="T121">. This is another attribute that is supported by everything except the kernel itself.</span></p><p class="P91"/><p class="P91">Example:</p><p class="P375"/><table><caption>Table237</caption><tr><td># lsattr testfile------------- testfile# chattr +i testfile# lsattr testfile----i-------- testfile# rm -f testfilerm: cannot remove `testfile': Operation not permitted# chattr -i testfile# rm -f testfile# ls testfilels: testfile: No such file or directory</td></tr></table><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P375"/><p class="P381"/></section><section class="5. Exercises and Summary"><title>5. Exercises and Summary</title><p class="P382"/><p class="P382"/><p class="P245"><span class="T31">Review </span><span class="T31">Questions</span> (answers p.150)</p><p class="P383"/><p class="P384">Yes or No</p><p class="P385"/><p class="P385">1. The <span class="T7">/usr</span> directory must always be on the root device since it contains </p><p class="P385">essential tools needed at boot time_____</p><p class="P385"/><p class="P385">2. If a user's home directory is anywhere else than in the <span class="T7">/home</span> directory </p><p class="P385">then some operations may not work_____</p><p class="P385"/><p class="P385"/><p class="P385">3. Making a filesystem on a partition always deletes all the data on that partition_____</p><p class="P385"/><p class="P385"/><p class="P385"/><p class="P386">Glossary</p><p class="P386"/><table><caption>Table205</caption><tr><td>Term</td><td>Description</td></tr><tr><td>base directories</td><td>subdirectories that are directly under the root directory</td></tr><tr><td>data block</td><td>block used to store data on a filesystem. Data blocks are referenced by inodes</td></tr><tr><td>essential root (/) subdirectories</td><td>term used in this manual to identify directories that must be present at boot time once the root filesystem has been mounted</td></tr><tr><td>ext2</td><td>the second extended filesytem type was adopted as the generic Linux filesystem</td></tr><tr><td>ext3</td><td>the third extended filesystem supports the same features as ext2 with an added journalling system</td></tr><tr><td>file permissions</td><td>attributes stored inside a file's inode giving simple read,write and execute permissions to the file owner (u), the group (g) and any other (o) user as well as more advanced permissions such as SUID, SGID and the 'sticky bit' </td></tr><tr><td>filesystem hierarchy standard (FHS)</td><td>"This standard consists of a set of requirements and guidelines for file and directory placement under UNIX-like operating systems. The guidelines are intended to support interoperability of applications, system administration tools, development tools, and scripts as well as greater uniformity of documentation for these systems" &#8211; see http://www.pathname.com/fhs/</td></tr><tr><td>inode</td><td>block used to store information about files, directories and symbolic links. Information includes the location of the file's data block, file permissions, time stamps and file type (e.g directory, file or symlink)</td></tr><tr><td>Orlov block allocator</td><td>Scheme that increases the performance of an EXT2/EXT3 filesystem. It is only available for 2.6 kernels. It was ported from BSD and improved by Alexander Viro, Andrew Morton, and Ted Ts'o. The original author is Grigory Orlov. This scheme can be switched on and of using the chattr command under Linux </td></tr><tr><td>superblock</td><td>is read when the filesystem is mounted, contains information such as the block-size used for the current filesystem (default 1024), the number of free inodes, the mount count and maximum mount count (used to determine if a full filesystem check should be performed)</td></tr></table><p class="P387"/><p class="P387"/><p class="P387"/><p class="P387"/><p class="P387"/><p class="P387"/><p class="P387"/><p class="P386">Files</p><p class="P387"/><table><caption>Table206</caption><tr><td>File</td><td>Description</td></tr><tr><td>/etc/mtab</td><td>file used by mount to keep track of currently mounted devices</td></tr><tr><td>/proc/mounts</td><td>file used by the kernel to keep track of currently mounted devices</td></tr></table><p class="Standard"/><p class="Standard"/><p class="P95">Commands</p><p class="P92"/><table><caption>Table207</caption><tr><td>Command </td><td>Description (apropos)</td></tr><tr><td>chattr</td><td>changes file attributes on a ext2/3 filesystem</td></tr><tr><td>chgrp</td><td>chgrp - change the group ownership of a file</td></tr><tr><td>chmod</td><td>chmod &#8211; change file access permission</td></tr><tr><td>chown</td><td>chown(1) &#8211; change the user and group ownership of a file</td></tr><tr><td>df</td><td>df - report filesystem disk space usage</td></tr><tr><td>du</td><td>du - estimate file space usage</td></tr><tr><td>e2fsck</td><td>e2fsck - check and repair a Linux second extended file system</td></tr><tr><td>fsck</td><td>check and repair any file system </td></tr><tr><td>lsattr</td><td>lists the file attributes on a ext2/3 filesystem</td></tr><tr><td>mke2fs</td><td>mke2fs &#8211; create an ext2/3 filesystem</td></tr><tr><td>mkfs</td><td>mkfs &#8211; build a Linux file system</td></tr><tr><td>mount</td><td>mount(1) &#8211; All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree. Conversely, the umount(8) command will detach it again</td></tr><tr><td>umask</td><td>tool used to set the file-creation mask mode &#8211; see help umask</td></tr></table><p class="Standard"/><p class="P382"/><p class="P389">Filesystem</p><p class="P390"/><p class="P245"><span class="T23">1. Create 2 new partitions (larger than 50M) on the </span><span class="T30">/dev/hda</span><span class="T23"> device using </span><span class="T30">fdisk</span><span class="T23">.</span></p><p class="P295"><span class="T23">HINT: To create a new partition type </span><span class="T30">n</span><span class="T23">. The partition type defaults to </span><span class="T30">83</span><span class="T23"> (Linux)</span></p><p class="P295"><span class="T23">To write the new partition table type </span><span class="T30">w</span><span class="T23">. </span></p><p class="P294">The partition table needs to be read: REBOOT the computer !</p><p class="P294"/><p class="P245"><span class="T23">2. Format the first partition using the </span><span class="T30">ext2</span><span class="T23"> filesystem type and the second with </span><span class="T30">reiserfs</span><span class="T23">. </span></p><p class="P391"><span class="T23">HINT: The </span><span class="T30">mkfs</span><span class="T23"> tool is a front for </span><span class="T30">mkfs.ext2</span><span class="T23"> or </span><span class="T30">mkfs.reiserfs</span><span class="T23">, etc. The syntax is</span></p><p class="P392">mkfs &#8211;t &lt;fstype&gt; &lt;device&gt;</p><p class="P393"/><p class="P392"/><p class="P245"><span class="T23">3.Make directories in </span><span class="T30">/mnt</span><span class="T23"> and mount the new partitions</span></p><p class="P394"/><p class="P246"><span class="T13">mkdir /mnt/ext2</span></p><p class="P395">mkdir /mnt/reiserfs</p><p class="P246"/><p class="P246">4.Check the status of your system:</p><p class="P394"/><p class="P246">Use <span class="T55">mount</span> to verify which devices are mounted. The permissions set in <span class="T7">fstab</span><span class="T8"> are visible too.</span></p><p class="P246"/><p class="P245"><span class="T23">Use </span><span class="T30">df</span><span class="T23"> to check the total number of blocks used. The </span><span class="T30">&#8211;k</span><span class="T23"> option will convert the number of blocks in kilobytes (the default block size for </span><span class="T30">ext2</span><span class="T5">)</span></p><p class="P396"/><p class="P396"/><p class="P396"/><p class="P245"><span class="T23">Run </span><span class="T30">fsck</span><span class="T23"> on one of the newly created filesystems. The </span><span class="T30">fsck</span><span class="T23"> utility is a front for </span><span class="T30">fsck.ext2</span><span class="T23">, </span><span class="T30">fsck.ext3</span><span class="T23">, </span><span class="T30">fsck.reiserfs</span><span class="T23">, etc. The syntax is:</span></p><p class="P246"/><p class="P245"><span class="T23"/><span class="T73">fsck &lt;device&gt;</span> </p><p class="P246"/><p class="P245"><span class="T23">5.Going further: Changing from </span><span class="T30">ext2</span><span class="T23"> to </span><span class="T30">ext3</span><span class="T23"> :</span></p><p class="P295"><span class="T23">Update the device mounted on </span><span class="T31">/mnt/</span><span class="T30">ext2</span><span class="T23"> to </span><span class="T31">ext3</span><span class="T40"> with tune2fs. This will add a journal to the existing filsystem. Make sure to make the relevant change for the filesystem type in </span><span class="T31">/etc/fstab</span><span class="T40"> </span><span class="T23"/></p><p class="P397"/><p class="P398">tune2fs &#8211;j /dev/hda<span class="T16">N</span></p><p class="P398"/><p class="P398"/><p class="P245"><span class="T23">At this stage the system has added a </span><span class="T30">journal</span><span class="T23"> to the </span><span class="T30">/dev/hda10 </span><span class="T23">partition, making it an </span><span class="T30">ext3</span><span class="T23"> formated partition. This process is non-destructive and reversible. If you mount an </span><span class="T30">ext3</span><span class="T23"> as an </span><span class="T30">ext2</span><span class="T23"> filesystem, the </span><span class="T30">.journal</span><span class="T23"> file will be erased. You can add it again with </span><span class="T30">tune2fs</span><span class="T23"> &#8230;</span></p><p class="P281"/><p class="P262">File permissions</p><p class="P265"/><p class="Standard"><span class="T33">1. Login as a user (non root). Create a file using </span><span class="T35">touch</span><span class="T33"> and verify that it has the effective permission 664.</span></p><p class="P78"/><p class="Standard"><span class="T33">2. Change the </span><span class="T35">umask</span><span class="T33"> to 027. If you create a new file what is it&#8217;s effective permission? _________</span></p><p class="P78"/><p class="Standard"><span class="T33">Where is the value of </span><span class="T35">umask</span><span class="T33"> set? Depening the systems this can be </span><span class="T35">/etc/profile</span><span class="T100"> or </span><span class="T35">/etc/bashrc</span></p><p class="P78"/><p class="P78">3.Add 2 users to your system.</p><p class="P78"/><p class="P78"><span class="T13">useradd user1</span></p><p class="P399">useradd user2</p><p class="P399"/><p class="P78"/><p class="P78"/><p class="P78"/><p class="P399"><span class="T5">Add passords with</span> passwd user1 <span class="T5">and</span> passwd user2</p><p class="P399"/><p class="Standard"><span class="T33">4.Create a group called </span><span class="T35">sales</span><span class="T33">.</span></p><p class="P78"/><p class="P78"><span class="T13">groupadd sales</span></p><p class="P399"/><p class="Standard"><span class="T33">5. Add the users to the group </span><span class="T35">sales</span></p><p class="P78"/><p class="P78"><span class="T13">gpasswd -a user1 sales</span></p><p class="P399">gpasswd -a user2 sales</p><p class="P78"/><p class="P78"/><p class="Standard"><span class="T33">6.Create a directory </span><span class="T35">/</span><span class="T125">news</span><span class="T33"> owned by the group </span><span class="T35">sales</span><span class="T100"> and read-writable for this group</span><span class="T33">. </span></p><p class="P78"/><p class="Standard"><span class="T33"/><span class="T126">mkdir -m 770 /news ; chown .sales /news </span></p><p class="P78"/><p class="Standard"><span class="T33">7.Set the GID to the </span><span class="T125">/news</span><span class="T33"> directory. </span></p><p class="P78"/><p class="P400"><span class="T5"/><span class="T13">chmod g+s /news</span></p><p class="P78"/><p class="Standard"><span class="T33">What are the symbolic</span><span class="T100"> permissions (eg. -rwxr_xr_x) on </span><span class="T35">/news</span><span class="T100">? [use </span><span class="T127">ls -ld /news</span><span class="T35"> </span><span class="T100">]</span> ______</p><p class="P78"/><p class="P207"><span class="T60">Verify that a group member doesn&#8217;t need to type &#8220;</span><span class="T25">newgrp </span><span class="T25">sales</span><span class="T60">&#8221; in order to create files with the right permissions. Can members of the group </span><span class="T128">sales</span><span class="T60"> modify any files in this directory?</span></p><p class="P78"/><p class="P78"/><p class="P78"/><p class="Standard"><span class="T33">8.Add the </span><span class="T129">sticky-bit</span><span class="T33"> permission on the </span><span class="T125">/news</span><span class="T33"> directory. Verify that only user-owners can modify the files in the </span><span class="T130">that</span><span class="T33"> directory. What are the permissions like on </span><span class="T35">/news</span><span class="T100">? ______________</span></p><p class="P78"/><p class="P78"/><p class="Standard"><span class="T33">10.As root set SUID root </span><span class="T35">xeyes</span><span class="T33">. Login as a non root user. Check that this binary runs with UI root.</span></p><p class="P78"/><p class="Standard"><span class="T33"/><span class="T126">chmod u+s `which xeyes`</span></p><p class="Standard"/><p class="P32">Log in as another user and run xeyes. Then do:</p><p class="P399"/><p class="P399">ps aux | grep xeyes</p><p class="P399"/><p class="P401"><span class="T5">(the binary should be running as root)</span></p></section></section><section class="The Command Line"><title>The Command Line</title><p class="P113"/><p class="P217">Prerequisites</p><p class="P218"/><p class="P218">None</p><p class="P218"/><p class="P217">Goals</p><p class="P218"/><p class="P72"><span class="T26">Introduce the </span><span class="T20">bash</span><span class="T21"> shell and basic concepts such as interactively starting an executable</span></p><p class="P218"><span class="T8">Distinguish</span> variables defined as local or global (exported) </p><p class="P218">Manipulate data streams using pipes and other redirection operators</p><p class="P218">Understand meta-characters used for "file globbing" </p><p class="P218"/><p class="P218"/><p class="P302">Contents</p><p class="P72"/><p class="P303"/><p class="P91"/><p class="P405"/><p class="P91"/><p class="P406">Overview</p><p class="P407"/><p class="P408">A basic way to interact with a computer system is to use the command line. The shell interprets the instructions typed in at the keyboard. The shell prompt (ending with $ or # for user root) indicates that it is ready for user input. </p><p class="P409"/><p class="P408">The shell is also a programming environment which can be used to perform automated tasks. Shell programs are called scripts. </p><p class="P408"/><table><caption>Table123</caption><tr><td colspan="2">Most Common shells</td></tr><tr><td>The Bourne shell</td><td>/bin/sh</td></tr><tr><td>The Bourne again shell </td><td>/bin/bash</td></tr><tr><td>The Korn shell </td><td>/bin/ksh</td></tr><tr><td>The C shell</td><td>/bin/csh</td></tr><tr><td>Tom's C shell </td><td>/bin/tcsh</td></tr></table><p class="P408"/><p class="P408"/><p class="P408">Since the bash shell is one of the most widely used shells in the Linux world the LPI concentrates mainly on this shell.</p><p class="P408"/><section class="1. The interactive shell"><title>1. The interactive shell</title><p class="P91"/><p class="P91"/><p class="P91">Shell commands are often of the form</p><p class="P367">command [options] {arguments}.</p><p class="P91"/><ol><li><p class="P410">Printing text to the screen</p></li></ol><p class="P91"/><p class="P91">The the bash shell uses the <span class="T7">echo</span><span class="T8"> command to print text to the screen.</span></p><p class="P91"/><table><caption>Table16</caption><tr><td>echo &#8220;this is a short line&#8221;</td></tr></table><p class="P91"/><p class="P91"/><ol><li><p class="P412">Full/Relative path </p></li></ol><p class="P98"/><p class="P91">The shell interprets the first ¨word¨ of any string given on the command line as a command. If the string is a <span class="T7">full or relative path</span> to an executable then the executable is started. If the first word has no ¨/¨ characters, then the shell will scan directories defined in the PATH variable and attempt to run the first command matching the string.</p><p class="P91"/><p class="Standard"><span class="T23">For example if the PATH variable only contains the directories </span><span class="T31">/bin</span><span class="T40"> and </span><span class="T31">/usr/bin</span><span class="T40"> then the string </span><span class="T31">xeyes </span><span class="T40">won't be found since it is stored in </span><span class="T31">/usr/X11R6/bin/xeyes </span><span class="T40">so the full path needs to be run</span><span class="T23"> </span></p><p class="P91"/><table><caption>Table18</caption><tr><td>/usr/X11R6/bin/xeyes</td></tr></table><p class="P414"/><p class="P414">An alternative to typing the full path to an executable is to use a <span class="T7">relative</span><span class="T8"> path. For example, if the user is in the directory where the </span><span class="T7">xeyes </span><span class="T8">program is stored then one can type </span></p><p class="P91"/><table><caption>Table86</caption><tr><td>./xeyes</td></tr></table><p class="P414"/><p class="P414"/><p class="P414"/></section><section class="2. Variables"><title>2. Variables</title><p class="P415"/><p class="P91">Shell variables are similar to variables used in any computing language. Variable names are limited to alphanumeric characters. For example CREDIT=300 simply assigns the value 300 to the variable named CREDIT.</p><p class="P91"/><p class="P91"/><table><caption>Table124</caption><tr><td>1. initialise a variable:</td><td>Variable-Name=value (no spaces !!)</td></tr><tr><td>2. reference a variable:</td><td>$Variable-Name</td></tr></table><p class="P91"/><p class="P91"/><table><caption>Table19</caption><tr><td>CREDIT=300echo $CREDIT</td></tr></table><p class="P348"/><p class="P202">The value of a variable can be removed with the <span class="T7">unset</span> command.</p><p class="P348"/><p class="P348"/><p class="P415">Export, Set and Env:</p><p class="P415"/><p class="P91">There are two types of variable: local and exported. </p><p class="P91"/><p class="P91">Local variables will be accessible only to the current shell. On the other hand, exported variables are accessible by both the shell and any child process started from that shell. </p><p class="P91"/><p class="P91">The commands <span class="T55">set</span> and <span class="T55">env</span> are used to list defined variables </p><p class="P163"/><table><caption>Table20</caption><tr><td colspan="2">The set and env commands</td></tr><tr><td>set</td><td>Lists all variables</td></tr><tr><td>env</td><td>Lists all exported variables</td></tr></table><p class="P420"/><p class="P420"/><p class="P162">A global variable is global in the sense that any child process can reference it.</p><p class="P162"/><p class="P162">
   
    <p>export VAR=val</p>
   </p><table><caption>Table143</caption><tr><th>LOCAL</th><th>EXPORTED</th></tr><tr><td>
      
       child
       
       
      
      
       parent
      
       
      
      
       VAR = ??
      
       
      
      
       VAR=val
      </td><td>
       
      
       
      
      
       parent
      
      
       child
      
      
       VAR = val
      
       
       </td></tr></table><p class="P420"/><p class="P420"/><p class="P422"/><p class="Standard"><span class="T95">Example:</span><span class="T23"> Make the CREDIT variable a global variable. Test whether it's listed with </span><span class="T30">set</span><span class="T23"> or </span><span class="T30">env</span><span class="T23">.</span></p><p class="P97"/><table><caption>Table142</caption><tr><td>export CREDIT</td></tr><tr><td>env | grep CREDIT</td></tr></table><p class="P423"/><p class="P97"/><p class="P97"/><p class="P97"/><p class="P91">Start a new shell (child process) and verify that CREDIT is accessible. Can one start any shell and be sure that CREDIT is still declared ? </p><p class="P424"/><p class="P176">List of common predefined variables</p><p class="P425"/><table><caption>Table21</caption><tr><th>PREDEFINED VARIABLES</th><th>MEANING</th></tr><tr><td>DISPLAY</td><td>Used by X to identify where to run a client application</td></tr><tr><td>HISTFILE</td><td>Path to the users .bash_history file</td></tr><tr><td>HOME</td><td>The path to the user's home</td></tr><tr><td>LOGNAME</td><td>The name used by the user to log in</td></tr><tr><td>PATH</td><td>List of directories searched by the shell for programs to be executed when a command is entered without a path.</td></tr><tr><td>PWD</td><td>The current working directory</td></tr><tr><td>SHELL</td><td>The shell used (bash in most Linux distributions)</td></tr><tr><td>TERM</td><td>The current terminal emulation</td></tr></table><p class="P429"/><p class="P429"/><p class="P415">Special variables</p><p class="P430"/><p class="P91">The next few variables are related to process management.</p><p class="P91"/><table><caption>Table22</caption><tr><td>$!represents the PID value of the last child process$$represents the PID of the running shell$?is 0 if the last command was executed successfully and 1 otherwise</td></tr></table><p class="P422"/><p class="P422"/></section><section class="3. Input, Output, Redirection"><title>3. Input, Output, Redirection</title><p class="P97"/><p class="Standard"><span class="T23">UNIX processes normally open three standard file descriptors which enable it to process input and output. These standard descriptors can be redefined for any given process. In most cases the </span><span class="T31">stdin</span><span class="T23"> descriptor is the keyboard, and the two output descriptors, </span><span class="T31">stdout</span><span class="T23"> and </span><span class="T31">stderr</span><span class="T23">, is the screen.</span></p><p class="P91"/><p class="P91"/><table><caption>Table144</caption><tr><th>A process and it&#8217;s 3 descriptors</th></tr><tr><td>
      
       STDOUT
       &gt;
       &gt;&gt;
       |
      
      
       STDIN
       &lt;
      
       
      
       
      
       
      
      
       STDERR
       2&gt;
      
       
      </td></tr></table><p class="P433"/><p class="P433"/><p class="P434"/><p class="P434"/><table><caption>Table27</caption><tr><td colspan="2">Numerical values for stdin, stderr and stdout</td></tr><tr><td>stdin</td><td>0</td></tr><tr><td>stdout</td><td>1</td></tr><tr><td>stderr</td><td>2</td></tr></table><p class="P438"/><p class="P438"/><p class="P438"/><p class="P439"/><ol><li><p class="P440">stdout redirection</p></li></ol><p class="P91"/><p class="P441">program &gt; file</p><p class="P91"/><p class="P91"/><p class="P91">The data flows from left to right. </p><p class="P91"/><table><caption>Table23</caption><tr><td>fdisk &#8211;l &gt; partions.txt </td></tr></table><p class="P241"/><p class="Standard"><span class="T23">This will run the </span><span class="T31">fdisk</span><span class="T23"> utility and output the result to the </span><span class="T74">partitions.txt</span><span class="T23"> file. No output is visible. Also notice that the shell will read this line from the right. As a result, the </span></p><p class="Standard"><span class="T74">partitions.txt</span><span class="T23"> file will be created first if it doesn&#8217;t exist and overwritten if the &#8216;</span><span class="T31">&gt;</span><span class="T23">&#8217; operator is used. </span></p><p class="P91"/><p class="P91"/><p class="P91">The &#8216;<span class="T7">&gt;&gt;</span>&#8217; operator will append standard output to a file.</p><p class="P442"/><p class="P439"/><p class="P439"/><table><caption>Table145</caption><tr><th>STDOUT Redirection</th></tr><tr><td>
       
      
       
      
      
       &gt;
       &gt;&gt;
       
       1&gt;
      
      
       process
      
      
       FILE /
       DEVICE
      
       
      </td></tr></table><p class="P439"/><p class="P439"/><p class="P439"/><p class="P439"/><p class="P439"/><ol><li><p class="P444">stdin redirection</p></li></ol><p class="P91"/><p class="P441">program &lt; file</p><p class="P91"/><p class="P91"/><p class="P91">In this case data flows from right to left. The &#8216;<span class="T7">&lt;</span>&#8217; operator is only used for <span class="T7">stdin</span> and cannot be used for <span class="T7">stdout</span>.</p><p class="P91"/><p class="Standard"><span class="T23">If the file </span><span class="T74">instuctions</span><span class="T23"> contains on each line the letters </span><span class="T74">p</span><span class="T23">, </span><span class="T74">m</span><span class="T23">, and </span><span class="T74">q</span><span class="T23"> then the next example would cause </span><span class="T31">fdisk</span><span class="T23"> to print the partition table of </span><span class="T74">/dev/hda</span><span class="T23">, print the utility&#8217;s help screen and finally quit:</span></p><p class="P91"/><p class="P91"/><table><caption>Table24</caption><tr><td>fdisk /dev/hda &lt; instructions </td></tr></table><p class="P241"/><p class="P241"/><table><caption>Table146</caption><tr><th>STDIN Redirection</th></tr><tr><td>
       
      
       
      
      
       
       &lt;
       
       0&lt;
      
      
       process
      
      
       FILE /
       DEVICE
      
       
      </td></tr></table><p class="P439"/><p class="P445"/><p class="P445"/><p class="P445"/><ol><li><p class="P446">stderr redirection</p></li></ol><p class="P91"/><p class="P441">program 2&gt; errorfile</p><p class="P91"/><p class="Standard"><span class="T23">stdin, stdout and stderr are represented by 0, 1 and 2 respectively. This allows one to select the </span><span class="T31">stderr</span><span class="T23"> stream:</span></p><p class="P91"/><p class="P91"/><table><caption>Table25</caption><tr><td>find / 2&gt; /dev/null</td></tr></table><p class="P442"/><p class="P439"/><p class="P439"/><table><caption>Table147</caption><tr><th>STDERR Redirection</th></tr><tr><td>
       
      
       
      
      
       
       2&gt;
      
      
       process
      
      
       FILE /
       DEVICE
      
       
      </td></tr></table><p class="P439"/><p class="P439"/><p class="P439"/><p class="P442"/><ol><li><p class="P447">piped commands</p></li></ol><p class="P91"/><p class="P441">program1 <span class="T17">|</span> program2</p><p class="P91"/><p class="Standard"><span class="T23">Pipes are represented by the &#8220;|&#8221; symbol. The data stream goes from the left to the right. The next figure illustrates how the </span><span class="T31">stdout</span><span class="T23"> for one process is redirected to the </span><span class="T31">stdin</span><span class="T23"> for another process.</span></p><p class="P91"/><p class="P91"/><p class="P91"/><table><caption>Table148</caption><tr><th>Piped Commands</th></tr><tr><td>
       
      
       
      
      
       
       |
      
      
       process
      
      
       process
      
       
      </td></tr></table><p class="P305"/><p class="P91"/><p class="P91"/><table><caption>Table26</caption><tr><td>cat /var/log/messages | less </td></tr></table><p class="P47"/><p class="P47"/><p class="P162">NB Multiple output redirects are parsed from right to left, so the following commands are not equivalent.</p><p class="P162"/><p class="P162">Do-command 2&gt;&amp;1 &gt;logfile</p><p class="P162">Do-command &gt;logfile 2&gt;&amp;1</p><p class="P162"/><p class="P162"/><p class="P439"/><p class="P439"/><p class="P439"/><p class="P439"/><p class="P439"/><ol><li><p class="P448">The tee Command</p></li></ol><p class="P162"/><p class="P162"><span class="T41">command</span><span class="T7"> | </span><span class="T7">tee</span><span class="T7"> </span><span class="T42">FILENAME</span></p><p class="P162"/><p class="P162"/><p class="P162">This command is used after a pipe and takes a filename as an argument. The standard output from the previous command is then sent to the file given as an argument but <span class="T7">tee</span><span class="T8"> also lets the stream through to </span><span class="T7">stdout</span><span class="T8">. The </span><span class="T7">stdout </span><span class="T8">has been duplicated in this way.</span></p><p class="P162"/><p class="P162"/></section><section class="4. Metacharacters and Quotes"><title>4. Metacharacters and Quotes</title><p class="P91"/><p class="P91"/><p class="Standard"><span class="T23">Metacharacters are characters that have special meaning for the shell. They are mainly used for </span><span class="T74">file globbing</span><span class="T76">,</span><span class="T76"> that is to match several files or directory names using a minimum of letters. </span></p><p class="P449"/><p class="P449"/><p class="P449">The input (&lt;), output (&gt;) and pipe (|) characters are also special characters as well as the dollar ($) sign used for variables. We will not list them here but note that these characters are seldom used to name regular files. </p><p class="P91"/><p class="P91"/><p class="P91"/><p class="P415">Wildcards</p><p class="P91"/><p class="Standard"><span class="T45">&#9679;</span><span class="T23"> The</span><span class="T23"> </span><span class="T30">*</span><span class="T23"> wildcard can replace any number of characters.</span></p><p class="P91"/><table><caption>Table28</caption><tr><td>ls /usr/bin/b* lists all programs starting with a 'b'</td></tr></table><p class="P162"/><p class="Standard"><span class="T45">&#9679;</span><span class="T23"> The </span><span class="T30">?</span><span class="T23"> wildcard replaces any one character. </span></p><p class="P91"/><table><caption>Table29</caption><tr><td>ls /usr/bin/?b* lists all programs having a 'b' as the second letter</td></tr></table><p class="Standard"/><p class="P21"/><p class="Standard"><span class="T86">&#9679;</span><span class="T30"> </span><span class="T30">[ ]</span><span class="T23"> is used to define a range of value.</span></p><p class="P91"/><table><caption>Table30</caption><tr><td>ls a[0-9] lists all files starting with an 'a' and have a digit in second position. Alsols [!Aa]* lists all files that don't start with an 'a' or an 'A'</td></tr></table><p class="Standard"/><p class="Standard"><span class="T86">&#9679; </span><span class="T30">{</span><span class="T81">string1,string2</span><span class="T30">}</span><span class="T30">;</span><span class="T23"> although not just a file naming wildcard, it can be used to match the names of existing files.</span></p><p class="P91"/><table><caption>Table31</caption><tr><td>ls index.{htm,html}</td></tr></table><p class="P348"/><p class="P415"/><p class="P415">Quotes and escape codes</p><p class="P450"/><p class="Standard"><span class="T23">The special meaning of metacharacters can be cancelled by </span><span class="T81">escape characters</span><span class="T23">, which are also metacharacters. </span></p><p class="P91"/><p class="Standard"><span class="T23">The backslash (</span><span class="T40">\)</span><span class="T30"> </span><span class="T40">is called the </span><span class="T30">escape character and </span><span class="T23">cancels the meaning of all metacharacters forcing the shell to interpret them literally. </span></p><p class="P91"/><p class="Standard"><span class="T23">The single quotes (</span><span class="T40">' '</span><span class="T40">)</span><span class="T30"> </span><span class="T23">cancel the meaning of all metacharacters except the backslash.</span></p><p class="P91"/><p class="Standard"><span class="T23">The double quotes</span><span class="T30"> </span><span class="T40">(</span><span class="T40">" "</span><span class="T40">)</span><span class="T23"> are the weakest quotes but cancel most of the special meaning of the enclosed characters except the pipe (|), the backslash (</span><span class="T31">\)</span><span class="T23"> and a variable (</span><span class="T40">$</span><span class="T23">var). </span></p><p class="P451"/><p class="P452"/><p class="P452"/><p class="P452">The back tick</p><p class="P453"/><p class="Standard"><span class="T23">Back quotes</span><span class="T30"> </span><span class="T30">`` </span><span class="T23">will execute a command enclosed. The next example defines the variable TIME using the </span><span class="T30">date</span><span class="T23"> command.</span></p><p class="P91"/><table><caption>Table32</caption><tr><td>TIME="Today's date is `date +%a:%d:%b`&#8221;echo $TIMEToday's date is Sun:15:Jul</td></tr></table><p class="P91"/><p class="P91"/><p class="Standard"><span class="T23">Another way of executing commands (similar to the back ticks) is to use </span><span class="T30">$()</span><span class="T23">. This will execute the enclosed command and treat it as a variable. </span></p><p class="P91"/><p class="P91"/><table><caption>Table33</caption><tr><td>TIME=$(date)</td></tr></table><p class="P91"/><p class="P91"/><p class="P91"/></section><section class="5. The Command History"><title>5. The Command History</title><p class="P348"/><p class="P348"/><p class="Standard"><span class="T23">To view the list of previously typed commands you can use the </span><span class="T30">bash</span><span class="T23"> built-in command </span><span class="T30">history</span><span class="T23">.</span></p><p class="P91"/><p class="P91"/><table><caption>Table34</caption><tr><td>history</td></tr></table><p class="P91"/><p class="P91"/><p class="P47">This has listed all the cached commands as well as the commands save in <span class="T7">~/.</span><span class="T7">bash_history</span><span class="T8">. When a user exits the shell cached commands are saved to </span><span class="T7">~/.bash_history</span><span class="T8">.</span></p><p class="P47"/><p class="P47"/><p class="P91">You can recall commands by using the Up-arrow and Down-arrow on your keyboard. There are also emacs key bindings that enable you to execute and even edit these lines.</p><p class="P91"/><p class="P176"/><p class="P176"/><table><caption>Table35</caption><tr><td colspan="2">Emacs Key Bindings for Editing the Command History</td></tr><tr><td>Ctrl+P</td><td>Previous line (same as Up-arrow)</td></tr><tr><td>Ctrl+n</td><td>Next line (same as Down-arrow)</td></tr><tr><td>Ctrl+b</td><td>Go back one character on the line (same as Left-Arrow)</td></tr><tr><td>Ctrl+f</td><td>Go forward one character on the line (Same as Right-Arrow)</td></tr><tr><td>Ctrl+a</td><td>Go to the beginning of the line (Same as &lt;Home&gt;)</td></tr><tr><td>Ctrl+e</td><td>Go to the end of the line (Same as &lt;End&gt;)</td></tr></table><p class="P170"/><p class="P163"/><p class="Standard"><span class="T23">The bang </span><span class="T30">!</span><span class="T23"> key can be used to rerun a command. </span></p><p class="P91"/><p class="P91"/><p class="P91"/><p class="P91">Example</p><table><caption>Table36</caption><tr><td>!x executes the latest command in the history list starting with an 'x'!2 runs command number 2 from the history output!-2 runs the command before last!! runs the last command^string1^string2 run previous command and replace string1 by string2</td></tr></table><p class="Standard"/><p class="Standard"/></section><section class="6. Other Commands"><title>6. Other Commands</title><p class="P91"/><p class="P91"/><p class="P415">Aliases</p><p class="P91"/><p class="P91">You can create aliases for commands needing many arguments. The format to create an alias is</p><p class="P91"/><table><caption>Table37</caption><tr><td>alias myprog='command [options]{arguments}'</td></tr></table><p class="P91"/><p class="P91">By typing <span class="T55">alias</span> alone at the command line you will get a list of currently defined aliases.</p><p class="P91"/><p class="P91"/><p class="P91"/><p class="P415">Command completion</p><p class="P91"/><p class="Standard"><span class="T23">By pressing </span><span class="T30">TAB,</span><span class="T23"> the shell will complete the commands you have started typing in.</span></p><p class="P91"/><p class="P91"/><p class="P415"/><p class="P415">&lt;&lt; is a redirection for EOF</p><p class="P91"/><p class="P91">For example</p><p class="P91"/><p class="P457">cat &lt;&lt; stop</p><p class="P91"/><p class="P91"/><p class="P91">will accept standard input until the keyword 'stop' is entered.</p><p class="P91"/><p class="P91"/><p class="P91"/><p class="P441">Compound commands </p><p class="P458"/><table><caption>Table122</caption><tr><td>command1; command2; command3</td><td>The three commands are run in sequence regardless of the success of the previous command</td></tr><tr><td>command1 &amp;&amp; command2 &amp;&amp; command3</td><td>Each command will execute only if the previous exit code is 0 (success)</td></tr><tr><td>command1 || comand2 || command3</td><td>The next command will execute only if the previous exit code is not 0 (failure) </td></tr></table><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="P415">The ''exec' command</p><p class="P415"/><p class="P458">This command is not a binary but rather is part of the shell. It is used to start other commands. Ordinarily if a command is executed, a sub-process is started. If the exec command is used to initiate the new program, it reoccupies the process used to start it. It replaces the current shell (in a script or the interactive shell). </p><p class="P458"/><p class="P458">When the new command terminates, control is not passed back to the calling shell, but returns to the process that called the shell used to make the exec call.</p><p class="P458"/><p class="P91"/><table><caption>Table149</caption><tr><td>echo $$414$ bash$ echo $$455$ echo hellohello$ echo $$455$ exec echo hellohello$ echo $$414</td></tr></table><p class="P458"/><p class="P458">The above shows control falling back to the second shell (process 455) after a straight forward echo and the first shell (process 414) using an exec.</p><p class="P458"/><p class="P459">Manpages and the whatis database</p><p class="P459"/><p class="P459"/><table><caption>Table229</caption><tr><td colspan="2">The manpages are organised in sections</td></tr><tr><td>NAME</td><td>the name of the item followed by a short one line description.</td></tr><tr><td>SYNOPSYS</td><td>the syntax for the command</td></tr><tr><td>DESCRIPTION</td><td>a longer description</td></tr><tr><td>OPTIONS</td><td>a review of all possible options and their function</td></tr><tr><td>FILES</td><td>files that are related to the current item (configuration files etc)</td></tr><tr><td>SEE ALSO</td><td>other manpages related to the current topic</td></tr></table><p class="P459"/><p class="P462"><span class="T40">These are the main sections one can expect to find in a manpage. </span></p><p class="P462"/><p class="P461">The <span class="T7">whatis</span> database stores the NAME section of all the manpages on the system. This is done through a daily <span class="T7">cron</span><span class="T8">. The </span><span class="T7">whatis</span><span class="T8"> database has the following two entries:</span></p><p class="P463"/><table><caption>Table230</caption><tr><td>name(key) &#8211; one line description</td></tr></table><p class="P461"/><p class="P461"/><p class="P462"><span class="T23">The syntax for </span><span class="T31">whatis</span> is:</p><p class="P465">whatis &lt;string&gt;</p><p class="P461"/><p class="P461">The output is the full NAME section of the manpages where <span class="T42">string</span><span class="T8"> matched </span><span class="T42">named(key)</span> </p><p class="P461"/><p class="P462"><span class="T23">One can also use the </span><span class="T31">man</span><span class="T31"> </span><span class="T40">command to query the whatis database. The syntax is</span></p><p class="P463"/><p class="P466">man -k &lt;string&gt;</p><p class="P467"/><p class="P467">This command is similar to <span class="T7">apropos</span><span class="T8">. Unlike</span> whatis this will query both the &#8220;name&#8221; and the &#8220;one line description&#8221; entries of the database. If the string matches a word in any of these fields the above query will return the full NAME section.</p><p class="P467"/><p class="P467"/><p class="P467">Example: (the matching string has been highlighted) </p><p class="P467"/><table><caption>Table231</caption><tr><td>whatis lilo</td></tr><tr><td>lilo (8) - install boot loader</td></tr><tr><td>lilo.conf [lilo] (5) - configuration file for lilo</td></tr></table><p class="P467"/><table><caption>Table232</caption><tr><td>man -k lilo</td></tr><tr><td>grubby (8) - command line tool for configuring grub, lilo, and elilo</td></tr><tr><td>lilo (8) - install boot loader</td></tr><tr><td>lilo.conf [lilo] (5) - configuration file for lilo</td></tr></table><p class="P462"/><p class="P462"><span class="T23">The FHS recommends manpages to be kept in </span><span class="T31">/usr/share/man</span><span class="T40">. However additional locations can be searched using the </span><span class="T40">MANPATH</span><span class="T40"> </span><span class="T40">environment variable set in </span><span class="T31">/etc/man.config</span><span class="T40">. Each directory is further divided into subdirectories corresponding to manpage sections. </span></p><p class="P461"/><table><caption>Table233</caption><tr><td colspan="2">Manpage Sections</td></tr><tr><td>Section 1</td><td>Information on executables </td></tr><tr><td>Section 2</td><td>System calls, e.g mkdir(2)</td></tr><tr><td>Section 3</td><td>Library calls, e.g stdio(3)</td></tr><tr><td>Section 4</td><td>Devices (files in /dev)</td></tr><tr><td>Section 5</td><td>Configuration files and formats</td></tr><tr><td>Section 6</td><td>Games</td></tr><tr><td>Section 7</td><td>Macro packages</td></tr><tr><td>Section 8</td><td>Administration commands</td></tr><tr><td>Section 9</td><td>Kernel routines </td></tr></table><p class="P461"/><p class="P461"/><p class="P461">To access a specific section <span class="T16">N</span><span class="T17"> one has to enter:</span></p><p class="P470"/><p class="P471">man <span class="T16">N</span> command</p><p class="P462"/><p class="P467">Examples:</p><p class="P467"/><table><caption>Table234</caption><tr><th>man mkdir</th></tr><tr><td>man 2 mkdir</td></tr></table><p class="P467"/><p class="P467"/><table><caption>Table235</caption><tr><td>man crontab</td></tr><tr><td>man 5 crontab</td></tr></table><p class="P472"/><p class="P473"/><p class="P405"/></section><section class="7. Exercise and Summary"><title>7. Exercise and Summary</title><p class="Standard"/><p class="Standard"/><p class="P292"><span class="T7">Review </span><span class="T7">Questions</span> (answers p.150)</p><p class="Standard"/><p class="Standard"/><p class="P93">Yes or No</p><p class="Standard"/><p class="Standard">1. If the PATH variable isn't properly set then programs can be </p><p class="Standard">started only if users type in the executable's full or relative path_____</p><p class="Standard"/><p class="Standard">2. The STDOUT from a process can be piped into a file_____</p><p class="Standard"/><p class="Standard">3. Once a data stream has gone through a pipe that stream is </p><p class="Standard">generally no longer visible on STDOUT_____</p><p class="Standard"/><p class="Standard">4. All the commands entered at the shell are stored in a mysql database_____</p><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="P95">Glossary</p><p class="P83"/><p class="P83"/><table><caption>Table222</caption><tr><td>Term</td><td>Description</td></tr><tr><td>compound commands</td><td>several commands given in a single line at the shell using delimiters. Depending on the delimiter the shell will execute the commands differently (p.64)</td></tr><tr><td>metacharacters</td><td>character that is not interpreted literally by the shell but has added meaning</td></tr><tr><td>command substitution</td><td>use the output of a command as a variable. This is done by enclosing the command in back ticks `` or round brackets $() For example ls /home/$(whoami) will list the current user's home directory</td></tr><tr><td>file globbing</td><td>term used when handling multiple file names using wild cards. The name comes from the glob sub-program in old UNIX shells used to expand wild cards given on the command line</td></tr><tr><td>redirection and pipes</td><td>operations that manipulate data streams and the file descriptors of a process. A redirection involves a process and a file, whereas a pipe will involve only processes</td></tr><tr><td>stderr, stdin, stdout</td><td>names of the file descriptors available for any process to stream error messages, read input streams and write output (non-error) streams </td></tr><tr><td>wild cards</td><td>the following *, ? , "{}" or "[ ]" metacharacters used to match more than one character when working on the command line </td></tr></table><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="P95">Commands</p><p class="P83"/><table><caption>Table221</caption><tr><td>Command</td><td>Description (or apropos)</td></tr><tr><td>alias</td><td>set an alias for a single or a sequence of commands (see man builtins or help alias)</td></tr><tr><td>echo</td><td>print text to STDOUT </td></tr><tr><td>env</td><td>list variables that have been exported (see man builtins or help env)</td></tr><tr><td>exec</td><td>Shell built-in used to execute new programs but instead of starting a new sub-process it replaces the calling process </td></tr><tr><td>export</td><td>export the value of a variable to the environment of subsequently executed commands (see man builtins or help export)</td></tr><tr><td>history</td><td>display the command history list with line numbers (see man builtins or help history)</td></tr><tr><td>tee</td><td>tee(1) &#8211; read from standard input and write to (both) standard output and files</td></tr><tr><td>set</td><td>list all variables in the environment of the current process (see also man builtins and help set)</td></tr></table><p class="Standard"/><p class="Standard"/><p class="P95">Exercises</p><p class="Standard"/><table><caption>Table158</caption><tr><td>WARNING: You will need the uuencode and uudecode commands in the exercises. These commands are provided by the sharutils package. </td></tr></table><section class="Stdin-stdout-stderr"><title>Stdin-stdout-stderr</title><fixme author="openoffice-common2forrest template">
          The previous heading is more than one level below the heading before it. To remove this fixme, correct the structuring of your document.
        </fixme><p class="P32"/><p class="P32">Type the next commands and represent the sequence of execution (if possible) using diagrams similar to the ones used in this chapter.</p><p class="Standard"/><table><caption>Table132</caption><tr><td>ls /etc ; df &gt; /tmp/out.1(ls /etc ; df) &gt; /tmp/out.2find /etc -type f 2&gt; /dev/null | sort tr [a-z] [A-Z] &lt; /etc/passwd | sort &gt; /tmp/passwd.tmpcat /tmp/passwd.tmp | tr [A-Z] [a-z]</td></tr></table><p class="P32"/></section><section class="Command Line"><title>Command Line</title><fixme author="openoffice-common2forrest template">
          The previous heading is more than one level below the heading before it. To remove this fixme, correct the structuring of your document.
        </fixme><p class="P296"/><p class="P156"><span class="T31">1</span><span class="T23">. List all files in /usr/X11R6/bin that don't start with an x</span></p><p class="P47"/><p class="P156"><span class="T23"/><span class="T27">ls /usr/X11R6/bin/[!x]*</span></p><p class="P47"/><p class="P156"><span class="T31">2</span><span class="T23">. The command </span><span class="T31">xterm</span><span class="T23"> has the following options:</span></p><p class="P478">-bg &lt;color&gt;set background</p><p class="P478">-fg &lt;color&gt;set foreground</p><p class="P478">-e &lt;command&gt;execute &#8216;command&#8217; in terminal</p><p class="P156"><span class="T23">Set a new alias such that the </span><span class="T31">su</span><span class="T23"> command opens a new color xterm and prompts for a root password.</span></p><p class="P47"/><p class="P47"><span class="T13">alias su=&#8221;xterm -bg orange -fg brown -e su - &amp;&#8221;</span></p><p class="P47"/><p class="P47">Where would you store this alias on the system? ___________</p><p class="P162"/><p class="P162"/><p class="P170"><span class="T31">3</span><span class="T23">. You can encode files using </span><span class="T31">uuencode</span><span class="T23">. The encoded file is redirected to stdout. </span></p><p class="P170"><span class="T23">For example: </span><span class="T74">uuencode /bin/bash super-shell &gt; uufile</span><span class="T23"> encodes </span><span class="T31">/bin/bash</span><span class="T23"> and will produce a file called </span><span class="T31">super-shell</span><span class="T23"> when running </span><span class="T31">uudecode </span><span class="T135">against the</span><span class="T136"> </span><span class="T137">uufile</span></p><p class="P479"/><ol><li><p class="P480"><span class="T120">Mail the uuencoded /bin/bash to a local user (for this you can either use </span><span class="T138">uuencode</span><span class="T120"> and a pipe </span><span class="T138">| , </span><span class="T120">or save the uuencoded output to a file </span><span class="T139">uufile </span><span class="T120">and use STDIN redirection </span><span class="T138">&lt;</span><span class="T120">).</span></p></li><li><p class="P481">Split the uuencoded file into 5 files: </p></li></ol><p class="P479"/><p class="P482">uuencode /bin/bash super-shell &gt; uufile</p><p class="P482">split &#8211;b 150000 uufile base-name.</p><p class="P482"/><p class="P170"><span class="T23">This will create files called </span><span class="T89">base-name.aa, base-name.ab,</span><span class="T23"> etc</span></p><p class="P162"/><p class="P162">To get a uuencoded file with all the original data (unsplit) do</p><p class="P162"/><p class="P482">cat base-name.* &gt; uufile.new </p><p class="P47"/><p class="P47">Finally uudecode the file and check it still works.</p><p class="P47"/><p class="P47"/><p class="P375">uudecode uufile.new</p><p class="P375"/><p class="P156"><span class="T45">This should create a binary file called </span><span class="T86">super-shell</span></p><p class="P483"/><p class="P484"><span class="T55">3. </span><span class="T8">Which tool finds the full path to a binary</span> by scanning the PATH variable? _____</p><p class="P485"/></section><section class="Variables"><title>Variables</title><fixme author="openoffice-common2forrest template">
          The previous heading is more than one level below the heading before it. To remove this fixme, correct the structuring of your document.
        </fixme><p class="P143"/><p class="P156"><span class="T44">1</span><span class="T45">. Do the following</span></p><p class="P484"/><p class="P487">Assign the value &#8216;virus&#8217; to the variable ALERT. </p><p class="P487"/><p class="P487"><span class="T13">ALERT=virus</span></p><p class="P487"/><p class="P488"><span class="T45">Verify that it is defined using the </span><span class="T44">set</span><span class="T45"> command</span>:</p><p class="P488"/><p class="P488"><span class="T27">set |grep ALERT</span></p><p class="P487"/><p class="P488"><span class="T45">Is ALERT listed when using </span><span class="T44">env</span><span class="T46"> instead of </span><span class="T44">set</span>?</p><p class="P487"/><p class="P487"/><p class="P487">Next type &#8216;bash&#8217;. Can you access the ALERT variable?</p><p class="P487"/><p class="P487"><span class="T13">bash</span></p><p class="P489">echo $ALERT</p><p class="P487"/><p class="P487">NOTE the value of ALERT: ______ ( is it blank?)</p><p class="P487"/><p class="P487">Type exit (or ^D) to return to your original session.</p><p class="P487"/><p class="P488"><span class="T45">Use the </span><span class="T44">export</span><span class="T45"> command to make ALERT a global variable. </span></p><p class="P487"/><p class="P487"><span class="T13">export ALERT</span></p><p class="P487"/><p class="P487">Verify that it is a global (env) variable</p><p class="P488"/><p class="P488"><span class="T27">env | grep ALERT</span></p><p class="P487"/><ol><li><p class="P490"><span class="T45">Start a new </span><span class="T44">bash </span><span class="T45">shell and make sure that ALERT is defined in the new shell: </span></p></li></ol><p class="P491"/><p class="P491"><span class="T140">bash</span></p><p class="P492">echo $ALERT</p><p class="P47">In this new shell, redefine the variable ALERT</p><p class="P47"/><p class="P47"><span class="T13">export ALERT=green</span></p><p class="P47"/><p class="P47">Exit that shell. What is the value of ALERT in the original shell? ________</p><p class="P491"/><p class="P491"/><p class="P491"/><p class="Standard"><span class="T31">2</span><span class="T23">. At the command prompt type the following lines:</span></p><p class="P91"/><p class="Standard"><span class="T23"/><span class="T43">CREDIT01=300;CREDIT02=400</span></p><p class="Standard"><span class="T23"/><span class="T43">for VAR in CREDIT01 CREDIT02;do echo $VAR;done</span></p><p class="P47"/><p class="P91">Notice that the variable VAR is referenced with $VAR.</p><p class="P91"/><p class="P91"/><p class="Standard"><span class="T31">(i)</span><span class="T23"> Rerun this command.</span></p><p class="P47"/><p class="Standard"><span class="T31">(ii)</span><span class="T23"> Rerun this command replacing CREDIT01 by $CREDIT01</span></p><p class="P91"/><p class="Standard"><span class="T31">3</span><span class="T23">. Using appropriate quotes change your PS1 variable to include the full path to your working directory. </span></p><p class="P107">(Hint: the value of PS1 is [\u@ \W]\$ , you only need to replace the \W by a \w)</p><p class="P107"/><p class="P493">PS1='[\u@\h \w ]\$ '</p><p class="P107"/><p class="P107">What does PS2 look like? ________ </p></section></section></section><section class="File Management"><title>File Management</title><p class="P495"/><p class="P495"/><p class="P495"/><p class="P495"/><p class="P495"/><p class="P217">Prerequisites</p><p class="P218"/><p class="P72"><span class="T26">The Command Line (see p.</span><span class="T26">56</span><span class="T26">)</span></p><p class="P218">Understand the EXT2 file system (see p.42)</p><p class="P218"/><p class="P217">Goals</p><p class="P218"/><p class="P218">Effectively move around the filesystem to create, delete and find files or directories</p><p class="P496">Distinguish between hard and symbolic links</p><p class="P218"/><p class="P218"/><p class="P218"/><p class="P302">Contents</p><p class="P72"/><p class="P497"/><p class="P495"/><p class="P498"/><section class="1. Moving around the filesystem"><title>1. Moving around the filesystem</title><p class="P499"/><p class="P499">Absolute and relative paths</p><p class="P499"/><p class="P500">A directory or a file can be accessed by giving its full pathname, starting at the root (/) or its relative path, starting from the current directory.</p><p class="P500"/><p class="P501"><span class="T81">Absolute path</span><span class="T23">:independent of the user's current directory</span></p><p class="P500">starts with /</p><p class="P501"><span class="T81">Relative path</span><span class="T23">:depends on where the user is</span></p><p class="P500">doesn't start with /</p><p class="P500"/><p class="P500">As in any structured filesystem there are a number of utilities that can help you navigate through the system. The next two commands are built-in commands.</p><p class="P500"/><p class="P500"/><p class="P501"><span class="T30">pwd</span><span class="T23">:Gives your actual position as an absolute path.</span></p><p class="P501"><span class="T30">cd</span><span class="T23">:The 'change directory' command</span></p><p class="P500"/><p class="P500"/></section><section class="2. Finding Files and Directories"><title>2. Finding Files and Directories</title><p class="P500"/><p class="P501"><span class="T23">We will describe the </span><span class="T30">find</span><span class="T40">, </span><span class="T31">which</span><span class="T40">, </span><span class="T31">whereis</span><span class="T23"> and </span><span class="T30">locate</span><span class="T23"> utilities.</span></p><p class="P500"/><p class="P500"/><ol><li><p class="P502">find</p></li></ol><p class="P500">Syntax:</p><p class="P503">find &lt;DIRECTORY&gt; &lt;CRITERIA&gt; [-exec &lt;COMMAND&gt; {} \;]</p><p class="P500"/><p class="P501"><span class="T23">The </span><span class="T81">DIRECTORY</span><span class="T23"> argument tells </span><span class="T30">find </span><span class="T23">where to start searching and </span><span class="T81">CRITERIA</span><span class="T23"> can be the name of a file or directory we are looking for.</span></p><p class="P500"/><p class="P504">Examples:</p><table><caption>Table38</caption><tr><td>find /usr/X11R6/bin -name ¨x*¨.find / -user 502</td></tr></table><p class="P500"/><p class="P501"><span class="T23">Matching lines are listed to standard out. This output can be acted upon. For example delete the file, or change the permission. The </span><span class="T30">find </span><span class="T23">tool has the build-in option </span><span class="T30">&#8211;exec </span><span class="T23">which allows you to do that. For example, remove all files belonging to user 502:</span></p><p class="P500"/><table><caption>Table39</caption><tr><td>find / -type f -user 502 &#8211;exec rm &#8211;f {} \;</td></tr></table><p class="P499"/><ol><li><p class="P506">xargs</p></li></ol><p class="P500"/><p class="P501"><span class="T23">This tool is often thought of as a companion tool to </span><span class="T30">find</span><span class="T23">. In fact </span><span class="T30">xargs</span><span class="T23"> will process each line of standard output as an </span><span class="T81">argument</span><span class="T23"> for another tool. We could use </span><span class="T30">xargs</span><span class="T23"> to delete all files belonging to a user with:</span></p><p class="P500"/><table><caption>Table40</caption><tr><td>find / -type f -user 502 | xargs rm &#8211;f</td></tr></table><p class="P500"/><p class="P507"><span class="T82">&#61510;</span><span class="T23"> Certain commands such as </span><span class="T30">rm</span><span class="T23"> cannot deal with too long arguments. It is sometimes necessary to delete all files in a directory with</span></p><p class="P508">ls |xargs rm -f</p><p class="P500"/><p class="P509"/><table><caption>Table133</caption><tr><td colspan="2">Common criteria switches for find</td></tr><tr><td>-type</td><td>specify the type of file</td></tr><tr><td>-name</td><td>name of the file </td></tr><tr><td>-user</td><td>user owner </td></tr><tr><td>-atime, ctime, mtime</td><td>access, creation and modified times (multiples of 24 hrs)</td></tr><tr><td>-amin, cmin, mmin</td><td>access, creation and modified times (multiples of 1 min)</td></tr><tr><td>-newer FILE</td><td>files newer than FILE</td></tr></table><p class="P500"/><p class="P500"/><p class="P500"/><ol><li><p class="P510"><span class="T30">locate</span><span class="T23"> </span></p></li></ol><p class="P500">Syntax:</p><p class="P503">locate &lt;STRING&gt;</p><p class="P500"/><p class="P501"><span class="T23">When using </span><span class="T30">locate</span><span class="T23"> all files and directories that match the </span><span class="T81">expression</span><span class="T23"> are listed.</span></p><p class="P500"/><table><caption>Table135</caption><tr><td> locate X11R </td></tr></table><p class="P500"/><p class="P501"><span class="T23">The search is much faster. In fact </span><span class="T30">locate</span><span class="T23"> queries the </span><span class="T30">/</span><span class="T30">var/lib/slocate/slocate.db</span><span class="T23"> </span><span class="T23">database. This database is kept up to date via a daily cron job which runs </span><span class="T30">updatedb</span><span class="T23">.</span></p><p class="P500"/><p class="P500">When running <span class="T7">updatedb</span><span class="T8"> from the command line the </span><span class="T7">/etc/updatedb.conf</span><span class="T8"> file is read to determine pruned files systems (e.g NFS) and directories (e.g /tmp)</span></p><p class="P512"/><p class="P512"/><ol><li><p class="P513">which</p></li></ol><p class="P512">Syntax:</p><p class="P503">which string</p><p class="P500"/><p class="P500">This tool will return the full path to the file called <span class="T7">string </span>by <span class="T8">scanning</span> the directories defined in the user's PATH variable only. As a result <span class="T7">which</span><span class="T8"> is only used to find commands.</span> </p><p class="P500"/><p class="P500"/><ol><li><p class="P514">whereis</p></li></ol><p class="P512">Syntax</p><p class="P515">whereis string</p><p class="P500"/><p class="P501"><span class="T23">This tool will return the full path to source or binaries as well as documentation files matching </span><span class="T31">string</span><span class="T40"> by scanning the PATH variable as well as a number of well known locations</span></p><p class="P500"/><p class="P499">Getting the most from ls </p><p class="P500"/><table><caption>Table41</caption><tr><td colspan="2">Most common options for ls</td></tr><tr><td>-I</td><td>show inode</td></tr><tr><td>-h</td><td>print human readable sizes</td></tr><tr><td>-n</td><td>list UIDs and GIDs</td></tr><tr><td>-p</td><td>append descriptor (/=@) to list</td></tr><tr><td>-R</td><td>recursively display content of directories</td></tr><tr><td>-S</td><td>sort by file size</td></tr><tr><td>-t</td><td>sort by modification time (similar to -c)</td></tr><tr><td>-u</td><td>show last access time</td></tr></table><p class="P501"/><p class="P501"/></section><section class="3. Handling directories"><title>3. Handling directories</title><p class="P499"/><p class="P501"><span class="T24">Making a directory with </span><span class="T24">mkdir</span><span class="T23">:</span></p><p class="P501"><span class="T23">When making a directory you can set the permission mode with the </span><span class="T30">-m</span><span class="T23"> option. Another useful option is </span><span class="T30">-p</span><span class="T23"> which creates all subdirectories automatically as needed.</span></p><p class="P500"/><p class="P500">Example:</p><p class="P500"/><table><caption>Table42</caption><tr><td>mkdir &#8211;p docs/programs/versions</td></tr></table><p class="P500"/><p class="P500"/><p class="P501"><span class="T24">Removing directories</span><span class="T23">:</span></p><p class="P501"><span class="T23">To remove a directory use either </span><span class="T30">rmdir</span><span class="T23"> or </span><span class="T30">rm</span><span class="T30"> -r</span><span class="T23">. If you are root you may have to specify </span><span class="T30">-f</span><span class="T23"> to force the deletion of all files.</span></p><p class="P91"/><p class="P501"><span class="T31">Notice</span><span class="T23">:</span><span class="T43">rm &#8211;rf /dir1/*</span><span class="T45"> removes all files and subdirectories leaving dir1 empty</span></p><p class="P501"><span class="T31"/><span class="T43">rm &#8211;rf /dir1/</span><span class="T45"> removes all files and subdirectories including dir1</span></p><p class="P500"/></section><section class="4. Using cp and mv"><title>4. Using cp and mv</title><p class="P499"/><p class="P499">cp</p><p class="P500">Syntax:</p><p class="P517"><span class="T120">cp [options] </span><span class="T139">file1 file2</span></p><p class="P517"><span class="T120">cp [options] </span><span class="T139">files directory</span></p><p class="P500"/><p class="P501"><span class="T23">It is important to notice that </span><span class="T30">cp</span><span class="T23"> </span><span class="T81">file1 file2</span><span class="T23"> makes a new copy of </span><span class="T81">file1</span><span class="T23"> and leaves </span><span class="T81">file1</span><span class="T23"> unchanged.</span></p><p class="P500"/><p class="P500"/><p class="P504">Fig: file1 with inode 250 is copied to file2, duplicating the data to a new data area and creating a new inode 6238 for file2</p><p class="P504"/><table><caption>Table130</caption><tr><td>
       
      
       
      
       
       I D250
       
      
       
      
       
       I D6238</td></tr></table><p class="P504"/><p class="P500"/><p class="P500"/><p class="P500">You can also copy several files to a directory, using a list or wildcards. The following table lists the most used options.</p><p class="P163"/><table><caption>Table43</caption><tr><td colspan="2">Most common options for cp </td></tr><tr><td>-d</td><td>do not follow symbolic link (when used with -R)</td></tr><tr><td>-f</td><td>force</td></tr><tr><td>-I</td><td>interactive, prompt before overwrite</td></tr><tr><td>-p</td><td>preserve file attributes</td></tr><tr><td>-R</td><td>recursively copy directories</td></tr></table><p class="P98"/><p class="P520"><span class="T9">Note</span><span class="T5">: </span><span class="T25">cp &#8211;r /dir/* /dir2/</span><span class="T5"> will copy all files and subdirectories omitting mydir</span></p><p class="P501"><span class="T23"/><span class="T43">cp &#8211;r /mydir/ /dir2/</span><span class="T45"> will copy all files and subdirectories including mydir</span></p><p class="P500"/><p class="P499"/><p class="P500"><span class="T55">mv</span> </p><p class="P500">Syntax:</p><p class="P503">mv [options] <span class="T75">oldname newname</span></p><p class="P501"><span class="T142">mv [options] source destination</span><span class="T143"> </span></p><p class="P521">mv [options] source directory</p><p class="P521"/><p class="P521"/><p class="P501"><span class="T23">The </span><span class="T30">mv</span><span class="T23"> command can both </span><span class="T81">move</span><span class="T23"> and </span><span class="T81">rename </span><span class="T76">files and directories</span><span class="T23">. If </span><span class="T81">oldname </span><span class="T23">is a file and </span><span class="T81">newname</span><span class="T23"> is a directory then the file </span><span class="T81">oldname</span><span class="T23"> is </span><span class="T29">moved</span><span class="T23"> to that directory. </span></p><p class="P500"/><p class="P500">If the source and destination are on the same filesystem, then the file isn't copied but the inode information is updated to specify the new location. Most common options are <span class="T55">-f</span> force overwrite and <span class="T55">-i </span>query interactively.</p><p class="P499"/><p class="P499"/><p class="P499"/></section><section class="5. Hard Links and Symbolic Links"><title>5. Hard Links and Symbolic Links</title><p class="P499"/><p class="P499"/><p class="P499">Symbolic links</p><p class="P500"/><p class="P500">A soft link to a file or a directory creates a new inode that points to the same data area: </p><p class="P500"/><p class="P500"/><p class="P522"><span class="T28"><img alt="Graphic44" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T43">ln</span><span class="T43"> -s lilo.conf lilo.sym</span></p><p class="P523"/><p class="P500"/><p class="P500"/><p class="P500">This is the listing for these files. Notice that the reference count is <span class="T55">1 </span>for both files.</p><p class="P501"><span class="T43">-rw------- </span><span class="T144">1</span><span class="T43"> root root 223 Nov 9 09:06 lilo.conf</span></p><p class="P501"><span class="T43">lrwxrwxrwx </span><span class="T144">1</span><span class="T43"> root root 9 Nov 9 09:06 lilo.sym -&gt; lilo.conf</span></p><p class="P500"/><p class="P500"/><p class="P504">Fig2: A soft link to a file</p><p class="P504"/><table><caption>Table131</caption><tr><td>
       
      
       
      
       
       I D
       
       lilo.conf
       
       Ililo.sym</td></tr></table><p class="P504"/><p class="P500"/><p class="P500">Soft links can be created across filesystems.</p><p class="P500"/><p class="P500"/><p class="P500"/><p class="P500"/><p class="P500"/><p class="P499">Hard Links</p><p class="P499"/><p class="P500">A hard link is an additional name for the same inode and as such the reference count of the file increases by one for every new hard link.</p><p class="P500"/><p class="P525"><span class="T28"><img alt="Graphic46" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T43">ln lilo.conf lilo.link</span></p><p class="P526"/><p class="P500"/><p class="P500"/><p class="P501"><span class="T23">In the listing notice that the reference count is </span><span class="T30">2</span><span class="T23"> and that both files have the same size. In fact they are identical.</span></p><p class="P500"/><p class="P500"/><p class="P501"><span class="T43">-rw------- </span><span class="T144">2</span><span class="T43"> root root 223 Nov 9 09:06 lilo.conf</span></p><p class="P501"><span class="T43">-rw------- </span><span class="T144">2</span><span class="T43"> root root 223 Nov 9 09:06 lilo.link</span></p><p class="P500"/><p class="P500"/><p class="P500">Hard links can only be created within the same filesystem.</p><p class="P500"/><p class="P500"/></section><section class="7. Touching and dd-ing"><title>7. Touching and dd-ing</title><p class="P499"/><p class="P499"/><p class="P499">touch</p><p class="P500"/><p class="P500">Another way of creating or modifying a file is to use <span class="T55">touch</span>. </p><p class="P500"/><p class="P501"><span class="T23">Syntax: touch {options} </span><span class="T81">file(s)</span></p><p class="P500"/><p class="P501"><span class="T23">If </span><span class="T81">file</span><span class="T23"> doesn't exist it is created. You can also change the access time of a file using the </span><span class="T30">-a</span><span class="T23"> option, </span><span class="T30">-m </span><span class="T23">changes the modification time and </span><span class="T30">-r</span><span class="T23"> is used to apply the time attributes of another file.</span></p><p class="P500"/><p class="P500"/><p class="P500">Example:</p><p class="P501"><span class="T23"/><span class="T43">touch file1.txt file2.txt</span><span class="T23">creates new files</span></p><p class="P507"><span class="T23"/><span class="T43">touch myfile -r /etc/lilo.conf</span><span class="T23">myfile gets the time attributes of lilo.conf</span></p><p class="P499"/><p class="P499"/><p class="P499"/><p class="P501"><span class="T82">&#61510;</span><span class="T23"> To create a file called </span><span class="T145">&#8211;errors</span><span class="T23"> use the </span><span class="T144">&#8211;</span><span class="T45"> option:</span></p><p class="P501"><span class="T45"/><span class="T43">touch -- -errors</span></p><p class="P527"/><p class="P527"/><p class="P499">dd</p><p class="P500"/><p class="P500">This command copies a file with a changeable I/O block size. It can also be used to perform conversions (similar to <span class="T55">tr</span>). Main options are <span class="T55">if=</span> (input file) <span class="T55">of= </span>(output file) <span class="T55">conv=</span> (conversion)</p><p class="P500">The conversion switch can be: lcase ucase ascii</p><p class="P500"/><p class="P500">Example:</p><p class="P501"><span class="T23"/><span class="T43">dd if=/mnt/cdrom/images/boot.img of=/dev/fd0 </span></p><p class="P528"/><p class="P529"/><p class="P529">Notice that unlike <span class="T7">cp</span><span class="T8"> the </span><span class="T7">dd</span><span class="T8"> tool will copy portions of a device and preserve the underlying filesystem. On the other hand </span><span class="T7">cp</span><span class="T8"> only deals with the data and will transfer it from one filesystem to another:</span></p><p class="P530"/><table><caption>Table204</caption><tr><td>SOURCE  TARGET</td></tr><tr><td>
       
      
       
      
       
      
       
      
       
      
       
      
       
       </td></tr><tr><td/></tr><tr><td>cp:</td></tr><tr><td/></tr><tr><td/></tr><tr><td/></tr><tr><td/></tr><tr><td>dd: input file = deviceoutput file = device</td></tr><tr><td/></tr><tr><td>
       
      
       
      
       
      </td></tr><tr><td/></tr><tr><td>
       
      
       
      </td></tr><tr><td/></tr><tr><td>
       
      </td></tr><tr><td/></tr><tr><td>dd: input file = fileoutput file = device</td></tr><tr><td/></tr><tr><td>
       
      
       
      
       
      
       
      </td></tr><tr><td/></tr><tr><td>
       
      
       
      </td></tr><tr><td/></tr><tr><td>
       
      </td></tr><tr><td/></tr><tr><td>dd: input file = deviceoutput file = file</td></tr><tr><td/></tr><tr><td>
       
      
       
      
       
      </td></tr><tr><td/></tr><tr><td>
       
      
       
      </td></tr><tr><td/></tr><tr><td>
       
      </td></tr><tr><td/></tr><tr><td>
       
      </td></tr><tr><td>Filesystem A</td></tr><tr><td/></tr><tr><td>
       
      </td></tr><tr><td>Filesystem B</td></tr><tr><td/></tr></table><p class="P531"/><p class="P532"/></section><section class="8. Exercises and Summary"><title>8. Exercises and Summary</title><p class="P515"/><p class="P515"/><p class="P501"><span class="T31">Review</span><span class="T31">Questions</span> (answers p.150)</p><p class="P512"/><p class="P533">Yes or No</p><p class="P501"/><p class="P501"><span class="T40">1. The </span><span class="T31">cd &#8211;</span><span class="T40"> command </span><span class="T23">will take you back to a previous directory?</span>_____</p><p class="P512"/><p class="P512"/><p class="P512">2. Typing <span class="T7">cd ~</span> (in the bash shell) is the shortest command that will take </p><p class="P512">you to your home directory ?_____</p><p class="P512"/><p class="P512"/><p class="P512">3. One can make two new directories /dir1/dir2 using <span class="T7">mkdir</span> without any options_____</p><p class="P512"/><p class="P512"/><p class="P512">4. The command <span class="T7">updatedb</span> will update the <span class="T7">locate</span> database _____</p><p class="P512"/><p class="P512"/><p class="P512">5. The syntax to create a symbolic link called FILE-LINK pointing to the file FILE is</p><p class="P501"><span class="T40"/><span class="T148">ln -s FILE-LINKFILE</span>_____</p><p class="P512"/><p class="P512">6. The commands <span class="T7">cd /etc</span> and <span class="T7">cd ./etc</span> are always equivalent_____</p><p class="P512"/><p class="P512"/><p class="P515">Files</p><p class="P512"/><table><caption>Table202</caption><tr><td>File</td><td>Description</td></tr><tr><td>/etc/updatedb.conf</td><td>configuration file for the updatedb tool</td></tr><tr><td>/var/lib/slocate/slocate.db</td><td>the locate (or slocate 'secure locate') database</td></tr></table><p class="Standard"/><p class="Standard"/><p class="P95">Commands</p><p class="P83"/><table><caption>Table203</caption><tr><td>Command</td><td>Description (apropos)</td></tr><tr><td>cd</td><td>change current directory &#8211; see help cd</td></tr><tr><td>cp</td><td>cp(1) &#8211; copy files and directories </td></tr><tr><td>dd</td><td>copy and convert files. Often used to copy the content of a disk device to another device or file </td></tr><tr><td>find</td><td>find(1) &#8211; search for files in a directory hierarchy</td></tr><tr><td>ln</td><td>ln(1) &#8211; make links between files</td></tr><tr><td>locate</td><td>command used to search files and directories in the locate database </td></tr><tr><td>ls</td><td>ls(1) &#8211; list directory contents</td></tr><tr><td>mkdir</td><td>mkdir(1) &#8211; make directories</td></tr><tr><td>mv</td><td>mv(1) &#8211; move (rename) files</td></tr><tr><td>pwd</td><td>pwd(1) &#8211; print name of current/working directory</td></tr><tr><td>rm</td><td>rm(1) &#8211; remove files or directories</td></tr><tr><td>touch</td><td>create new empty file or change file timestamps</td></tr><tr><td>updatedb</td><td>command used to update the locate database</td></tr><tr><td>whereis</td><td>whereis(1) &#8211; locate the binary, source, and manual page files for a command</td></tr><tr><td>which</td><td>which(1) &#8211; shows the full path of (shell) commands</td></tr></table><p class="P499"/><p class="P499"/><p class="P515">Exercises</p><p class="P499"/><p class="P534">File Navigation</p><p class="P500"/><p class="P501"><span class="T23">1. Make a new directory in </span><span class="T31">/tmp</span><span class="T23"> called </span><span class="T31">/etc</span><span class="T23">.</span></p><p class="P500"/><p class="P501"><span class="T23"/><span class="T73">mkdir /tmp/</span>etc</p><p class="P500"/><p class="P501"><span class="T23">2. In </span><span class="T31">/tmp/etc/</span><span class="T23"> create a file called </span><span class="T74">newfile </span><span class="T23">(use touch, cat or vi).</span></p><p class="P500"/><p class="P500">3. Go to the root directory (cd /). </p><p class="P500"/><p class="P501"><span class="T23">4. Test which of the following commands will show the content of </span><span class="T74">newfile</span><span class="T23"> ?</span></p><p class="P501"><span class="T13">cat etc/newfile</span></p><p class="P535">cat /etc/newfile</p><p class="P535">cat tmp/etc/newfile</p><p class="P535">cat /tmp/etc/newfile</p><p class="P500"/><p class="P534"/><p class="P500"/><p class="P501"><span class="T45">5. Remove the </span><span class="T44">/tmp/etc </span><span class="T45">directory with </span><span class="T44">rmdir</span><span class="T46">. Do step 1</span><span class="T45"> again then remove </span><span class="T44">/tmp/etc </span><span class="T45">with </span><span class="T44">rm</span></p><p class="P500"/><p class="P534">Making space on the filesystem</p><p class="P500"/><p class="P501"><span class="T23">In order to create more space on the device containing the directory </span><span class="T31">/usr/share/doc </span><span class="T23">we need to find a spare device with enough space and copy the contents of </span><span class="T31">/usr/share/doc</span><span class="T40"> to that device. Then we create space by deleting the </span><span class="T31">/usr/share/doc </span><span class="T40">directory and creating a symbolic link from </span><span class="T31">/usr/share/doc</span><span class="T40"> to the new location.</span></p><p class="P500"/><p class="P501"><span class="T23">6. Make a directory called </span><span class="T31">/spare</span><span class="T40"> on which we will mount a spare devices (one of the partitions created in the previous exercises should be suitable)</span></p><p class="P501"/><p class="P501"><span class="T27">mkdir /spare</span></p><p class="P501"><span class="T27">mount &lt;</span><span class="T149">device</span><span class="T27">&gt; /spare</span></p><p class="P536"/><p class="P536">7. Test with <span class="T7">df -h /spare</span><span class="T8"> and </span><span class="T7">du -hs /usr/share/doc</span><span class="T8"> that the device is large enough to contain all of the existing data.</span></p><p class="P501"><span class="T23"/></p><p class="P501"><span class="T23">8. Next, copy the contents of </span><span class="T30">/usr/share/doc</span><span class="T23"> to </span><span class="T30">/spare/</span></p><p class="P512"/><p class="P512"><span class="T13">cp -a /usr/share/doc /spare</span></p><p class="P537"/><p class="P501"><span class="T23">9. Make sure the data has all been copied across then edit</span><span class="T31"> /etc/fstab</span><span class="T23"> to make that device available at boot time</span>.</p><p class="P500"/><p class="P500">10. Delete <span class="T55">/usr/share/doc</span> and create a symbolic link pointing from <span class="T55">/usr/share/doc </span>to <span class="T55">/spare/doc</span></p><p class="P500"/><p class="P538">ln -s /spare/doc /usr/share/doc</p><p class="P500"/><p class="P501"><span class="T23">11. (optional) Do the same with </span><span class="T30">/home</span><span class="T23">. Any extra problems?</span></p><p class="P500"/><p class="P500"/><p class="P534">Finding Files on the System</p><p class="P500"/><p class="P501"><span class="T23">12. Copy the file </span><span class="T74">/etc/lilo.conf</span><span class="T23"> to </span><span class="T74">/etc/lilo.conf.bak</span></p><p class="P501"><span class="T74"/><span class="T23">(i) Use </span><span class="T31">find</span><span class="T23"> to find this new file</span></p><p class="P500">(ii) Use <span class="T7">locate</span> to find <span class="T16">/etc/lilo.conf.bak.</span> </p><p class="P539">(iii) Update the locate database and retry (ii)</p><p class="P534"/><p class="P534"/><p class="P534"/><p class="P534">Backup strategy (first step)</p><p class="P500"/><p class="P500">Find all files in your home directory that have been modified in the past 24 hours. </p><p class="P500"/><p class="P501"><span class="T89">find /home &#8211;mtime &#8211;1 |tee list1 |wc &#8211;-lines </span><span class="T23">(-1 means less than one day)</span></p><p class="P500"/><p class="Standard"><span class="T23">We will introduce archiving tools in LPI 102, but the output of the find command can be piped directly into </span><span class="T30">cpio</span><span class="T23">. </span></p><p class="P540"/></section></section><section class="Process Management"><title>Process Management</title><p class="P91"/><p class="P91"/><p class="P91"/><p class="P217">Prerequisites</p><p class="P218"/><p class="P218">The Command Line (p.56)</p><p class="P218"/><p class="P217">Goals</p><p class="P218"/><p class="P218">Find the process ID (or PID) of a running process using different tools</p><p class="P218">Use <span class="T7">kill</span><span class="T8"> and </span><span class="T7">killall </span><span class="T8">effectively with the appropriate signal</span> </p><p class="P218">Manage jobs from the command line in the foreground or the background</p><p class="P218"/><p class="P302">Contents</p><p class="P72"/><p class="P303"/><p class="P91"/><p class="P405"/><section class="1. Viewing running processes"><title>1. Viewing running processes</title><p class="P348"/><p class="Standard"><span class="T23">Processes have a unique Process ID the </span><span class="T30">PID</span><span class="T23">. This number can be used to modify a process' priority or to stop it.</span></p><p class="P91"/><p class="Standard"><span class="T23">A process is any </span><span class="T81">running</span><span class="T23"> executable. If process_2 has been spawned by process_1, it is called a </span><span class="T81">child</span><span class="T23"> process. The spawning process_1 is called the </span><span class="T81">parent</span><span class="T23"> process.</span></p><p class="P91"/><p class="P198">The process family tree</p><p class="P91"/><p class="Standard"><span class="T23">The </span><span class="T30">pstree</span><span class="T30"> </span><span class="T23">command gives a good illustration of </span><span class="T81">parent </span><span class="T23">and </span><span class="T81">child</span><span class="T23"> process hierarchy.</span></p><p class="P91"/><p class="P163">Figure 1: Part of the pstree output</p><table><caption>Table44</caption><tr><th>bash(1046)---xinit(1085)-+-X(1086)`-xfwm(1094)-+-xfce(1100)---xterm(1111)---bash(1113)-+-pstree(1180)| |-soffice.bin(1139)---soffice.bin(1152)-+-soffice.bin(1153)| | |-soffice.bin(1154)| | |-soffice.bin(1155)| | |-soffice.bin(1156)| | `-soffice.bin(1157)| `-xclock(1138)|-xfgnome(1109)|-xfpager(1108)|-xfsound(1107)`-xscreensaver(1098)</th></tr></table><p class="P47"/><p class="P47"/><p class="Standard"><span class="T23">In the above figure all the process' PIDs are shown; these are clearly incremental. The most common used options are </span><span class="T30">-p</span><span class="T23"> to display PIDs and </span><span class="T30">-h</span><span class="T23"> to highlight a users processes only.</span></p><p class="P91"/><p class="P91"/><p class="P91"/><p class="P198">Finding running processes</p><p class="P91"/><p class="Standard"><span class="T23">A more direct way to determine which processes are running is to use </span><span class="T30">ps</span><span class="T23">. Most users have a set combination of options which work for most situations. </span></p><p class="P91"/><p class="P91"/><p class="P91">Here are three such options:</p><p class="P91"/><p class="Standard"><span class="T30">ps</span><span class="T23"> </span><span class="T30">ux</span><span class="T23"> all processes run by the user</span></p><p class="Standard"><span class="T30">ps T</span><span class="T23">processes run under the current terminal by the user</span></p><p class="Standard"><span class="T30">ps aux</span><span class="T23">all processes on the system</span></p><p class="P91"/><p class="P91"/><p class="P91"/><p class="P91"/><p class="P91"/><p class="P91">It is recommended you read the <span class="T55">ps manpage</span> and choose your own best options!</p><p class="P91"/><p class="P91"/><table><caption>Table45</caption><tr><th>ps accommodates UNIX-style and BSD-style arguments</th></tr><tr><td>usage: ps -[Unix98 options]ps [BSD-style options]ps --[GNU-style long options]ps &#8211;help for a command summary</td></tr></table><p class="P91"/><p class="P163"/><table><caption>Table46</caption><tr><th>Summary of options</th></tr><tr><td>-a show all processes for the current user linked to a tty (except the session leader)-e or -A show all processes -f gives the PPID (Parent Process ID) and the STIME (Start Time)-l is similar to -f and displays a long lista show all processes linked to a tty, including other users x show all processes without a controlling tty as well</td></tr></table><p class="P91"/><p class="P91"/><p class="P198">Continuously updating process information</p><p class="P91"/><p class="Standard"><span class="T23">The </span><span class="T30">top</span><span class="T23"> utility will update information on processes at an adjustable rate.</span></p><p class="P91"/><p class="Standard"><span class="T23">While </span><span class="T30">top</span><span class="T23"> is running you can type </span><span class="T30">h</span><span class="T23"> for a list of commands. The space bar will update information instantly. </span></p><p class="P91"/><p class="Standard"><span class="T23">You can also use </span><span class="T30">top</span><span class="T23"> to change a process' priority as we shall see in the next section.</span></p><p class="P91"/><p class="P91"/></section><section class="2. Modifying Processes"><title>2. Modifying Processes</title><p class="P348"/><p class="P198">Stopping processes</p><p class="P91"/><p class="Standard"><span class="T23">The </span><span class="T30">kill</span><span class="T23"> command can be used to send </span><span class="T81">signals </span><span class="T76">to processes</span><span class="T23">. There are 63 signals available. The default signal terminates a process and is called SIGTERM with value 15.</span></p><p class="P91"/><p class="P98">kill</p><p class="Standard"><span class="T81">Syntax</span><span class="T23"> </span></p><table><caption>Table47</caption><tr><th>kill SIGNAL process_PID</th></tr></table><p class="P91"/><p class="P91">Every process can choose whether or not to catch a signal except for the SIGKILL which is dealt with by the kernel. Most daemons redifine the SIGHUP to mean &#8220;re-read configuration file&#8221;. </p><p class="P91"/><table><caption>Table48</caption><tr><th>Most Common Signals</th></tr><tr><td>
       
       1 or SIGHUP hangup or disconnect the process2 or SIGINT same as Ctrl+C interrupt3 or SIGQUIT quit9 or SIGKILL kill the process through a kernel call 15 or SIGTERM terminate a process 'nicely'. This is the DEFAULT signal. </td></tr></table><p class="P91"/><p class="P91"/><p class="Standard"><span class="T23">One can also stop processes without knowing the process' PID using </span><span class="T30">killall</span><span class="T23">.</span></p><p class="P98"/><p class="P98"/><p class="P98"/><p class="P98"/><p class="P98"/><p class="P98">killall</p><p class="P163"/><p class="P163">Syntax</p><table><caption>Table49</caption><tr><th>killall SIGNAL process_NAME</th></tr></table><p class="P547"/><p class="P547"/><p class="P547">Fig1: Interprocess signaling</p><p class="P547"/><p class="P548"><img alt="Graphic47" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000201000002D20000021C7E4C3FEB.png"/></p><p class="P296"/><p class="P549"/><p class="P549"/><p class="P549">Process priority and nice numbers</p><p class="P550"/><p class="P550"><span class="T8">Nice numbers (</span><span class="T12">NI</span><span class="T8">) alter the CPU priority and are used to balance the CPU load in a multiuser environment. Each process is started with a default nice number of </span><span class="T7">0</span><span class="T8">. N</span>ice numbers range from <span class="T7">19</span> [lowest] to <span class="T7">-20</span> [highest]. </p><p class="P550"/><p class="P550">Only root can decrease the nice number of a process. Since all processes start with a default nice number of zero as a consequence negative nice numbers can only be set by root!</p><p class="P551"/><p class="P551"/><p class="P551"/><table><caption>Table107</caption><tr><th>nice numbers and CPU priorities</th></tr><tr><td>
       
      
       
      
       
       19 NI PRI
       
      
       
      
       
       users
       
       0 (default)
       
       root -20 Pool of processes 0</td></tr></table><p class="P551"/><p class="P550"/><p class="P553"><span class="T23">To modify a process' priority that is already running use </span><span class="T30">renice</span><span class="T23">. To set a process' priority use </span><span class="T30">nice</span><span class="T23">.</span></p><p class="P551"/><p class="P551">Syntax</p><table><caption>Table50</caption><tr><th>nice &#8211;&lt;NI&gt; &lt;process&gt;renice &lt;+/-NI&gt; -p &lt;PID&gt;</th></tr></table><p class="P555"/><p class="P553"><span class="T23">Notice that </span><span class="T30">renice</span><span class="T23"> works with PIDs and handles lists of processes at a time. A useful option to </span><span class="T30">renice</span><span class="T23"> is the </span><span class="T30">-u</span><span class="T23"> option which affects all processes run by a user.</span></p><p class="P550"/><p class="P541">Set nice number 1 for processes 234 and 765:</p><p class="P556"><span class="T28"><img alt="Graphic48" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T48"/><span class="T43">renice +1 -p 234 765</span><span class="T45"> </span></p><p class="P557"/><p class="P558"/><p class="P559"/><p class="P559"/><p class="P553"><span class="T45">Set nice number -5 for </span><span class="T86">xclock</span><span class="T45">:</span><span class="T28"/></p><p class="P560"><span class="T28"><img alt="Graphic49" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"/><span class="T43">nice --5 xclock</span><span class="T45"> </span></p><p class="P561"/><p class="P47"/><p class="P47"/></section><section class="3. Processes and the shell"><title>3. Processes and the shell</title><p class="P550"/><p class="P550"/><p class="P549">background and forground processes</p><p class="P550"/><p class="P553"><span class="T23">After you have started a process from the shell you automatically leave the shell interpreter. You will notice that no commands will respond. The reason for this is that it is possible to run programs in the </span><span class="T81">foreground </span><span class="T30">fg</span><span class="T23"> or in the </span><span class="T81">background</span><span class="T23"> </span><span class="T30">bg</span><span class="T23"> of a shell. </span></p><p class="P550"/><p class="P553"><span class="T23">When a program is running in the foreground it is possible to recover the shell prompt but only by interrupting the program for while. The interruption signal is </span><span class="T30">Ctrl Z</span><span class="T23">.</span></p><p class="P550"/><p class="P550"/><p class="P549">Stopping and starting jobs</p><p class="P550"/><p class="P553"><span class="T23">A process started from a shell is also called a </span><span class="T81">job. </span><span class="T23">Once the job receives the </span><span class="T30">^Z</span><span class="T23"> signal it is stopped and the shell prompt is recovered. To restart the program in the background simple type: </span><span class="T30">bg</span><span class="T23">.</span></p><p class="P550"/><p class="P550">Example</p><p class="P550"/><table><caption>Table51</caption><tr><th>[mike localhost /bin]$xclockxclock running in forground, shell prompt lost[1]+ Stopped xclock xclock received ^Z signal[mike localhost /bin]$bg shell prompt recovered, issue the bg command[1]+ xclock &amp; xclock is running in the background[mike localhost /bin]$</th></tr></table><p class="P91"/><p class="Standard"><span class="T23">Notice the [1]+ symbol above. The integer is the process' </span><span class="T81">job number,</span><span class="T23"> which it can be referred to as. </span></p><p class="P91">The '+' sign indicates the last modified process. A '-' sign would indicate the second last modified process.</p><p class="P91"/><p class="P91"/><p class="P91">One can start a process in the background by appending a <span class="T7">&amp;</span><span class="T8"> to the command.</span></p><p class="P91"/><p class="P143"/><table><caption>Table253</caption><tr><td>xclock&amp;[1] 6213</td></tr></table><p class="P91"/><p class="P91"/><p class="P91"/><p class="P549">Listing jobs</p><p class="P550"/><p class="P553"><span class="T23">The </span><span class="T30">jobs</span><span class="T23"> utility lists all running processes started from the current shell. The </span><span class="T81">job number</span><span class="T23">, the job's state (running/stopped), as well as the two last modified processes, will be listed.</span></p><p class="P551"/><p class="P551"/><table><caption>Table52</caption><tr><th>Output for jobs</th></tr><tr><td>[1]- Stopped xclock[2] Running xman &amp;[3]+ Stopped xload</td></tr></table><p class="P553"/><p class="P549"/><p class="P549">The job number</p><p class="P550"/><p class="P550"/><p class="P553"><span class="T23">One can conveniently stop and start a selection of jobs using the </span><span class="T81">job number</span><span class="T23">. This is achieved with the </span><span class="T30">fg</span><span class="T23"> command.</span></p><p class="P551"/><p class="P550"><span class="T75">Calling job 2 to the foreground and killing job 1 </span></p><table><caption>Table53</caption><tr><th>fg 2 orfg %2 orfg %?xma</th><th>kill &#8211;9 %1 </th></tr></table><p class="Standard"/><p class="P296"/><p class="P296"/><p class="P296"/><p class="P565">Avoiding HUP with nohup</p><p class="P143"/><p class="Standard"><span class="T45">Finally there is a program called </span><span class="T86">nohup</span><span class="T45"> which acts as a parent process independently from the user&#8217;s session. When a user logs off, the system sends a HUP to all processes owned by that process group. For example, to avoid this HUP signal a script called </span><span class="T86">bigbang</span><span class="T45"> which attempts to calculate the age of the Universe should be started like this:</span></p><p class="P143"/><table><caption>Table54</caption><tr><td>nohup bigbang &amp;</td></tr></table><p class="Standard"/><p class="P566"/></section><section class="4. Exercises and Summary"><title>4. Exercises and Summary</title><p class="P567"/><p class="Standard"><span class="T125">Review </span><span class="T125">Questions</span> (answers p.150)</p><p class="P568"/><p class="P569">Yes or No</p><p class="P567"/><p class="Standard"><span class="T130">1. Running </span><span class="T125">kill</span> against a process will always attempt to kill the given process_____</p><p class="P568"/><p class="P568">2. The commands '<span class="T13">kill $(pidof xeyes </span>' and '<span class="T13">killall xeyes</span> ' are equivalent_____</p><p class="P568"/><p class="P568">3. A program started with a pending '&amp;' will run in the background_____</p><p class="P568"/><p class="P568">4. A process's nice number is the same as its CPU priority_____</p><p class="P567"/><p class="P567"/><p class="P570">Glossary</p><p class="P571"/><table><caption>Table200</caption><tr><td>Term</td><td>Description</td></tr><tr><td>background process</td><td>a process started on the shell with $command &amp; Unlike a foreground process the shell doesn't need to wait for the process to terminate before running another command</td></tr><tr><td>foreground process</td><td>a process started on the shell with $command Once the process is started the shell has to wait for it to terminate before it can run another command </td></tr><tr><td>orphaned process</td><td>a process whose parent process has terminated. An orphaned process is then 'adopted' by init</td></tr><tr><td>PID</td><td>a number associated with a process</td></tr><tr><td>zombie process</td><td>a process that has exited but is still considered by the parent process as present until the next wait() system call. The wait() system call performed by the parent process should refresh the status of the child process as terminated if the process has exited. A zombie process usually doesn't last for long. However due to bugs some zombie processes can last longer taking up system resources even though the process itself has physically exited! </td></tr></table><p class="P567"/><p class="P567"/><p class="P570">Commands</p><p class="P573"/><table><caption>Table201</caption><tr><td>Command</td><td>Description (apropos)</td></tr><tr><td>bg</td><td>resume a suspended job in the background</td></tr><tr><td>Ctrl+Z</td><td>keyboard combination used to suspend the current foreground process</td></tr><tr><td>fg</td><td>send a job in the foreground (making it the current process)</td></tr><tr><td>jobs</td><td>list of processes started from the current shell</td></tr><tr><td>kill</td><td>send a specified signal to a process using PIDs </td></tr><tr><td>killall</td><td>send a specified signal to a process using process names</td></tr><tr><td>nice</td><td>starts a process with a modified scheduling priority</td></tr><tr><td>nohup</td><td>nohup(1) &#8211; run a command immune to hangups, with output to a non-tty</td></tr><tr><td>ps</td><td>ps(1) &#8211; gives a snapshot of the current processes. If you want a repetitive update of this status, use top</td></tr><tr><td>pstree</td><td>prints current processes in a hierarchical tree rooted (by default) at init </td></tr><tr><td>renice</td><td>modified scheduling priority of a running process</td></tr><tr><td>top</td><td>top(1) &#8211; display top CPU processes</td></tr></table><p class="P567"/><p class="P567"/><p class="P567"/><p class="P567"/><p class="P570">Exercises</p><p class="P567"/><p class="Standard"><span class="T35">1.</span><span class="T33"> Check the current nice value of your running x-terminal. Change this value using </span><span class="T35">top</span><span class="T33"> or </span><span class="T35">renice</span><span class="T33">.</span></p><p class="P78"/><p class="Standard"><span class="T35">2.</span><span class="T33"> What is the equivalent signal of a </span><span class="T35">^Z</span><span class="T33"> sent to a process? (List all signals with </span><span class="T35">kill &#8211;l</span><span class="T33">)</span></p><p class="P325"/><p class="Standard"><span class="T35">3.</span><span class="T33"> Which signal is redefined for most daemons and forces the configuration file to be reread? </span></p><p class="P325"/><p class="Standard"><span class="T35">4.</span><span class="T33"> What is the default signal sent to a process, using </span><span class="T35">kill</span><span class="T33"> or </span><span class="T35">killall</span><span class="T33">?</span></p><p class="P78"/><p class="Standard"><span class="T35">5. </span><span class="T33">Which signal is directly handled by the kernel and cannot be redefined?</span></p><p class="P78"/><p class="Standard"><span class="T34">6.</span><span class="T33"> Make sure you log into a virtual terminal (tty1 to tty6) before doing this. We want to run a script that will continue to run once we logout using the </span><span class="T35">nohup </span><span class="T100">parent process. </span></p><p class="P79"/><p class="Standard"><span class="T100">In the </span><span class="T35">/tmp</span><span class="T100"> directory create a file called </span><span class="T151">print-out</span><span class="T100"> with the following content:</span></p><p class="P79"/><p class="P574"/><p class="P574"> count=0</p><p class="P574"> while (true) do</p><p class="P574"> echo this is iteration number $count</p><p class="P574"> let count+=1</p><p class="P574">done </p><p class="P78"/><p class="P78">We first do the following (without using <span class="T7">nohup</span><span class="T8">)</span> :</p><p class="P78"/><table><caption>Table126</caption><tr><td>cd /tmp</td></tr><tr><td>./print-out &amp;</td></tr><tr><td>exit</td></tr></table><p class="P78"/><p class="P78">You may not see the command line when typing <span class="T7">exit</span><span class="T8"> but this should log you out. When you log back in check that </span><span class="T42">print-out</span><span class="T19"> is no longer running</span></p><p class="P571"/><table><caption>Table128</caption><tr><td>ps ux | grep print-out</td></tr></table><p class="P571"/><p class="P571">Next start the command with </p><p class="P571"/><table><caption>Table129</caption><tr><td>nohup /tmp/print-out &amp;exit</td></tr></table><p class="P571"/><p class="P571">Log back in and test these commands</p><table><caption>Table127</caption><tr><td>ps ux |grep print-outtail -f ~/nohup.outCtrl+Ckillall print-outps ux|grep print-outtail -f ~/nohup.out</td></tr></table></section></section><section class="Text Processing"><title>Text Processing</title><p class="P577"/><p class="P577"/><p class="P577"/><p class="P577"/><p class="P217">Prerequisites</p><p class="P218"/><p class="P72"><span class="T26">The Command Line (p.</span><span class="T26">56</span><span class="T26">)</span></p><p class="P218"/><p class="P217">Goals</p><p class="P218"/><p class="P218">Effectively manipulate files and data streams to alter the content as required ( e.g sort or format) </p><p class="P218">Improve command line skills by memorising and understanding simple text tools</p><p class="P218"/><p class="P218"/><p class="P218"/><p class="P302">Contents</p><p class="P72"/><p class="P578"/><p class="P578"/><p class="P579"/><section class="1. cat the Swiss Army Knife"><title>1. cat the Swiss Army Knife</title><p class="P348"/><p class="P348"/><ol><li><p class="P580">cat the editor</p></li></ol><p class="P91"/><p class="Standard"><span class="T23">The </span><span class="T30">cat</span><span class="T23"> utility can be used as a rudimentary text editor.</span></p><p class="P91"/><p class="P91"/><table><caption>Table55</caption><tr><td> cat &gt; short-messagewe are curious to meetpenguins in PragueCrtl+D</td></tr></table><p class="P47"/><p class="P47"/><p class="P162">Notice the use of Ctrl+D. This command is used for ending interactive input.</p><p class="P162"/><p class="P162"/><ol><li><p class="P583">cat the reader</p></li></ol><p class="P162"/><p class="P170"><span class="T23">More commonly </span><span class="T30">cat</span><span class="T23"> is used only to flush text to </span><span class="T81">stdout</span><span class="T23">. Most common options are </span></p><p class="P349"/><p class="P349"/><p class="P170"><span class="T30">-n </span><span class="T23">number each line of output</span></p><p class="P170"><span class="T30">-b</span><span class="T23"> number only non-blank output lines</span></p><p class="P170"><span class="T30">-A</span><span class="T23"> show carriage return</span></p><p class="P162"/><p class="P162"/><p class="P162">Example</p><p class="P162"/><p class="P584"><span class="T28"><img alt="Graphic52" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T28"> </span><span class="T43">cat /etc/resolv.conf</span></p><p class="P584"><span class="T43"/><span class="T45">&#9658;</span><span class="T43">search mydomain.org</span></p><p class="P585">nameserver 127.0.0.1</p><p class="P91"/><p class="P91"/><p class="P91"/><ol><li><p class="P586">tac reads back-to-front</p></li></ol><p class="P162"/><p class="P170"><span class="T23">This command is the same as </span><span class="T30">cat</span><span class="T23"> except that the text is read from the last line to the first.</span></p><p class="P91"/><table><caption>Table140</caption><tr><td> tac short-message&#9658; penguins in Pragueto meetwe are curious </td></tr></table><p class="P587"/><p class="P587"/><p class="P587"/><p class="P587"/><p class="P587"/><p class="P587"/><p class="P587"/></section><section class="2. Simple tools"><title>2. Simple tools</title><p class="P349"/><ol><li><p class="P588">using head or tail</p></li></ol><p class="P349"/><p class="P170"><span class="T23">The utilities </span><span class="T30">head</span><span class="T30"> </span><span class="T23">and </span><span class="T30">tail</span><span class="T23"> are often used to analyse logfiles. By default they output 10 lines of text. Here are the main usages.</span></p><p class="P162"/><p class="P162"/><p class="P170"><span class="T23">List 20 first lines of </span><span class="T30">/var/log/messages</span><span class="T23">:</span></p><p class="P162"/><table><caption>Table56</caption><tr><td> head -n 20 /var/log/messages head -20 /var/log/messages</td></tr></table><p class="P591"/><p class="P162"/><p class="P162">List 20 last lines of <span class="T55">/etc/aliases</span>:</p><p class="P162"/><table><caption>Table57</caption><tr><td>tail -20 /etc/aliases</td></tr></table><p class="P296"/><p class="P170"><span class="T23">The </span><span class="T30">tail</span><span class="T23"> utility has an added option that allows one to list the end of a text starting at a given line.</span></p><p class="P162"/><p class="P162"/><p class="P162">List text starting at line 25 in <span class="T55">/var/log/messages</span>:</p><p class="P162"/><table><caption>Table58</caption><tr><td>tail +25 /etc/log/messages</td></tr></table><p class="P420"/><p class="P420"/><p class="P170"><span class="T29">Exercise</span><span class="T23">: If a text has 90 lines, how would you use </span><span class="T30">tail</span><span class="T23"> and </span><span class="T30">head</span><span class="T23"> to list lines 50 to 65? Is there only one way to do this ?</span></p><p class="P162"/><p class="P170"><span class="T23">Finally </span><span class="T30">tail</span><span class="T23"> can continuously read a file using the </span><span class="T30">-f</span><span class="T23"> option. This is most useful when you are expecting a file to be modified in real time.</span></p><p class="P162"/><p class="P162"/><ol><li><p class="P592">counting lines, words and bytes</p></li></ol><p class="P162"/><p class="P170"><span class="T23">The </span><span class="T30">wc</span><span class="T23"> utility counts the number of </span><span class="T81">bytes</span><span class="T23">, </span><span class="T81">words</span><span class="T23">, and </span><span class="T81">lines</span><span class="T23"> in files. Several options allow you to control </span><span class="T30">wc</span><span class="T23">'s output. </span></p><p class="P162"/><p class="P170"><span class="T23">Options for </span><span class="T30">wc</span></p><table><caption>Table59</caption><tr><td>-l</td><td>count number of lines</td></tr><tr><td>-w</td><td>count number of words</td></tr><tr><td>-c or -m</td><td>count number of bytes or characters</td></tr></table><p class="Standard"/><p class="P170"><span class="T29">Remarks</span><span class="T23">:</span></p><p class="P170"><span class="T23">With no argument </span><span class="T30">wc</span><span class="T23"> will count what is typed in </span><span class="T81">stdin</span><span class="T23">.</span></p><p class="P162"/><p class="P593"/><p class="P593"/><p class="P593"/><p class="P593"/><p class="P593"/><ol><li><p class="P594">numbering lines</p></li></ol><p class="P162"/><p class="P170"><span class="T23">The </span><span class="T30">nl</span><span class="T23"> </span><span class="T23">utility has the same output as </span><span class="T30">cat -b</span><span class="T23">. </span></p><p class="P162"/><p class="P162">Number all lines including blanks</p><p class="P162"/><p class="P595"><span class="T120"><img alt="Graphic56" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">nl -ba /etc/lilo.conf</span></p><p class="P596"/><p class="P91"/><p class="P91"/><p class="P91"/><p class="P91">Number only lines with text</p><p class="P91"/><p class="P597"><span class="T120"><img alt="Graphic57" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">nl -bt /etc/lilo.conf</span></p><p class="P598"/><p class="P598"/><p class="P598"/><ol><li><p class="P599">replacing tabs with spaces</p></li></ol><p class="P113"/><p class="Standard"><span class="T48">The </span><span class="T49">expand</span><span class="T48"> </span><span class="T48">command is used to replace TABs with spaces. One can also use </span><span class="T49">unexpand</span><span class="T48"> for the reverse operations.</span></p><p class="P113"/><p class="P113"/><p class="P113"/><ol><li><p class="P600">viewing binary files</p></li></ol><p class="P601"/><p class="Standard"><span class="T152">There are a number of tools available for this. The most common ones are </span><span class="T153">od</span><span class="T152"> (octal dump) and </span><span class="T153">hexdump</span><span class="T152">. </span></p><p class="P601"/><p class="P601"/><p class="P601"/><p class="P601"/><ol><li><p class="P602">splitting files</p></li></ol><p class="P91"/><p class="P91"/><p class="P91">The <span class="T7">split</span><span class="T8"> tool can split a file into smaller files using criteria such as size or number of lines. For example we can spilt </span><span class="T42">/etc/passwd </span><span class="T19">into smaller files containing 5 lines each</span></p><p class="P91"/><p class="P91"/><p class="P597"><span class="T120"><img alt="Graphic136" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">split</span><span class="T43"> -l 5 /etc/passwd</span></p><p class="P601"/><p class="P601">This will create files called <span class="T16">xaa</span><span class="T17">, </span><span class="T16">xab</span><span class="T17">, </span><span class="T16">xac</span><span class="T17">, </span><span class="T16">xad</span><span class="T17"> ... each file contains at least 5 lines. It is possible to give a more meaningful prefix name for the files (other than '</span><span class="T16">x'</span><span class="T17">) such as '</span><span class="T16">pass-5.</span><span class="T17">' on the command line </span></p><p class="P91"/><p class="P91"/><p class="P597"><span class="T120"><img alt="Graphic137" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">split -l 5 /etc/passwd passwd-5</span></p><p class="P601"/><p class="Standard"><span class="T152">This has created </span>files identical to the ones above (<span class="T154">aa</span><span class="T155">, </span><span class="T154">xab</span><span class="T155">, </span><span class="T154">xac</span><span class="T155">, </span><span class="T154">xad</span><span class="T155"> ...</span>) but the names are now <span class="T16">passwd-5aa</span>, <span class="T16">passwd-5ab</span>, <span class="T16">passwd-5ac</span>, <span class="T16">passwd-5ad</span> ...</p><p class="P601"/><p class="P601"/><p class="P601"/><p class="P601"/><ol><li><p class="P603">Erasing consecutive duplicate lines</p></li></ol><p class="P601"/><p class="P601">The <span class="T7">uniq</span><span class="T8"> </span><span class="T8">tool will send to STDOUT only one version of consecutive identical lines. Consider the following example:</span></p><p class="P91"/><p class="P597"><span class="T120"><img alt="Graphic138" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">uniq</span><span class="T43"> &gt; /tmp/UNIQUE</span></p><p class="P604">line 1</p><p class="P604">line 2</p><p class="P604">line 2</p><p class="P604">line 3</p><p class="P604">line 3</p><p class="P604">line 3</p><p class="P604">line 1</p><p class="P604">^D</p><p class="P605"/><p class="P601">The file <span class="T16">/tmp/UNIQUE</span><span class="T17"> has the following content:</span></p><p class="P91"/><p class="P597"><span class="T120"><img alt="Graphic139" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">cat /tmp/UNIQUE</span></p><p class="P604"><span class="T7">line 1</span></p><p class="P606">line 2</p><p class="P606">line 3</p><p class="P606">line 1</p><p class="P607"/><table><caption>Table198</caption><tr><td>NOTICE</td></tr><tr><td>From the example above we see that when using uniq non consecutive identical lines are still printed to STDOUT. What is the content of /tmp/UNIQUE if we first send the STDIN through sort (see p.95) as follows:</td></tr><tr><td> sort | uniq &gt; /tmp/UNIQUE</td></tr></table><p class="P608"/><p class="P608"/></section><section class="3. Manipulating text"><title>3. Manipulating text</title><p class="P162"/><p class="P162">The following tools modify text layouts. </p><p class="P162"/><ol><li><p class="P609">choosing fields and characters with cut</p></li></ol><p class="P162"/><p class="P170"><span class="T23">The </span><span class="T31">cut</span><span class="T23"> utilility can extract a range of characters or fields from each line of a text.</span></p><p class="P162"/><p class="P170"><span class="T23">The </span><span class="T31">&#8211;c</span><span class="T23"> option is used to manipulate characters.</span></p><p class="P162"/><p class="P162">Syntax:</p><p class="P162"/><table><caption>Table60</caption><tr><td>cut &#8211;c {range1,range2}</td></tr></table><p class="P170"/><p class="P162">Example</p><p class="P162"/><p class="P611"><span class="T120"><img alt="Graphic58" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">cut &#8211;c5-10,15- /etc/password</span></p><p class="P612"/><p class="P162"/><p class="P162">The example above outputs characters 5 to 10 and 15 to end of line for each line in /etc/password.</p><p class="P162"/><p class="P170"><span class="T23">One can specify the field delimiter (a space, a commas etc ...) of a file as well as the fields to output. These options are set with the </span><span class="T31">&#8211;d</span><span class="T23"> and </span><span class="T31">&#8211;f</span><span class="T23"> flags respectively. </span></p><p class="P162"/><p class="P162">Syntax:</p><p class="P162"/><table><caption>Table61</caption><tr><th>cut -d {delimiter} -f {fields}</th></tr></table><p class="P91"/><p class="P91">Example</p><p class="P91"/><p class="P611"><span class="T120"><img alt="Graphic59" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">cut -d: -f 1,7 --output-delimiter=" " /etc/passwd</span></p><p class="P612"/><p class="Standard"><span class="T23">This outputs fields 1</span><span class="T156">st</span><span class="T23"> and 7</span><span class="T156">th</span><span class="T23"> of /etc/passwd delimited with a space. The default </span><span class="T81">output-delimiter</span><span class="T23"> is the same as the original input delimiter. The </span><span class="T31">--output-delimiter</span><span class="T23"> option allows you to change this.</span></p><p class="P91"/><p class="P91"/><p class="P91"/><ol><li><p class="P614">joining and pasting text</p></li></ol><p class="P162"/><p class="P170"><span class="T23">The easiest utility is </span><span class="T30">paste</span><span class="T30">,</span><span class="T23"> which concatenates two files next to each other.</span></p><p class="P162"/><p class="P162">Syntax:</p><p class="P162"/><table><caption>Table62</caption><tr><th>paste text1 text2</th></tr></table><p class="P91"/><p class="P91"/><p class="P91">With <span class="T55">join</span> you can further specify which fields you are considering.</p><p class="P91"/><p class="P91">Syntax:</p><p class="P91"/><table><caption>Table63</caption><tr><th>join -j1 {field_num} -j2{field_num} text1 text2 orjoin -1 {field_num} -2{field_num} text1 text2 </th></tr></table><p class="P47"/><p class="P162">Text is sent to stdout only if the specified fields match. Comparison is done one line at a time and as soon as no match is made the process is stopped even if more matches exist at the end of the file. </p><p class="P162"/><p class="P162"/><p class="P162"/><ol><li><p class="P615">sorting output</p></li></ol><p class="P162"/><p class="P170"><span class="T23">By default, </span><span class="T30">sort</span><span class="T23"> will arrange a text in alphabetical order. To perform a numerical sort use the </span><span class="T30">-n</span><span class="T23"> option.</span></p><p class="P162"/><p class="P162"/><p class="P162"/><p class="P162"/><ol><li><p class="P616">formatting output with fmt and pr</p></li></ol><p class="P162"/><p class="P170"><span class="T23">You can modify the number of characters per line of output using </span><span class="T30">fmt</span><span class="T23">. By default </span><span class="T30">fmt</span><span class="T23"> will concatenate lines and output 75 character lines. </span></p><p class="P162"/><p class="P170"><span class="T158">fmt </span><span class="T23">options</span></p><table><caption>Table64</caption><tr><th>-w number of characters per line-s split long lines but do not refill -u place one space between each word and two spaces at the end of a sentence</th></tr></table><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="Standard">Long files can be paginated to fit a given size of paper with the <span class="T7">pr</span><span class="T8"> utility. </span>One can control the page length (default is 66 lines) and page width (default 72 characters) as well as the number of columns. </p><p class="Standard"/><p class="Standard">When outputting text to multiple columns each column will be evenly truncated across the defined page width. This means that characters are dropped unless the original text is edited to avoid this. </p><p class="Standard"/><p class="Standard"/><ol><li><p class="P617">translating characters</p></li></ol><p class="P162"/><p class="P170"><span class="T23">The </span><span class="T30">tr</span><span class="T23"> utility translates one set of characters into another.</span></p><p class="P162"/><p class="P162"/><p class="P162">Example changing uppercase letters into lowercase</p><table><caption>Table65</caption><tr><th>tr 'A-B' 'a-b' &lt; file.txt</th></tr></table><p class="P91"/><p class="Standard"><span class="T23">Replacing delimiters in </span><span class="T30">/etc/passwd</span><span class="T23">:</span></p><p class="P91"/><p class="P618"><span class="T120"><img alt="Graphic60" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T43">tr ':' ' ' &lt; /etc/passwd</span></p><p class="P619"/><p class="P620"/><p class="P170"><span class="T29">Notice</span><span class="T23">: </span><span class="T30">tr</span><span class="T23"> has only </span><span class="T30">two arguments</span><span class="T23">! The file is not an argument.</span></p><p class="P621"/></section><section class="4. Exercises and Summary"><title>4. Exercises and Summary</title><p class="P622"/><p class="P170"><span class="T53">Review </span><span class="T53">Questions</span> (answers p.150)</p><p class="P622"/><p class="P623">Yes or No</p><p class="P622"/><p class="P170"><span class="T48">1. The commands '</span><span class="T62">cat FILE</span><span class="T48"> ' and '</span><span class="T62">cat &lt; FILE</span><span class="T48"> ' will both display the contents of </span><span class="T62">FILE_____</span></p><p class="P622"/><p class="P622">2. The command '<span class="T13">last FILE</span> ' will display the 10 last lines of FILE_____</p><p class="P622"/><p class="P622">3. When altering lines from a file using <span class="T7">cut</span><span class="T8"> those changes are made on the STDOUT only_____</span></p><p class="P624"/><p class="P624">4. When running <span class="T7">uniq</span> against a file consecutive identical lines are deleted in the file_____</p><p class="P624"/><p class="P622"/><p class="P625">Commands</p><p class="P622"/><table><caption>Table199</caption><tr><td>Command</td><td>Description (apropos)</td></tr><tr><td>cat </td><td>cat(1) &#8211; concatenate files and print on the standard output</td></tr><tr><td>cut</td><td>cut(1) &#8211; remove sections from each line of files</td></tr><tr><td>expand </td><td>expand(1) &#8211; convert tabs to spaces</td></tr><tr><td>fmt</td><td>fmt(1) &#8211; simple optimal text formatter</td></tr><tr><td>head</td><td>head(1) &#8211; output the first part of files</td></tr><tr><td>join</td><td>join(1) &#8211; join lines of two files on a common field</td></tr><tr><td>nl </td><td>nl(1) &#8211; number lines of files</td></tr><tr><td>od</td><td>od(1) &#8211; dump files in octal and other formats</td></tr><tr><td>paste</td><td>paste(1) &#8211; merge lines of files</td></tr><tr><td>sort</td><td>sort(1) &#8211; sort lines of text files</td></tr><tr><td>split</td><td>split(1) &#8211; split a file into pieces</td></tr><tr><td>tac</td><td>tac(1) &#8211; concatenate and print files in reverse</td></tr><tr><td>tail</td><td>tail(1) &#8211; output the last part of files</td></tr><tr><td>tr</td><td>tr(1) &#8211; translate or delete characters</td></tr><tr><td>unexpand</td><td>unexpand(1) &#8211; convert spaces to tabs</td></tr><tr><td>uniq</td><td>uniq(1) &#8211; remove duplicate lines from a sorted file</td></tr><tr><td>wc</td><td>wc(1) &#8211; print the number of bytes, words, and lines in files</td></tr></table><p class="P622"/><p class="P622"/><p class="P622"/><p class="P625">Exercises</p><p class="P622"/><p class="P170"><span class="T44">1.</span><span class="T45"> Use </span><span class="T44">cat</span><span class="T45"> to enter text into a file called </span><span class="T159">message</span><span class="T45">. </span></p><p class="P626"/><p class="P352"><span class="T13">cat &gt;&gt; message </span></p><p class="P627">line 1</p><p class="P352"><span class="T13"/><span class="T160">^</span><span class="T13">D</span> </p><p class="P352"/><p class="P352">Do the same but use the keyword STOP instead of the predefined eof control (^D).</p><p class="P352"/><p class="P352"/><p class="P352"><span class="T13">cat &gt;&gt; message &lt;&lt; STOP</span></p><p class="P627">line 2</p><p class="P627">STOP</p><p class="P626"/><p class="P170"><span class="T45">Next, append text to </span><span class="T159">message</span><span class="T45"> using </span><span class="T44">echo</span><span class="T45">.</span></p><p class="P628"/><p class="P170"><span class="T45"/><span class="T161">echo line 3 &gt;&gt; message</span></p><p class="P629"/><p class="P170"><span class="T44">2.</span><span class="T45"> Create a file called </span><span class="T159">index</span><span class="T45"> with two fields </span><span class="T159">REFERENCE</span><span class="T45"> and </span><span class="T159">TITLE</span><span class="T45"> separated by a space.</span></p><p class="P630"><span class="T45">e.g</span><span class="T43">001Using_Linux</span></p><p class="P626"/><p class="P170"><span class="T45">Create a second file </span><span class="T159">pricing </span><span class="T45">with two fields </span><span class="T159">REFERENCE</span><span class="T45"> and </span><span class="T159">PRICE</span><span class="T45"> separated by a space </span></p><p class="P630"><span class="T45">e.g</span><span class="T43">0019.99</span></p><p class="P170"><span class="T45">Use </span><span class="T44">join</span><span class="T45"> to display the reference, title and prices fields. </span></p><p class="P629"/><p class="P170"><span class="T44">3.</span><span class="T45"> Using </span><span class="T44">tr </span><span class="T45">replace all colons by semi-colons in </span><span class="T159">/etc/passwd</span><span class="T45">.</span></p><p class="P170"><span class="T45">Do the same using </span><span class="T44">cut</span><span class="T45">.</span></p><p class="P629"/><p class="P170"><span class="T44">4.</span><span class="T45"> Use </span><span class="T44">head</span><span class="T45"> and </span><span class="T44">tail</span><span class="T45"> to list lines 70 to 85 of </span><span class="T159">/var/log/messages.</span></p><p class="P352"/><p class="P170"><span class="T31">5.</span><span class="T23"> Use the </span><span class="T30">cut </span><span class="T23">utility together with</span><span class="T30"> grep</span><span class="T23"> and </span><span class="T30">ifconfig</span><span class="T23"> to printout only the IP address of the first </span></p><p class="P162">network interface eth0.</p><p class="P631"/><p class="P632">6.<span class="T8"> In </span>/tmp <span class="T8">make a directory called </span><span class="T42">files</span></p><p class="P633"/><p class="P167"><span class="T13">mkdir /tmp/files</span> </p><p class="P633"/><p class="P167">Create 50 files in that directory:</p><p class="P634"/><p class="P635">#!/bin/bash</p><p class="P635">count=0</p><p class="P635">while [ $count -lt 50 ]; do</p><p class="P635">touch /tmp/files/$count.txt</p><p class="P635">let count+=1</p><p class="P635">done</p><p class="P636"/><p class="P167">We want to change all the <span class="T7">txt</span> extensions to <span class="T7">dat</span> extentions. For this we need to type the following on the command line:</p><table><caption>Table139</caption><tr><td>for FILES in $(ls *.txt) </td></tr><tr><td>do</td></tr><tr><td>FILENAME=$(echo $FILES| cut -d. -f1)</td></tr><tr><td>mv $FILES $FILENAME.dat</td></tr><tr><td>done</td></tr></table><p class="P170"/></section></section><section class="Software Installation"><title>Software Installation</title><p class="P143"/><p class="P577"/><p class="P577"/><p class="P217">Prerequisites</p><p class="P218"/><p class="P218"> The Command Line (p.56)</p><p class="P218"/><p class="P218"/><p class="P217">Goals</p><p class="P218"/><p class="P218">Understand the use of a Makefile when compiling large projects from source</p><p class="P218">Manipulate source archives effectively and run the appropriate build commands </p><p class="P218">Fix problems related to shared (or dynamic) libraries</p><p class="P218">Use the RPM package manager to query, add, remove, update or verify software</p><p class="P218"/><p class="P218"/><p class="P302">Contents</p><p class="P72"/><p class="P578"/><p class="P143"/><p class="P639"/><section class="1. Introduction"><title>1. Introduction</title><p class="P143"/><p class="P143"/><p class="P143">We begin with a short code example. Although we don&#8217;t need an advanced understanding of the C language, these examples can help trouble shoot common situations.</p><p class="P640"/><p class="P640"/><p class="P296"><span class="T162">The main.c file</span>:</p><p class="P296"/><p class="P641">#include&lt;stdlib.h&gt;</p><p class="P641"/><p class="P641">int main(){</p><p class="P641">Hello();</p><p class="P641">}</p><p class="P241"/><p class="P241"/><p class="P640"/><p class="P642"><span class="T51">The Hello.c file</span>:</p><p class="P642"/><p class="P643">#include&lt;stdio.h&gt;</p><p class="P643"/><p class="P643">void Hello(){</p><p class="P643">printf(&#8220;Hi ! \n&#8221;);</p><p class="P643">}</p><p class="P143"/><p class="P143"/><p class="Standard"><span class="T45">Notice that the </span><span class="T43">main.c</span><span class="T45"> is incomplete in the sense that the Hello() function is undefined. In the same way </span><span class="T43">Hello.c</span><span class="T45"> doesn&#8217;t have a &#8220;main&#8221; declaration. So these files are interdependent. One can however compile </span><span class="T44">object</span><span class="T45"> files (.o) which are like non-executable binary files which can be used to &#8216;build&#8217; an application.</span></p><p class="P143"/><p class="P143"/><p class="P143"/><p class="Standard"><span class="T163">Compiling the object files</span><span class="T159">:</span></p><p class="P642"/><table><caption>Table66</caption><tr><td>gcc &#8211;c main.cgcc &#8211;c Hello.c</td></tr></table><p class="P241"/><p class="Standard"><span class="T45">This will generate two files </span><span class="T43">main.o</span><span class="T45"> and </span><span class="T43">Hello.o</span><span class="T45"> which can now be used to build the application </span><span class="T44">app</span><span class="T45">.</span></p><p class="P143"/><p class="P143"/><p class="P143"/><p class="Standard"><span class="T163">Compiling </span><span class="T164">app</span><span class="T159">:</span></p><p class="P642"/><table><caption>Table67</caption><tr><td>gcc &#8211;o app main.o Hello.o</td></tr></table><p class="P241"/><p class="Standard"><span class="T45">The </span><span class="T165">&#8211;o</span><span class="T44"> </span><span class="T45">option simply specifies a name for the compiled code. If no name is specified the compiled output is called </span><span class="T44">a.out</span><span class="T45"> by default.</span></p><p class="P143"/><p class="Standard"><span class="T45">All these steps can be automated using a </span><span class="T44">Makefile</span><span class="T45">. Here is a minimal Makefile which would compile the </span><span class="T44">app </span><span class="T45">executable.</span></p><p class="P143"/><p class="P143"/><p class="P640">Makefile</p><p class="P640"/><p class="P644">SHELL = /bin/sh</p><p class="P644">CC = /usr/bin/gcc</p><p class="P644">app: main.o Hello.o</p><p class="P644">$(CC) &#8211;o app main.o Hello.o</p><p class="P644">main.o: main.c</p><p class="P644">$(CC) &#8211;c main.c</p><p class="P644">Hello.o: Hello.c</p><p class="P644">$(CC) &#8211;c Hello.c</p><p class="P143"/><p class="P143"/></section><section class="2. Static and Shared Libraries "><title>2. Static and Shared Libraries </title><p class="P143"/><p class="Standard"><span class="T45">Functions that will often be used are archived as libraries. During compilation these libraries can be </span><span class="T87">linked</span><span class="T45"> to the code which uses the library function calls. The library can either be </span><span class="T87">statically</span><span class="T45"> or </span><span class="T87">dynamically</span><span class="T45"> linked to the code. </span></p><p class="P143"/><p class="Standard"><span class="T45">The </span><span class="T144">gcc</span><span class="T45"> compiler can link libraries in a variety a ways (many options). However by default it will link files that are given on the commandline that don&#8217;t have a </span><span class="T144">.c</span><span class="T45"> extention (only the </span><span class="T144">.c</span><span class="T45"> files are treated as code). </span></p><p class="P143"/><p class="P547">Listing 1: Linking by default</p><p class="P547"/><table><caption>Table68</caption><tr><td>gcc main.c Hello.o</td></tr></table><p class="P143"/><p class="P143"/><p class="Standard"><span class="T45">This will produce an </span><span class="T144">a.out</span><span class="T45"> executable with the Hello.o object statically linked to it.</span></p><p class="P143"/><p class="P143">Illustration of a statically linked application (a.out):</p><p class="P143"/><p class="P143"/><p class="P143">
    <p/>
   </p><p class="P143"/><p class="P143"/><p class="P143">
    <p/>
   </p><p class="P143">
    <p/>
    <p>Hello.o</p>
   </p><p class="P143"/><p class="P143"/><p class="P143">
    <p/>
    <p>a.out</p>
   </p><p class="P143"/><p class="P143"/><p class="P645"/><p class="P214">&#9679; Static libraries</p><p class="P143"/><p class="Standard"><span class="T45">Static libraries are archived </span><span class="T144">.o</span><span class="T86"> </span><span class="T45">files. These archives are created with the </span><span class="T144">ar</span><span class="T45"> tool and have a </span><span class="T144">.a </span><span class="T45">extention. </span></p><p class="P143"/><p class="P143"/><p class="P547">Listing2: adding an object file to an archive:</p><p class="P547"/><table><caption>Table69</caption><tr><td>ar rcs libfoo.a file1.o file2.o</td></tr></table><p class="P143"/><p class="P143"/><p class="P143"/><p class="P214">&#9679; Dynamic/Shared Libraries</p><p class="P143"/><p class="Standard"><span class="T45">A shared library is a library that will be loaded by the program when it is executed. One also says that the library is </span><span class="T87">dynamically loaded</span><span class="T45">.</span></p><p class="P547"/><p class="P547"/><p class="P547">Listing 3: Creating a shared library:</p><p class="P547"/><table><caption>Table70</caption><tr><td>gcc &#8211;c &#8211;fPIC Hello.c creates the object filegcc &#8211;shared &#8211;W1,soname,libfoo.so.1 &#8211;o libfoo.so.1.0 Hello.o</td></tr></table><p class="P143"/><p class="Standard"><span class="T45">The </span><span class="T43">&#8211;fPIC</span><span class="T45"> flag enables the Position Independent Code generation.</span></p><p class="P143"/><p class="P143"/><p class="P547">Listing4: Compiling with a shared library:</p><p class="P547"/><table><caption>Table71</caption><tr><td>gcc main.c libfoo.so.1.0</td></tr></table><p class="P143"/><p class="Standard"><span class="T45">This will produce an </span><span class="T86">a.out</span><span class="T45"> executable. However if you try to run this it will complain with the error message listed below. </span></p><p class="P143"/><p class="P143">Illustration of a dynamically linked application (a.out):</p><p class="P143"/><p class="P143"/><p class="P143">
    <p/>
   </p><p class="P143"/><p class="P143">
    <p/>
   </p><p class="P143">
    <p/>
    <p>libfoo.so</p>
   
    <p/>
   </p><p class="P143"/><p class="P143"/><p class="P143"/><p class="P143">
    <p/>
    <p>a.out</p>
   </p><p class="P143"/><p class="P645"/><p class="P143"/><p class="P143">The process of attaching a dynamic library at run-time is called linking and is handled by the ld.so library. How does the linker know where to find libfoo.so?</p><p class="P143"/><p class="P143"/><p class="P143"/><p class="Standard"><span class="T87">Shared library not found error:</span><span class="T45"> </span></p><p class="P143"/><p class="P143"/><p class="P649"/><p class="P270"><span class="T43">./a.out: error while loading shared libraries: </span><span class="T144">libfoo.so.1.0</span><span class="T43">: cannot open shared object file: No such file or directory </span></p><p class="P649"/><p class="P143"/><p class="P143">This error illustrates the case where the linker could not find the dynamic library libfoo.so.1.0. In the next section we will see what can be done to fix this problem. </p><p class="P645"/><p class="P645"/><p class="P645"/><p class="P214">&#9679; Shared Library naming and dynamic loading</p><p class="P143"/><p class="P143">We will use the above example to understand how Linux libraries are maintained. </p><p class="P143"/><p class="P650"><img alt="Graphic67" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000000000002D00000021C6839A26B.png"/></p><p class="P645"/><p class="P645">Figure 1: The Shared Library Names</p><p class="P143"/><p class="P296"><span class="T60">To find out which shared libraries an executable needs at execution time the </span><span class="T167">ldd</span><span class="T167"> </span><span class="T60">tool is used.</span></p><p class="P143"/><p class="P547">Example:</p><p class="P143"/><table><caption>Table72</caption><tr><td> ldd a.out&#9658;libfoo.so.1.0 =&gt; not foundlibc.so.6 =&gt; /lib/libc.so.6 (0x40028000)/lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)</td></tr></table><p class="P143"/><p class="P296"><span class="T60">Notice that </span><span class="T168">libfoo.so.1.0</span><span class="T60"> is not found. This is because the </span><span class="T167">a.out</span><span class="T60"> needs to dynamically load this library and the dynamic linker </span><span class="T167">ld.so</span><span class="T60"> is not aware of this new library.</span></p><p class="P143"/><p class="P143">In fact the linker uses a database called the <span class="T42">ldcache </span><span class="T19">containing entries </span>of the form:</p><p class="P143"/><p class="P650">soname =&gt;/path/to/library</p><p class="P143"/><p class="P143"/><p class="P143">The content of the ld-cache can be viewed with the following command:</p><p class="P296"/><table><caption>Table157</caption><tr><td>  ldconfig -p</td></tr><tr><td>&#9658; libaudiofile.so.0 (libc6) =&gt; /usr/lib/libaudiofile.so.0</td></tr><tr><td>libaudiofile.so (libc6) =&gt; /usr/lib/libaudiofile.so</td></tr><tr><td>libaudio.so.2 (libc6) =&gt; /usr/X11R6/lib/libaudio.so.2</td></tr><tr><td>libattr.so (libc6) =&gt; /usr/lib/libattr.so..........</td></tr></table><p class="P143"/><p class="P143"/><p class="Standard"><span class="T45">The ld-cache is generated at boot time by the same </span><span class="T44">ldconfig</span><span class="T45"> tool. By default </span><span class="T44">ldconfig</span><span class="T45"> will scan the directories </span><span class="T44">/lib </span><span class="T46">and </span><span class="T44">/usr/lib</span><span class="T46"> to build the ld-cache. </span></p><p class="P299"/><p class="P299"/><p class="P299"/><p class="Standard"><span class="T46">If libraries are installed in different locations (e.g </span><span class="T44">/usr/local/lib</span><span class="T46">, </span><span class="T44">/opt/lib</span><span class="T46"> or </span><span class="T44">/usr/X11R6/lib</span><span class="T46">) these directories need to be listed in </span><span class="T44">/etc/ld.so.conf</span><span class="T46"> allowing </span><span class="T44">ldconfig</span><span class="T46"> to take these directories into consideration when building the cache.</span></p><p class="P143"/><p class="P143"/><p class="Standard"><span class="T44">What happens when an application is started?</span><span class="T45"> </span></p><p class="P143"/><p class="P143">The application will ask the linker for the dynamic libraries it needs using a soname, the linker will then query the ld-cache and associate this name with the full path to the actual library. Once the full path is known the linker can link the library to the application.</p><p class="P143"/><p class="P143"/><p class="P143"><span class="T7">What happens if the ld-cache doesn't contain the full path to the library?</span> </p><p class="P143"/><p class="Standard"><span class="T45">In general the application will fail to start and will print an error message saying &#8220; </span><span class="T43">cannot open shared object file: No such file or directory</span><span class="T45"> &#8220;. But one can also define a global variable called </span><span class="T45">LD_LIBRARY_PATH</span><span class="T45"> </span><span class="T45">and assign to this variable the name of the directory containing the library.</span></p><p class="P143"/><p class="P143"/><p class="P143">Knowing this we can now fix the problem with our application above using one of the tw0 methods below:</p><p class="P143"/><p class="P143">1. If the binary needs to be temporary tested define the LD_LIBRARY_PATH variable as follows:</p><p class="P143"/><p class="P143"/><table><caption>Table136</caption><tr><td> export LD_LIBRARY_PATH=$(pwd)</td></tr></table><p class="P645"/><p class="P645"/><p class="Standard"><span class="T45">2. If you are root and would like the library to be available for all then copy the </span><span class="T144">libfoo.so.1.0 </span><span class="T45">file to </span><span class="T144">/usr/local/lib/</span><span class="T45"> and run </span><span class="T144">ldconfig</span><span class="T45"> to update the ld cache.</span></p><p class="P143"/><p class="P143"/><p class="P653"/><p class="P654"><span class="T45">The GNU specification advises libraries to be stored in </span><span class="T144">/usr/local/lib</span><span class="T45">. These guidelines are followed by developers and most tarballed code will install libraries in that directory and the binaries in </span><span class="T144">/usr/local/bin</span><span class="T45">. Installing and removing this code from the system would be done by ¨make install¨ and ¨make uninstall¨.</span></p><p class="P653"/><p class="P143"/><p class="P143"/><p class="P655"/><p class="P656"><span class="T45">The FHS (Filesystem Hierarchy Standard) recommends libraries be kept in </span><span class="T144">/usr/lib/</span><span class="T86"> </span><span class="T45">and associated binaries in </span><span class="T144">/usr/bin/</span><span class="T45">. This convention standard is adhered to by Linux distributions. In effect mature and stable code is stored in </span><span class="T144">/usr/</span><span class="T45"> rather than </span><span class="T144">/usr/local/</span><span class="T45"> and the two standards do not lead to any contradictions. Installing and removing this code code would be done using the rpm command.</span></p><p class="P655"/><p class="P143"/><p class="P143"/><p class="P143"/><table><caption>Table137</caption><tr><td>NOTICE</td></tr><tr><td>With certain distributions the /usr/local/lib/ directory is not scanned by ldconfig. It is simply a matter of adding this directory to /etc/ld.so.conf and ... reboot?</td></tr></table><p class="P143"/><p class="P658"/><p class="P658"/><p class="P658"/></section><section class="3. Source Distribution Installation"><title>3. Source Distribution Installation</title><p class="P143"/><p class="P143">Open source projects are often distributed as tarballs (i.e compressed tarred archives). Many development environments (glade, kdevelop&#8230;) generate the files that help facilitate compiling and installation of a project.</p><p class="P143"/><p class="P143"/><p class="P215">Uncompressed Archives </p><p class="P659"/><p class="P143">Uncompressed archives have a <span class="T7">.tar</span><span class="T8"> extension. For example if a project has been developed in a directory called </span><span class="T7">my-projetc-v.1/</span><span class="T171"> then the following command would archive this directory with all its files and subdirectories:</span></p><p class="P605"/><table><caption>Table165</caption><tr><td>tar c my-project-v.1/ &gt; my-project-v.1.tar</td></tr></table><p class="P605"/><p class="P605">or </p><p class="P605"/><table><caption>Table166</caption><tr><td>tar cf my-project-v.1.tar my-project-v.1/</td></tr></table><p class="P605"/><p class="P143">Since most projects are very large and are available for download from the Internet they are rarely uncompressed. </p><p class="P143"/><p class="P143"/><p class="P215">Compression</p><p class="P659"/><p class="P143">The three compression tools commonly used are <span class="T7">compress</span><span class="T7"> </span><span class="T8">(old), </span><span class="T7">gzip</span><span class="T8"> and </span><span class="T7">bzip2</span><span class="T8">. Unlike the windows </span><span class="T7">zip</span> these compressions can only be applied to files. But since an archive is a file that contains all the data needed to recover directories, these compressions are suitable for archives. A compressed archive is then called a tarball. </p><p class="P143"/><table><caption>Table167</caption><tr><td>compression tool</td><td>de-compression tool</td><td>cat decompression</td><td>file extension</td></tr><tr><td>compress</td><td>uncompress</td><td>zcat</td><td>.Z</td></tr><tr><td>gzip</td><td>gunzip</td><td>zcat</td><td>.gz</td></tr><tr><td>bzip2</td><td>bunzip2</td><td>bzcat</td><td>.bz2</td></tr></table><p class="P661"/><p class="P661"/><p class="P662">Examples</p><p class="P661"/><table><caption>Table169</caption><tr><td>compress -v FILE1</td></tr><tr><td>FILE1: -- replaced with FILE1.Z Compression: 40.29%</td></tr><tr><td>gzip -v FILE2</td></tr><tr><td>FILE2: 53.4% -- replaced with FILE2.gz</td></tr><tr><td>bzip2 -v FILE3</td></tr><tr><td>FILE3: 2.326:1, 3.439 bits/byte, 57.01% saved, 605504 in, 260320 out.</td></tr></table><p class="P661"/><p class="P661"/><p class="P661"/><table><caption>Table168</caption><tr><td>NOTICE</td></tr><tr><td>1. When compressing a file, the original file name is appended a .Z,.gz or .bz2 2. Compression tools listed above only work on files and not on directories3. Only one file at a time can be compressed (no wild cards!) </td></tr></table><p class="P661"/><p class="P661"/><p class="P666">The <span class="T7">zcat</span> and <span class="T7">bzcat</span> tools can be used to decompress files, however the decompressed file will be sent to STDOUT so it is necessary to use a file redirection:</p><p class="P666"/><p class="P666"/><table><caption>Table170</caption><tr><td> zcat FILE1.Z &gt; FILE1</td></tr></table><p class="P666"/><p class="P662"/><p class="P662"/><p class="P665">Archives and Compression</p><p class="P666"/><table><caption>Table171</caption><tr><td>compression tool</td><td>tar switch</td><td>archive extension</td></tr><tr><td>compress</td><td>Z</td><td>.tar.Z or .tgZ</td></tr><tr><td>gzip</td><td>z</td><td>.tar.gz or .tgz</td></tr><tr><td>bzip2</td><td>j</td><td>.tar.bz2</td></tr></table><p class="P666"/><p class="P666"/><p class="P666">The table above introduces the <span class="T7">tar</span> options Z,z and j which call the appropriate compression tools when needed. </p><p class="P666"/><p class="P666"/><p class="P666">The next two examples are equivalent:</p><p class="P605"/><table><caption>Table172</caption><tr><td>tar cf my-project-v.1.tar my-project-v.1/bzip2 my-project-v.1.tar</td></tr></table><p class="P607"/><p class="P605"/><table><caption>Table173</caption><tr><td>tar cjf my-project-v.1.tar.bz2 my-project-v.1/</td></tr></table><p class="P607"/><p class="P666"/><p class="P666"/><p class="P665">Working with tarballs</p><p class="P666"/><p class="P666">We know how to create archives. All we need is an overview of the main <span class="T7">tar</span> switches.</p><p class="P666"/><table><caption>Table174</caption><tr><td>tar operations</td><td>Create</td><td>Extract</td><td>Test</td></tr><tr><td>minimal switches</td><td>c or cf</td><td>xf</td><td>tf</td></tr><tr><td>optional switches</td><td>v,Z,z,j</td><td>v,Z,z,j</td><td>v,Z,z,j </td></tr></table><p class="P666"/><p class="P666"/><p class="P666"/><p class="P666"/><p class="P666">Examples (extractions)</p><p class="P666"/><table><caption>Table175</caption><tr><td>tar xvjf myproject-v.1.tar.bz2</td></tr><tr><td>tar xzf some-other-project-v.2.0.tar.gz</td></tr></table><p class="P666"/><p class="P666"/><p class="P666">Examples (tests)</p><p class="P666"/><table><caption>Table176</caption><tr><td>tar tjf myproject-v.1.tar.bz2</td></tr><tr><td>tar tzf some-other-project-v.2.0.tar.gz</td></tr></table><p class="P666"/><p class="P666"/><p class="P666">Alternative Examples (using <span class="T7">zcat</span> and <span class="T7">bzcat</span>)</p><p class="P666"/><table><caption>Table177</caption><tr><td>bzcat myproject-v.1.tar.bz2 | tar xf -</td></tr><tr><td>zcat some-other-project-v.2.0.tar.gz | tar tf -</td></tr></table><p class="P666"/><p class="P666"/><p class="P666"/><p class="P666"/><p class="P661">Common Files</p><p class="P143"/><p class="P143">Once a project has been extracted you can expect to find the following files:</p><p class="P648"/><p class="P648"/><p class="P296"><span class="T176">configure</span><span class="T60">: This is a script which determines what architecture is being used. It also checks that the required compiler, libraries an headers are present. This information is then stored in files called </span><span class="T140">Makefile</span></p><p class="P143"/><p class="P296"><span class="T60">The safest way to run the script is to use &#8216;</span><span class="T25">./configure</span><span class="T60">&#8217;.</span></p><p class="P143"/><p class="Standard"><span class="T45">You can also decide where the project will be installed using the </span><span class="T161">&#8211;-prefix</span><span class="T45"> option. The default installation directory for most projects is </span><span class="T44">/usr/local</span><span class="T46">. If you want to install the compiled project in your home directory you should type:</span></p><p class="P143"/><p class="P605"/><table><caption>Table257</caption><tr><td> ./configure &#8211;prefix=$HOME</td></tr></table><p class="P297"/><p class="P143"/><p class="P143"/><p class="Standard"><span class="T177">Makefile</span><span class="T45">: This acts like a configuration file for the </span><span class="T44">make</span><span class="T45"> utility. The main information provided is:</span></p><p class="P669">- The name of the compiler and compiling options</p><p class="P669">- The path to the shared libraries and header files</p><p class="P143">- Mapping between code files (.c) and object files (.o)</p><p class="P661"/><p class="P661"/><p class="P661"/><p class="P661"/><p class="P661">Compiling the project</p><p class="P659"/><p class="P143">If the files above are present then there is a good chance that you will successfully &#8216;port&#8217; the program to your computer. Here are the routine steps:</p><p class="P143"/><table><caption>Table73</caption><tr><td>./configuremakemake install </td></tr></table><p class="Standard"/><p class="P143">It is strongly recommended to run <span class="T7">./configure</span> and <span class="T7">make</span> as a non root user.</p><p class="Standard"><span class="T43">make install</span><span class="T45"> must be run as root only if the installation directories are write protected (/usr/ or /usr/local). </span></p><p class="P143"/><p class="Standard"><span class="T45">There are many options to the </span><span class="T44">./configure </span><span class="T45">script. To customise your installation you could type </span></p><p class="P215"/><p class="P143"><span class="T12">./</span><span class="T12">configure &#8211;-help</span> </p><p class="P143"/><p class="P143"/></section><section class="4. The RedHat Package Manager RPM "><title>4. The RedHat Package Manager RPM </title><p class="P143"/><p class="P143">Most Linux distributions manage software using some form of package management to perform tasks such as installations, updates and queries. The most popular package types are Debian and RPM. We only cover RPM in this manual. </p><p class="P143"/><p class="P650"><img alt="Graphic69" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/10000000000002D00000021C92A8C153.png"/></p><p class="P642"/><p class="P642">The Functions of a Package Manager</p><p class="Standard"/><p class="Standard"/><p class="Standard"/><p class="P95">Package naming</p><p class="P143"/><p class="P143">There is no strict convention but most rpm package names are formed as follows:</p><p class="P670"/><p class="Standard"><span class="T178"/><span class="T159">name-version-release.architecture.rpm</span><span class="T45"> </span></p><p class="P143"/><p class="P143">The architecture name can either indicate which computer architecture the enclosed binaries are made for (e.g i386, ppc, ia64, noarch) or it can indicate that the package contains the source code (src).</p><p class="P143"/><p class="P143"/><p class="P95">Major and minor modes</p><p class="P143"/><p class="P143">Some short name options are similar but perform different actions depending on their position on the command line. A distinction is made between the first option and other options. </p><p class="P143"/><p class="Standard"><span class="T45">The first option given to </span><span class="T44">rpm</span><span class="T46"> is in major mode. For example in </span><span class="T107">rpm -iv A.rpm</span> the option 'i' is a major option and will cause package <span class="T16">A</span><span class="T17"> to be installed.</span></p><p class="P509"/><p class="Standard"><span class="T17">Similarly an option that is not in first position is in minor mode. For example in </span><span class="T179">rpm -qpi A.rpm</span> the option '<span class="T17">i'</span> is a minor mode and will get information from the package <span class="T16">A</span><span class="T17"> such as the author and the licence type.</span> </p><p class="P299"/><p class="P143">These are the major mode options for <span class="T7">rpm</span>.</p><p class="P143"/><table><caption>Table74</caption><tr><td>Short</td><td>Long</td><td>Description</td></tr><tr><td>-i</td><td>&#8211;install</td><td>Installs the package</td></tr><tr><td>-U</td><td>&#8211;update</td><td>Updates or installs a package</td></tr><tr><td>-F</td><td>--freshen</td><td>Updates only installed package</td></tr><tr><td>-V</td><td>--verify</td><td>file size, MD5, permissions, type ...</td></tr><tr><td>-q</td><td>--query</td><td>Queries installed/uninstalled packages, and files</td></tr><tr><td>-e</td><td>&#8211;erase</td><td>Uninstall package</td></tr></table><p class="Standard"/><p class="Standard"/><p class="P143">These are the minor mode options for <span class="T7">rpm</span>.</p><p class="P41"/><table><caption>Table125</caption><tr><td>Short</td><td>Description</td></tr><tr><td>a</td><td>applies to all installed packages</td></tr><tr><td>c</td><td>together with q lists configuration files</td></tr><tr><td>d</td><td>together with q lists documentation files</td></tr><tr><td>f</td><td>together with q queries which package installed a given file </td></tr><tr><td>h</td><td>adds hashes while processing</td></tr><tr><td>i</td><td>together with q lists information about a package </td></tr><tr><td>l</td><td>together with q lists all files and directories in a package</td></tr><tr><td>p</td><td>together with q specifies that the query is performed on the package file </td></tr><tr><td>v</td><td>verbose</td></tr></table><p class="P41"/><p class="P41"/><p class="P95">Query modes</p><p class="P642"/><p class="P642">Three query types: uninstalled packages, installed packages and files</p><p class="P143"/><table><caption>Table78</caption><tr><td>Query Type</td><td>Option</td></tr><tr><td>Package file</td><td>-qp</td></tr><tr><td>Installed package</td><td>-q</td></tr><tr><td>File</td><td>-qf</td></tr></table><p class="P671"/><p class="P671">An extra option will allow you to get information on all installed files <span class="T7">&#8211;l</span>, documentation <span class="T7">&#8211;d</span> configuration files <span class="T7">&#8211;c</span>, etc ... </p><p class="P484"/><p class="P484"/><p class="Standard"><span class="T45">We consider for example the package </span><span class="T44">routed-0.17.i386.rpm</span><span class="T45">. We can query this package and list its contents before installation with the </span><span class="T44">l</span><span class="T45"> option as follows:</span></p><p class="P375"/><table><caption>Table75</caption><tr><td>rpm &#8211;qpl routed-0.17.i386.rpm </td></tr></table><p class="P143"/><p class="P143"/><p class="P143">Once this package is install we can query the installed package with:</p><p class="P375"/><table><caption>Table76</caption><tr><td>rpm &#8211;ql routed-0.17 orrpm &#8211;ql routed </td></tr></table><p class="P143"/><p class="P143"/><p class="Standard"><span class="T45">Finally if we want to find out which package installed the file </span><span class="T44">/usr/sbin/routed</span><span class="T45"> the rpm database can be queried with:</span></p><p class="P143"/><table><caption>Table77</caption><tr><td>rpm &#8211;qf /usr/sbin/routed </td></tr></table><p class="P143"/><p class="P143"/><p class="P143"/><p class="P95">Special Options</p><p class="P143"/><p class="Standard"><span class="T44">--nodeps</span><span class="T45">install a package regardless of dependencies</span></p><p class="Standard"><span class="T44">--force </span><span class="T45">force an upgrade</span></p><p class="Standard"><span class="T44">--test</span><span class="T45">doesn&#8217;t actually install or upgrade, just prints to stdout</span></p><p class="P215">--requires <span class="T8">PACKAGE</span><span class="T8">together with </span>q<span class="T8"> lists capabilities required by a package </span></p><p class="P215">--whatrequires<span class="T8">CAPABILITYtogether with </span>q<span class="T8"> lists packages which require the capability</span></p><p class="P143"/><p class="P143"/><p class="P143"/><p class="P215">Package Signatures</p><p class="P143"/><p class="P143">You can check the signature of each package that is distributed as part of a project. For example to load the keys of all the developers involved with the Fedora project do the following (just once):</p><p class="P143"/><table><caption>Table164</caption><tr><td>rpm &#8211;-import /usr/share/rhn/RPM-GPG-KEY-fedora</td></tr></table><p class="P143"/><p class="P143"/><p class="P143">You can now download any package from an FTP site which mirrors the project's RPMs. For example we downloaded <span class="T7">zlib-1.2.1.1-2.1.i386.rpm</span> from ftp.mirror.ac.uk in the Fedora subdirectory. We next check the authenticity of the file:</p><p class="P143"/><p class="P143"/><table><caption>Table163</caption><tr><td>rpm --checksig /home/adrian/zlib-1.2.1.1-2.1.i386.rpm</td></tr><tr><td>/home/adrian/zlib-1.2.1.1-2.1.i386.rpm: (sha1) dsa sha1 md5 gpg OK</td></tr></table><p class="P143"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P215">Package Integrity</p><p class="P143"/><p class="P143">The next command checks the integrity of the package <span class="T7">bash</span><span class="T8">:</span></p><p class="P143"/><table><caption>Table191</caption><tr><td>rpm &#8211;V bash</td></tr></table><p class="P299"/><p class="P299">This returns nothing. We next do the following as user root:</p><p class="P143"/><table><caption>Table192</caption><tr><td>chown bin /bin/bash chmod 775 /bin/bash</td></tr></table><p class="P299"/><p class="P143">If we check the integrity of <span class="T7">bash </span><span class="T8">again this time we get:</span></p><p class="P143"/><table><caption>Table193</caption><tr><td>rpm &#8211;V bash.M...U.. /bin/bash</td></tr></table><p class="P299"/><p class="Standard"><span class="T45">The package manager has compared the current status of all files </span><span class="T46">which are part of the </span><span class="T44">bash </span><span class="T46">package with</span><span class="T45"> the known original state of these files stored in a database. The changes made to </span><span class="T44">/bin/bash</span><span class="T46"> have been identified. </span></p><p class="P299"/><p class="Standard"><span class="T46">It is possible to verify the integrity of all packages installed on the system by adding the '</span><span class="T44">a</span><span class="T46">' (</span><span class="T181">--all</span><span class="T46">) option after '</span><span class="T44">V</span><span class="T46">' (</span><span class="T181">--verify</span><span class="T46">) </span></p><p class="P299"/><p class="Standard"><span class="T46">The &#8211;</span><span class="T181">verify</span> option performs a number of tests on each file; when a test is positive a number of characters (listed below) are used to identify the errors:</p><p class="Standard"/><p class="Standard"/><table><caption>Table194</caption><tr><td>Returned character</td><td>Error description </td></tr><tr><td>.</td><td>the test was successful</td></tr><tr><td>?</td><td>the test couldn't be performed</td></tr><tr><td>S</td><td>file size has changed</td></tr><tr><td>M</td><td>permission mode or file type has changed </td></tr><tr><td>5</td><td>the file's MD5 sum has changed </td></tr><tr><td>D</td><td>device major/minor number miss-match</td></tr><tr><td>L</td><td>broken symbolic link</td></tr><tr><td>U</td><td>the user owner of the file has changed</td></tr><tr><td>G</td><td>the group owner of the file has changed</td></tr><tr><td>T</td><td>the mtime (modified time) has changed</td></tr></table><p class="P143"/><p class="P214"/><p class="P214"/><p class="P214"/><p class="P214"/><p class="P214"/><p class="P214"/><p class="P214"/><p class="P214"/><p class="P214">Going Further: Building RPM packages (<span class="T16">not for LPI exam purpose</span>)</p><p class="P143"/><table><caption>Table141</caption><tr><td>NOTICE:</td></tr><tr><td>This is additional information, this paragraph is not an LPI 101 objective. When doing this section you may encounter problems with the &#8211;-rebuild option, this is due to the fact that the new versions of RPM use rpmbuild instead of rpm when rebuilding packages. </td></tr></table><p class="P143"/><p class="P143">The source code for many RPM packages is also available as an RPM package and will be used to build a binary package. The naming convention is:</p><p class="P143"/><p class="P375">name-version-release.src.rpm</p><p class="P143"/><p class="P143">These packages contain at least two files, the tarball with the code and a spec file. The spec file contains instructions to patch, compile and build the RPM package. If the code needs to be patched before compilation then the patches are included in the source package.</p><p class="P143"/><p class="Standard"><span class="T45">There are three different ways to build a RPM package. We will assume that we have a package called </span><span class="T43">name-version-release.src.rpm</span><span class="T45">.</span></p><p class="P143"/><p class="P670"><span class="T60">For these methods to work you first need to install the </span><span class="T128">rpm-build</span><span class="T60"> package</span></p><p class="P642"/><p class="Standard"><span class="T163">Method 1</span><span class="T45">:</span></p><p class="P143"/><p class="P143">Install the RPM source package with:</p><p class="P484"/><table><caption>Table79</caption><tr><td>rpm &#8211;ivh name-version-release.src.rpm</td></tr></table><p class="P642"/><p class="P143"/><p class="P143">This will copy files to the following directories:</p><p class="P375">/usr/src/redhat/SPECS</p><p class="P241">/usr/src/redhat/SOURCES</p><p class="P484"/><p class="P484"/><p class="P484"/><p class="Standard"><span class="T45">In the </span><span class="T43">/usr/src/redhat/SPECS</span><span class="T45"> directory there is now a file called </span><span class="T44">name.spec</span><span class="T45"> (where &#8216;name&#8217; is the name of the package). To start building the compiled package, that is </span><span class="T44">name-version-release.i386.rpm</span><span class="T45">, we type in the following command:</span></p><p class="P143"/><table><caption>Table80</caption><tr><td>rpm &#8211;ba name.spec</td></tr></table><p class="P375"/><p class="P143"/><p class="Standard"><span class="T45">This will start a series of scripts. The tarball in </span><span class="T43">/usr/src/redhat/SOURCES</span><span class="T45"> will be unpacked in </span><span class="T43">/usr/src/redhat/BUILD</span><span class="T45">. </span></p><p class="P143"/><p class="Standard"><span class="T45">If the compilation succeeds then the built binary package will be saved in </span><span class="T43">/usr/src/redhat/RPMS/</span><span class="T45">. There are different subdirectories corresponding to various CPU models/generations. If the compilation didn&#8217;t involve specific features from these chips then the package will be saved in the </span><span class="T43">noarch</span><span class="T45"> directory.</span></p><p class="P143"/><p class="P143"/><p class="Standard"><span class="T163">Method 2</span><span class="T45">: </span></p><p class="P484"/><p class="P143">This method triggers the same chain of events as the previous one but is started with the following single command:</p><p class="P143"/><table><caption>Table81</caption><tr><td>rpm &#8211;-rebuild name-version-release.src.rpm</td></tr></table><p class="P375"/><p class="P143"/><p class="P143"/><p class="Standard"><span class="T163">Method 3</span><span class="T45">:</span></p><p class="P143"/><p class="Standard"><span class="T45">In some cases developers will distribute a tarball together with a </span><span class="T159">spec</span><span class="T45"> file. If the tarball is called </span><span class="T43">name-version-release.tar.gz</span><span class="T45"> you can search for a .spec file with the following:</span></p><p class="P143"/><table><caption>Table82</caption><tr><td>tar tzvf name-version-release.tar.gz | grep .spec</td></tr></table><p class="P375"/><p class="P143"/><p class="P143">If the tarball has a spec file then you can build an RPM package by typing:</p><p class="P143"/><table><caption>Table83</caption><tr><td>rpm &#8211;bt name-version-release.tar.gz</td></tr></table><p class="P156"/><p class="P156"/></section><section class="5. Debian Package Management"><title>5. Debian Package Management</title><p class="Standard"/><p class="Standard">Systems using Debian based variants of Linux don't use the rpm package management system, but rather the Debian Package Management system. The Debian system is more rigorous and configurable than the rpm system, but for historical reasons is less widely used.</p><p class="Standard"/><p class="Standard">The approach used by the the Debian system is very similar to that used by the rpm system. The equivalent command to 'rpm' in a Debian system is '<span class="T7">dpkg</span>'.</p><p class="Standard"/><p class="P95">Package Naming</p><p class="P95"/><p class="P83">Similarly to RPM-based system, Debian packages come in files whose names are formed as follows:</p><p class="P83"/><p class="P276"><span class="T178"/><span class="T159">name_version-release_architecture.deb</span><span class="T45"> </span></p><p class="P299"/><p class="P299">The release number indicates which Debian release of the version of the software the package contains, while the architecture name specifies the computer architecture (i386, sparc, all).</p><p class="Standard"/><p class="P678">dpkg</p><p class="P679">dpkg is a medium-level tool to install, build, remove and manage Debian packages. Other front-end packages are more commonly used to contol <span class="T85">dpkg, </span><span class="T8">including the </span><span class="T7">apt</span><span class="T8"> tools and others such as </span><span class="T7">dselect</span><span class="T8">. </span><span class="T7">dpkg</span> itself is controlled via command line parameters, which consist of an action and zero or more options. The action parameter tells dpkg what to do and options control the behaviour of the action in some way.</p><p class="P679"><span class="T85">dpkg</span> maintains some usable information about available packages. The information is divided in three classes: <span class="T85">states</span>, <span class="T85">selection states</span> and <span class="T85">flags</span>.</p><p class="P95">Package States</p><p class="P95"/><table><caption>Table238</caption><tr><td>State</td><td>Description </td></tr><tr><td>installed</td><td>The package is unpacked and configured OK.</td></tr><tr><td>half-installed</td><td>The installation of the package has been started, but not completed for some reason. </td></tr><tr><td>not-installed</td><td>The package is not installed on your system.</td></tr><tr><td>unpacked</td><td>The package is unpacked, but not configured. </td></tr><tr><td>half-configured</td><td>The package is unpacked and configuration has been started, but not yet completed for some reason.</td></tr><tr><td>config-files</td><td>Only the configuration files of the package exist on the system.</td></tr></table><p class="P681"/><p class="P682"/><p class="P95">Package Flags</p><p class="P95"/><table><caption>Table239</caption><tr><td>Flag</td><td>Description </td></tr><tr><td>hold</td><td>A package marked to be on hold is not handled by dpkg, unless forced to do that with option &#8211;force-hold.</td></tr><tr><td>reinst-required </td><td>A package marked reinst-required is broken and requires reinstallation. These packages cannot be removed, unless forced with option --force-reinstreq.</td></tr></table><p class="P684"/><p class="P95"/><p class="P95">Actions</p><p class="P95"/><p class="P83">The heart of dpkg operation is the command line parameters specifying the action which should be performed. While there are a large number of these, the following table summarises the main actions you are likely to require on any regular basis.</p><p class="P95"/><table><caption>Table240</caption><tr><td>Action</td><td>Description </td></tr><tr><td>-l</td><td>Prints a list of the packages installed on the system, or matching a pattern if any is given. The first three characters on each line show the state, selection state, and flags of the package</td></tr><tr><td>-s</td><td>Shows the status and information about particular installed package(s)</td></tr><tr><td>-I</td><td>Show information about a package in a .deb file</td></tr><tr><td>-L</td><td>List the files included in a package</td></tr><tr><td>-S</td><td>Show the package which includes the file specified</td></tr><tr><td>-i</td><td>Install (or upgrade) and configure a package from a .deb file</td></tr><tr><td>--unpack</td><td>Unpack (only) a package in a .deb file</td></tr><tr><td>--configure</td><td>Configure an unpacked package. With -a (or --pending) configures all packages requiring configuration</td></tr><tr><td>-r</td><td>Remove a package (but leave its configuration files)</td></tr><tr><td>-P</td><td>Purge &#8211; remove a package along with its configuration files</td></tr><tr><td>--get-selections</td><td>Get a list of package selections from a system (to stdout)</td></tr><tr><td>--set-selections</td><td>Set the list of package selections for a system (from stdin)</td></tr></table><p class="List Heading"/><p class="List Heading"/><p class="P95">Options</p><p class="P95"/><p class="Text body">All options can be specified both on the commandline and in the <span class="T85">dpkg</span> configuration file <span class="T182">/etc/dpkg/</span><span class="T182">dpkg.cfg</span>. Each line in the configuration file is either an option (exactly the same as the commandline option but without leading dashes) or a comment (if it starts with a <span class="T85">#</span>). </p><table><caption>Table241</caption><tr><td>Option</td><td>Description </td></tr><tr><td>-force-thing</td><td>Forces dpkg to perform an action which it would normally not take (for example, to ignore dependency information - --force-depends, or to downgrade a package with &#8211;force-downgrade)</td></tr><tr><td>--refuse-thing</td><td>Refuse to do something which dpkg would normally automatically do</td></tr><tr><td>--ignore-depends</td><td>Ignore dependency checking for a package</td></tr><tr><td>--no-act</td><td>Show what dpkg would do, but don't do it (also: --simulate)</td></tr><tr><td>-R</td><td>Recurse through directories (using with -i or --unpack)</td></tr></table><p class="P685"/><p class="P685"/><p class="P95">Files</p><p class="P95"/><p class="P83"><span class="T7">dpkg </span>uses a number of files in its operation, including <span class="T41">/etc/dpkg/</span><span class="T41">dpkg.cfg</span> which contains default configuration settings. </p><p class="P83"/><p class="P83">Lists of available packages along with their statuses are held in the files </p><p class="P83"><span class="T41">/</span><span class="T41">var/lib/dpkg/</span><span class="T41">available</span><span class="T16"> </span>and <span class="T7">/</span><span class="T41">var/lib/dpkg/status</span>. </p><p class="P83"/><p class="P83">A <span class="T7">.deb</span> file, along with the files making up a packages programs, libraries and configuration, will also include a number of control files which allow the execution of scripts before and after installation and removal, along with lists of files and configuration files. These can be found in the <span class="T41">/var/lib/dpkg/info</span> directory once the packages are installed.</p><p class="List Heading"/><p class="List Contents"/><p class="P95">Use of dpkg</p><p class="P95"/><p class="P83">To install a package from a .deb file, you could use dpkg as follows:</p><p class="P375"/><table><caption>Table242</caption><tr><td>dpkg &#8211;i hello_2.1.1-4_i386.deb ORdpkg --unpack hello_2.1.1-4_i386.debdpkg --configure hello</td></tr></table><p class="P143"/><p class="Text body">To remove the hello package along with its configuration, you could use:</p><p class="P375"/><table><caption>Table243</caption><tr><td>dpkg &#8211;P hello</td></tr></table><p class="P143"/><p class="P143">While:</p><p class="P375"/><table><caption>Table244</caption><tr><td>dpkg &#8211;r hello</td></tr></table><p class="P143"/><p class="P143">would remove only the package, leaving its configuration files installed.</p><p class="P143"/><p class="P143">The get a list of all the packages installed on the system, use the command:</p><p class="P375"/><table><caption>Table245</caption><tr><td>dpkg &#8211;l</td></tr></table><p class="P143"/><p class="Text body">Note that when dealing with a package file, the filename is given, while when dealing with an installed package, the package name only is given.<br/><br/><span class="T7">APT</span></p><p class="P690">The <span class="T7">dpkg </span>tool is fine for installing individual packages with no dependencies, but when installing a number of packages which may have dependencies, the APT tool is generally used instead. </p><p class="P690"/><p class="P690"/><p class="P690">APT is one of the strengths of dpkg, and provides an easy way of installing and updating a system. It is controlled by two files:</p><table><caption>Table246</caption><tr><td>File</td><td>Description </td></tr><tr><td>/etc/apt/apt.conf</td><td>Contains general configuration options for APT, such as which release of Debian to install, whether/which proxy settings to use, etc</td></tr><tr><td>/etc/apt/sources</td><td>Lists sources of Debian files, which may be on CDs, or on the network</td></tr></table><p class="Standard"/><p class="Standard">In general, to use APT you must first configure the sources it is to used. This can be done (if you are using CDs) by using the command:</p><p class="P375"/><table><caption>Table247</caption><tr><td>apt-setup</td></tr></table><p class="P143"/><p class="P143">which asks the user to choose which mirror to download from, and tests it, or if you are using CDs, using:</p><p class="P375"/><table><caption>Table248</caption><tr><td>apt-cdrom</td></tr></table><p class="P143"/><p class="P143">which allows individual CDROMs to be scanned for packages.</p><p class="P143"/><p class="P143">Once APT knows where the Debian packages are located, two command line tools are used for package management: <span class="T7">apt-cache </span>and <span class="T7">apt-get</span>.</p><p class="P143"/><p class="P215">apt-cache</p><p class="P143"/><p class="P143"><span class="T7">apt-cache </span>allows manipulation of the APT package cache (which is stored in files in <span class="T41">/var/cache/apt</span>). An action normally follows apt-cache on the command line, and common options include:</p><p class="P143"/><p class="P143"/><table><caption>Table249</caption><tr><td>Action</td><td>Description</td></tr><tr><td>search</td><td>Search all the available package descriptions for the string given, and print a short description of the matching package</td></tr><tr><td>show</td><td>Shows a full description of the package specified</td></tr></table><p class="P143"/><p class="P215">apt-get</p><p class="P143"/><p class="P143"><span class="T8">While </span><span class="T7">apt-cache</span><span class="T8"> is useful for finding out information about available packages, </span><span class="T7">apt-get</span> allows updating of package information, retrieval, installation and removal of packages, and even upgrading of an entire Debian distribution. apt-get expects an action to be provided on the command line, and the most common are listed below:</p><p class="P143"/><table><caption>Table250</caption><tr><td>Action</td><td>Description</td></tr><tr><td>update</td><td>Update the list of packages from the sources in /etc/apt/sources.list</td></tr><tr><td>install package</td><td>Install the package(s) specified, along with any dependencies</td></tr><tr><td>upgrade</td><td>Upgrade any packages which have newer versions available</td></tr><tr><td>dist-upgrade</td><td>Upgrade entire distribution to the latest release (best to read the release notes first!)</td></tr><tr><td>remove</td><td>Remove the package(s) specified</td></tr></table><p class="P143"/><p class="P143"/><p class="P143"/><p class="P215">Use of APT</p><p class="P143"/><p class="P143">The two main uses of APT are for updating the system (for example if security-related updates have become available). This is normally done using the two commands:</p><p class="P241"/><table><caption>Table251</caption><tr><td>apt-get update apt-get upgrade</td></tr></table><p class="P143"/><p class="P143">The other main use of APT is to install required packages. This normally involves the following commands:</p><p class="P143"/><p class="P241"/><table><caption>Table252</caption><tr><td>apt-get update #update list of packagesapt-cache search frob #find packages relating to frobbingapt-cache show frobnicate #show information regarding a particular packageapt-get install frobnicate #install frobnicate package and its dependencies</td></tr></table><p class="P143"/><p class="P143"/></section><section class="6. The Alien Tool"><title>6. The Alien Tool</title><p class="P143"/><p class="Standard"><span class="T45">The </span><span class="T44">alien</span><span class="T45"> tool will change Debian packages into RedHat ones and vice versa. One can download it at: </span><link title="" href="http://kitenet.net/programs/">http://kitenet.net/programs/</link> </p><p class="Standard"/><p class="Standard">Convert a debian package to an rpm:</p><p class="Standard"/><table><caption>Table254</caption><tr><td> alien &#8211;to-rpm package.deb</td></tr></table><p class="Standard"/><p class="Standard">Convert an rpm package to debian:</p><p class="Standard"/><table><caption>Table255</caption><tr><td> alien &#8211;to-debian package.rpm</td></tr></table><p class="Standard"/><p class="Standard"/><p class="Standard"/></section><section class="7. Exercises and Summary"><title>7. Exercises and Summary</title><p class="P143"/><p class="P143"/><p class="P292"><span class="T44">Review </span><span class="T44">Questions</span> (answers p.150)</p><p class="P143"/><p class="P648">Yes or No</p><p class="P143"/><p class="Standard"><span class="T45">1. When building a project from source one has to compile</span> sections of the code in the </p><p class="Standard">correct order using <span class="T7">gcc</span><span class="T8"> on the command line_____</span></p><p class="P83"/><p class="P83">2. The program <span class="T7">make </span>will only build a project if it is started in a directory containing </p><p class="P83">the appropriate Makefile_____</p><p class="P83"/><p class="P83">3. Pre-compiled binary packages and source code packages are two types of RPM </p><p class="P83">packages_____</p><p class="P83"/><p class="P83"/><p class="Standard"><span class="T8">4. Once shared libraries have been installed from source it is recommended to run </span><span class="T7">ldconfig</span>_____</p><p class="Standard"/><p class="P83">5. The <span class="T7">ldconfig</span> tool is used to update the ld-cache_____</p><p class="P83"/><p class="P83">6. Program installed from source can be queried using a package manager_____</p><p class="P143"/><p class="P143">7. The APT tools can install packages and resolve all dependencies_____ </p><p class="P143"/><p class="P143"/><p class="P215">Glossary</p><p class="P299"/><p class="P299"/><table><caption>Table190</caption><tr><td>Term</td><td>Description</td></tr><tr><td>build</td><td>term used when compiling a project from source, usually started by typing make </td></tr><tr><td>compile</td><td>translate programming instructions written in a high-level language into machine readable code. The output of a compilation is called the object code </td></tr><tr><td>dynamic library shared library static library</td><td/></tr><tr><td>high-level language</td><td>a programming language readable by humans used to write source code</td></tr><tr><td>linker</td><td>1. program used during the compilation process to assemble objects generated by the compiler into an executable &#8211; see ld(1)2. program that dynamically loads shared libraries needed by an executable at runtime &#8211; see ld.so(8)</td></tr><tr><td>object code</td><td>the output of a compilation. Object code is either an executable or may be linked to another object code to form an executable </td></tr><tr><td>source code</td><td>programming instructions written in a high-level language that need to be compiled with a compiler or interpreted with an interpreter</td></tr><tr><td>tarball</td><td>a compressed tar archive</td></tr></table><p class="P143"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P215">Files</p><p class="P299"/><table><caption>Table195</caption><tr><td>File </td><td>Description</td></tr><tr><td>/etc/ld.so.conf</td><td>configuration file for ldconfig</td></tr><tr><td>Makefile</td><td>file read by the make utility when building a project</td></tr><tr><td>/etc/rpmrc</td><td>used by rpm and rpmbuild (see LPI 201), this file contains information such as the system's architecture or the path to macros and utilities used when handling packages. This file is often located in the /usr/lib/rpm/ directory</td></tr><tr><td>/usr/lib/rpm/</td><td>directory containing all the macros needed when handling packages </td></tr><tr><td>/var/lib/rpm/</td><td>directory where databases for the package manager (RPM) are kept</td></tr></table><p class="Standard"/><p class="P95">Commands</p><p class="P83"/><table><caption>Table196</caption><tr><th>Command</th><th>Description</th></tr><tr><td>alien</td><td>alien(1) &#8211; Convert or install an alien binary package. It converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another Linux distribution than the one installed on your system you can use alien to convert it to your preferred package format and install it</td></tr><tr><td>APT tools</td><td>Tools used to perform advanced operations on Debian packages located on a CD or a server </td></tr><tr><td>configure</td><td>script often included with a project source code used to create makefiles. It attempts to determine information such as the system's CPU type or installed components needed to build the project(compiler, header files or libraries). </td></tr><tr><td>dpkg</td><td>tool used to manipulate packages in the DEBIAN format</td></tr><tr><td>LD_LIBRARY_PATH </td><td>environment variable containing the search path to shared libraries used by the linker (ld.so) </td></tr><tr><td>ldconfig</td><td>program that builds the 'ldcache' used by the linker to find shared libraries, with the -p flag it will print the current content of the cache</td></tr><tr><td>ldd</td><td>ldd(1) &#8211; prints the shared libraries required by each program or shared library specified on the command line</td></tr><tr><td>make</td><td>info make &#8211; The `make' utility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them.</td></tr><tr><td>rpm</td><td>tool used to manipulate packages in the RPM format</td></tr></table><p class="Standard"/><p class="P143"/><p class="P143"/><p class="P215">Exercises</p><p class="P143"/><p class="P143">In the following examples download a source RPM file (e.g. bash-2.05-8.src.rpm for RedHat 7.2) from www.rpmfind.net.</p><p class="P143"/><p class="Standard"><span class="T44">1. </span><span class="T45">Installing as a tarball. </span></p><p class="P143"/><p class="P669">- Extract the contents of the RPM package without compiling anything with:</p><p class="P375"/><p class="P375">rpm &#8211;ivh bash-2.05-8.src.rpm</p><p class="P143"/><p class="Standard"><span class="T45">- In the </span><span class="T43">/usr/src/redhat/SOURCES</span><span class="T45"> directory, unpack the tarball with:</span></p><p class="P143"/><p class="P375">tar xvzf bash-2.05-8.tar.gz </p><p class="P143"/><p class="P143"/><p class="Standard"><span class="T45">- </span><span class="T177">Optional (recommended!)</span><span class="T45">: The patches can be applied. Depending on which directory you are in the syntax will vary.</span></p><p class="Standard"><span class="T45">From </span><span class="T43">/usr/src/redhat/SOURCES:</span></p><p class="P143"/><p class="Standard"><span class="T45"/><span class="T43">patch &#8211;p0 &#8211;b &lt; </span><span class="T132">file</span><span class="T43">.patch</span></p><p class="P143"/><p class="P156"><span class="T45">From </span><span class="T43">/usr/src/redhat/SOURCES/bash-2.05-8</span></p><p class="P375"/><p class="P156"><span class="T43">patch &#8211;p1 &#8211;b &lt; </span><span class="T132">file.</span><span class="T43">patch</span></p><p class="P143"/><p class="Standard"><span class="T45">- We will choose to install the files in a temporary root directory, for example </span><span class="T44">/tmp/project-test</span><span class="T46">/. On a production system the usual location should be</span><span class="T107"> /usr/local</span><span class="T46">. We create this directory:</span></p><p class="P299"/><p class="P143"><span class="T8"/><span class="T12">mkdir /tmp/project-test</span> </p><p class="Standard"/><p class="Standard">- <span class="T45">Finally follow the usual compilation steps.</span></p><p class="P143"/><p class="P693">./configure &#8211;prefix=/tmp/project-test</p><p class="P647">make</p><p class="P647">make install</p><p class="P143"/><p class="P296"><span class="T60">You can now list the content on </span><span class="T128">/tmp/project-test</span><span class="T58">. </span><span class="T60"/></p><p class="P143"/><p class="P143"/><p class="Standard"><span class="T86">2.</span><span class="T45"> (Going further &#8211; not required for LPI101) We next rebuild the project into an RPM package. </span></p><p class="P669"/><p class="P694"><span class="T45"/><span class="T43">rpm &#8211;-rebuild </span><span class="T184">package</span><span class="T43">.src.rpm</span></p><p class="P143"/><p class="Standard"><span class="T45">The compiled binary package should be in </span><span class="T43">/usr/src/redhat/RPMS</span></p><p class="P694"><span class="T45">- Check the package&#8217;s contents with the </span><span class="T86">&#8211;qpl</span><span class="T45"> option</span></p><p class="P669">- Install the package(s), and run queries on the installed package</p><p class="P669">- Uninstall the package</p><p class="P669"/><p class="P695">3.<span class="T8"> Configure </span><span class="T17">/etc/apt/sources</span><span class="T19"> using </span><span class="T17">apt-setup</span><span class="T19">. Use the APT tools and </span><span class="T17">dpkg </span><span class="T19">to query/install/update available packages. </span><span class="T8"/></p></section></section><section class="Advanced Text Manipulation"><title>Advanced Text Manipulation</title><p class="P143"/><p class="P143"/><p class="P217">Prerequisites</p><p class="P218"/><p class="P218">The Command Line (p.56)</p><p class="P218">Text Processing (p.91)</p><p class="P218"/><p class="P217">Goals</p><p class="P218">Distinguish expressions used for file globbing (metacharacters) and regular expressions</p><p class="P218">Use the <span class="T7">grep</span> tools effectively</p><p class="P218">Understand simple <span class="T7">sed</span> commands </p><p class="P218"/><p class="P218"/><p class="P302">Contents</p><p class="P72"/><p class="P578"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P639"/><p class="P215">Overview</p><p class="P299"/><p class="Standard"><span class="T45">Finding a word or multiple words in a text is achieved using </span><span class="T44">grep</span><span class="T45">, </span><span class="T44">fgrep</span><span class="T45"> or </span><span class="T44">egrep</span><span class="T45">. The keywords used during a search are a combination of letters called </span><span class="T159">regular expressions.</span><span class="T45"> Regular expressions are recognised by many other applications such as </span><span class="T44">sed</span><span class="T45">, and </span><span class="T44">vi</span><span class="T45">.</span></p><p class="P542"/><section class="1. Regular Expressions"><title>1. Regular Expressions</title><p class="P143"/><p class="P215">Traditional Regular Expressions (regex)</p><p class="P143"/><p class="P143">A regular expression is a sequence of characters (or atoms) used to match a pattern. Characters are either constants (treated literally) or metacharacters. </p><p class="P143"/><p class="P642">Table1: Main metacharacters</p><table><caption>Table85</caption><tr><td>Characters</td><td>Search Match</td></tr><tr><td>\&lt;KEY</td><td>Words beginning with &#8216;KEY&#8217;</td></tr><tr><td>WORD\&gt;</td><td>Words ending with &#8216;WORD&#8217;</td></tr><tr><td>^</td><td>Beginning of a line</td></tr><tr><td>$</td><td>End of a line</td></tr><tr><td>[ Range ]</td><td>Range of ASCII characters enclosed</td></tr><tr><td>[^c ]</td><td>Not the character &#8216;c&#8217;</td></tr><tr><td>\[</td><td>Interpret character &#8216;[&#8216; literally </td></tr><tr><td>&#8220;ca*t&#8221;</td><td>Strings containing &#8216;c&#8217; followed by no 'a' or any number of the letter 'a' followed by a 't'</td></tr><tr><td>&#8220;.&#8221;</td><td>Match any single character</td></tr></table><p class="Standard"/><p class="Standard"/><p class="P143"><span class="T7">Extended regex</span><span class="T8">: The</span> main eregex&#8217;s are: +,?,() and | </p><p class="Standard"/><p class="P42">Table2: List of main eregex</p><table><caption>Table138</caption><tr><td>Characters</td><td>Search Match</td></tr><tr><td>"A1|A2|A3"</td><td>Strings containing &#8216;A1&#8217; or &#8216;A2&#8217; or &#8216;A3&#8217;</td></tr><tr><td>"ca+t"</td><td>Strings containing a 'ca' followed by any number of the letter 'a' followed by a 't'</td></tr><tr><td>"ca?t"</td><td>Strings containing &#8216;c&#8217; followed by no 'a' or exactly one 'a' followed by a 't'</td></tr><tr><td>"ca*t"</td><td>Strings containing &#8216;c&#8217; followed by no 'a' or any number of the letter 'a' followed by a 't'</td></tr></table><p class="Standard"/><p class="Standard"/></section><section class="2. The grep family"><title>2. The grep family</title><p class="P565"/><p class="P565"/><p class="P565">basic grep</p><p class="P143"/><p class="Standard"><span class="T45">The </span><span class="T44">grep</span><span class="T44"> </span><span class="T46">utility supports regular expressions </span><span class="T185">regex</span><span class="T45"> such as those listed in </span><span class="T159">T</span><span class="T186">able1</span><span class="T26">.</span></p><p class="P143"/><p class="P565"/><p class="Standard"><span class="T187">egrep</span><span class="T187"> </span></p><p class="P700"/><p class="P700">The <span class="T7">egrep</span> tool supports extended regular expressions <span class="T16">eregex</span><span class="T17"> such as those listed in </span><span class="T16">Table2</span><span class="T17">.</span></p><p class="P565"/><p class="P701"/><p class="P565">fgrep</p><p class="P143"/><p class="Standard"><span class="T45">Fgrep stands for </span><span class="T159">fast grep</span><span class="T188"> and </span><span class="T189">fgrep</span><span class="T190"> interprets strings literally (no regex or eregex support)</span></p><p class="P143"/><p class="P143"/></section><section class="3. Working with grep"><title>3. Working with grep</title><p class="P143"/><p class="P642">Syntax for grep:</p><table><caption>Table87</caption><tr><th>grep PATTERN FILE</th></tr></table><p class="Standard"/><p class="P702"/><table><caption>Table88</caption><tr><td>grep</td><td>Main Options</td></tr><tr><td>-c</td><td>count the number of lines matching PATTERN</td></tr><tr><td>-f</td><td>obtain PATTERN from a file</td></tr><tr><td>-i</td><td>ignore case sensitivity</td></tr><tr><td>-n</td><td>indicate the input file's line number </td></tr><tr><td>-v</td><td>output all line except those containing PATTERN</td></tr><tr><td>-w</td><td>match exact PATTERN</td></tr></table><p class="P296"/><p class="P296"/><p class="P143">For example list all non blank lines in /etc/lilo.conf:</p><p class="P143"/><p class="P704"><span class="T120"><img alt="Graphic73" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T45"/><span class="T43">grep &#8211;v &#8220;^$&#8221; /etc/lilo.conf</span></p><p class="P705"/><p class="P143"/><p class="P143"/></section><section class="4. egrep and fgrep"><title>4. egrep and fgrep</title><p class="P296"/><p class="Standard"><span class="T45">The </span><span class="T44">fgrep</span><span class="T45"> utility does not recognise the special meaning of the regular expressions. For example</span></p><p class="P143"/><p class="P143"/><p class="P704"><span class="T120"><img alt="Graphic74" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T45"/><span class="T43">fgrep</span><span class="T43"> &#8216;cat*&#8217; FILE</span></p><p class="P705"/><p class="P143"/><p class="Standard"><span class="T45">will only match words containing &#8216;cat*&#8217;. The main improvement came from </span><span class="T44">fgrep</span><span class="T45">&#8217;s ability to search from a list of keywords entered line by line in a file, say LIST. The syntax would be</span></p><p class="P143"/><p class="Standard"><span class="T45"/><span class="T43">fgrep &#8211;f LIST FILE</span></p><p class="P143"/><p class="P143"/><p class="Standard"><span class="T45">The </span><span class="T44">egrep</span><span class="T45"> utility will handle any modern regular expressions. It can also search for several keywords if they are entered at the commandline, separated by pipes. For example;</span></p><p class="P143"/><p class="P143"/><p class="P704"><span class="T120"><img alt="Graphic75" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T45"/><span class="T43">egrep &#8220;linux|^image&#8221; /etc/lilo.conf</span></p><p class="P705"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P143"/></section><section class="5. The Stream Editor - sed"><title>5. The Stream Editor - sed</title><p class="P143"/><p class="P143">At this point the stream editor makes its appearance! It is an old type of tool and originally the only one available under UNIX to manipulate text. </p><p class="P143"/><p class="Standard"><span class="T45">The </span><span class="T44">sed</span><span class="T45"> utility is most often used to search and replace patterns in text. It supports most regular expressions. </span></p><p class="P143"/><p class="P143"/><p class="P706">5.1 Beginning sed</p><p class="P143"/><p class="Standard"><span class="T163">Syntax for </span><span class="T164">sed</span></p><p class="P143"/><p class="P707">sed [options] ´command&#8217; [INPUTFILE]</p><p class="P241"/><p class="Standard"><span class="T45">The input file is optional since </span><span class="T44">sed</span><span class="T45"> also works on </span><span class="T159">file redirections </span><span class="T45">and </span><span class="T159">pipes</span><span class="T45">.</span></p><p class="P143">Here are a few examples assuming we are working on a file called MODIF.</p><p class="P542"/><p class="P542"/><p class="P640">Delete all commented lines:</p><p class="P143"/><p class="P708"><span class="T120"><img alt="Graphic76" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T45"/><span class="T43">sed &#8216;/^#/ d &#8217; MODIF </span></p><p class="P709"/><p class="P143"/><p class="P143">Notice that the search pattern is between the double slashs //.</p><p class="P143"/><p class="P143"/><p class="P640">Substitute /dev/hda1 by /dev/sdb3:</p><p class="P640"/><p class="P708"><span class="T120"><img alt="Graphic77" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T45"/><span class="T43">sed &#8216;s</span><span class="T165">/</span><span class="T43">\/dev\/hda1</span><span class="T165">/</span><span class="T43">\/dev\/sdb3</span><span class="T165">/</span><span class="T43">g&#8217; MODIF</span></p><p class="P710"/><p class="P143"/><p class="P143">The <span class="T7">s</span> in the command stands for &#8216;substitute&#8217;. The <span class="T7">g</span> stands for &#8220;globally&#8221; and forces the substitution to take place throughout each line.</p><p class="P143"/><p class="P143"/><p class="P640">If the line contains the keyword KEY then substitute &#8216;:&#8217; with &#8216;;&#8217; globally:</p><p class="P143"/><p class="P708"><span class="T120"><img alt="Graphic78" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T45"/><span class="T43">sed &#8216; /KEY/ s/:/;/g&#8217; MODIF</span></p><p class="P709"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P706">5.2 More Advanced sed</p><p class="P143"/><p class="Standard"><span class="T45">You can issue </span><span class="T44">several commands</span><span class="T45"> each starting with </span><span class="T44">&#8211;e</span><span class="T45"> at the command line. For example, (1) delete all blanks then (2) substitute &#8216;OLD&#8217; by &#8216;NEW&#8217; in the file MODIF</span></p><p class="P143"/><p class="P143"/><p class="P711"><span class="T120"><img alt="Graphic79" src="openOfficeEmbeddedImage/zip-Sernet-LATM-LPI-101-v-0.2-20050712-1243-noXSO.sxw/file-Pictures/100002010000003000000030CC3DEF0C.png"/></span><span class="T120"/><span class="T45"/><span class="T43">sed &#8211;e &#8216;/^$/ d&#8217; -e &#8216;s/OLD/NEW/g&#8217; MODIF</span></p><p class="P177"/><p class="P143"/><p class="P143">These commands can also be written to a file, say COMMANDS. Then each line is interpreted as a new command to execute (no quotes are needed).</p><p class="P642"/><table><caption>Table84</caption><tr><td>An example COMMANDS file</td></tr><tr><td>1 s/old/new/</td></tr><tr><td>/keyword/ s/old/new/g</td></tr><tr><td>23,25 d</td></tr></table><p class="P546"/><p class="P542"/><p class="P143">The syntax to use this <span class="T16">COMMANDS </span><span class="T17">file </span>is:</p><p class="P143"/><p class="Standard"><span class="T45"/><span class="T165">sed -f COMMANDS MODIF</span></p><p class="P241"/><p class="P143">This is much more compact than a very long commandline !</p><p class="P143"/><p class="P93"><span class="T159">Summary of options for </span><span class="T191">sed</span></p><p class="P143"/><table><caption>Table89</caption><tr><td>Commandline flags</td></tr><tr><td>-e Execute the following command</td></tr><tr><td>-f Read commands from a file</td></tr><tr><td>-n Do not printout unedited lines</td></tr></table><p class="P299"/><table><caption>Table96</caption><tr><td>sed commands</td></tr><tr><td>d Delete an entire line</td></tr><tr><td>r Read a file and append to output</td></tr><tr><td>s Substitute</td></tr><tr><td>w Write output to a file</td></tr></table><p class="P143"/><p class="P639"/></section><section class="6. Exercises and Summary"><title>6. Exercises and Summary</title><p class="P143"/><p class="Standard"><span class="T44">Review </span><span class="T44">Questions</span> (answers p.151)</p><p class="P143"/><p class="P143"/><p class="P648">Yes or No</p><p class="P143"/><p class="P143">1. The extended regular expression '<span class="T13">nucle?ar</span>' will match <span class="T13">nuclear</span> and <span class="T13">nuclar</span>____ </p><p class="P143"/><p class="P143">2. The regular expression '<span class="T13">baza*r</span>' will match <span class="T13">bazaar</span> and <span class="T13">bazar</span> but not <span class="T13">bazor</span>____</p><p class="P215"/><p class="Standard"><span class="T46">3. The extended regular expression '</span><span class="T107">nucle+ar</span><span class="T46">' will only match </span><span class="T107">nuclear</span><span class="T46"> </span>____</p><p class="Standard"/><p class="Standard">4. <span class="T45">The regular expression '</span><span class="T161">baza*</span><span class="T45">' will match </span><span class="T161">bazaar,</span><span class="T45"> </span><span class="T161">bazar</span><span class="T45"> and </span><span class="T161">bazor</span><span class="T45">____</span></p><p class="P215"/><p class="P215">Commands</p><p class="P143"/><table><caption>Table226</caption><tr><td>Command</td><td>Description or apropos</td></tr><tr><td>egrep</td><td>print lines containing matching patterns using extended regular expressions </td></tr><tr><td>fgrep</td><td>print lines containing matching patterns using literal stings </td></tr><tr><td>grep</td><td>print lines containing matching patterns using regular expressions </td></tr><tr><td>sed</td><td>sed(1) &#8211; stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline)</td></tr></table><p class="P143"/><p class="P143"/><p class="P143"/><p class="P215">Exercises</p><p class="P143"/><p class="P143">1. Create a new file called FILE containing the lines:</p><p class="P712"/><p class="P712"/><p class="P712">Using grep,</p><p class="P712">fgrep and </p><p class="P712">egrep </p><p class="P712">to grep for 99% of the cats</p><p class="P712">% these are two</p><p class="P712">% commented lines</p><p class="P542"/><p class="P543"><span class="T45">- Use </span><span class="T44">grep</span><span class="T45"> to output only uncommented lines. </span></p><p class="P542"/><p class="P543"><span class="T45">- Find all lines containing &#8216;grep&#8217; exactly. (Not &#8216;egrep&#8217; nor &#8216;fgrep&#8217;.Use </span><span class="T44">-w</span><span class="T45"> to match the word) </span></p><p class="P542"/><p class="P143">- Find lines containing words starting with an &#8216;a&#8217;</p><p class="P143"/><p class="P143">2. Regular expressions. Append the following lines to the previous file:</p><p class="P143">ct</p><p class="P143">cat</p><p class="P143">caats</p><p class="P143">caaatss</p><p class="P143">ca+t</p><p class="P143">ca*t</p><p class="P143">ca?t</p><p class="P143">crate</p><p class="P143">carts</p><p class="P143"/><p class="P143"/><p class="P543"><span class="T45">- Investigate the outcome of the following using </span><span class="T86">grep</span><span class="T45">, </span><span class="T86">egrep </span><span class="T45">and </span><span class="T86">fgrep</span><span class="T45">:</span></p><p class="Standard"><span class="T45"/><span class="T43">grep 'ca+t' FILE </span></p><p class="P693">grep 'ca?t' FILE</p><p class="P647">grep 'ca.t' FILE</p><p class="P647">grep 'caa*t' FILE</p><p class="P213"><span class="T43">grep 'ca*r.' FILE</span> </p><p class="P143"/><p class="P143"/><p class="Standard"><span class="T45">3. Use </span><span class="T44">sed</span><span class="T45"> to do the following changes in FILE</span></p><p class="P143">(use a COMMAND file, then do everything on the commandline)</p><p class="P143">- in the first line substitute &#8216;<span class="T13">grep,</span>&#8217; with &#8216;<span class="T13">soap</span>&#8217;</p><p class="P143">- delete &#8216;<span class="T13">fgrep</span>&#8217; in the second line</p><p class="P143">- substitute &#8216;<span class="T13">egrep</span>&#8217; with &#8216; <span class="T13">water</span>&#8217;</p><p class="P143">- in the fourth line replace &#8216;<span class="T13">grep for</span>&#8217; with '<span class="T13">wash</span>'</p><p class="P543"><span class="T45">Save the result to a file using the </span><span class="T44">w</span><span class="T45"> option</span></p></section></section><section class="Using vi"><title>Using vi</title><p class="P296"/><p class="P714"/><p class="P714"/><p class="P218"><span class="T192">Prerequisites</span>none</p><p class="P218"> </p><p class="P218"/><p class="P217">Goals</p><p class="P218"/><p class="P218">Understand the three operating modes of <span class="T7">vi</span></p><p class="P218">Introduce most common editing commands</p><p class="P218">Recognise the use of regular expressions and <span class="T8">sed-like commands</span></p><p class="P218"/><p class="P302">Contents</p><p class="P72"/><p class="P143"/><p class="P143"/><p class="P143"/><p class="P639"/><p class="P143">In most Linux distributions <span class="T55">vi</span> is the text editor of choice. It is considered an essential admin tool such as <span class="T55">grep</span> or <span class="T55">cat </span>and is found therefore in the <span class="T55">/bin</span> directory.</p><p class="P296"/><section class="1. vi Modes"><title>1. vi Modes</title><p class="P143"/><p class="P143">In order to perform complex operations such as copy/paste <span class="T55">vi</span> can operate in different modes. </p><p class="P143"/><p class="P123">&#9679; Command mode</p><p class="P123"/><p class="Standard"><span class="T45">This is the editing and navigation mode. Commands are often just a letter. For example use </span><span class="T86">j</span><span class="T45"> to jump to the next line. </span></p><p class="Standard"><span class="T45">As a rule of thumb if you want to perform an operation several times you can precede the command by a number. For example </span><span class="T86">10j</span><span class="T45"> will jump 10 lines.</span></p><p class="P143"/><p class="P143">In some situations the arrow keys on the keyboard are not mapped properly, it is still possible to navigate using the commands <span class="T7">h j k l</span><span class="T8"> with the following effect:</span></p><p class="P299"/><p class="P299">
     <p class="P39"><span class="T85"/><span class="T85">h</span><span class="T85"/><span class="T85"/><span class="T85">j</span><span class="T85"/><span class="T85"/><span class="T85">k</span><span class="T85"/><span class="T85"/><span class="T85">l</span><span class="T85"/></p>
    
     <p/>
    
     <p/>
    
     <p/>
    
     <p/>
    
   </p><p class="P299"/><p class="P299"/><p class="P659"/><p class="P659"/><p class="P659"/><p class="P659"/><p class="P123">&#9679; Last Line (or column) Mode</p><p class="P718"/><p class="Standard"><span class="T45">You