Page 189 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 189

Unit 10: File System




                                                                                                notes
                                     figure 10.2: Directory structure



















          One important difference between the legacy operating system and Unix/Linux is that Linux
          does not employ the concept of drive letters. While drive letters split the file system into a series
          of different trees (one for each drive), Linux always has a single tree. Different storage devices
          may contain different branches of the tree, but there is always a single tree.




              Task    Analyse most graphical environments today include a file manager program
             to view and manipulate the contents of the file system.

          Since a command line interface cannot provide graphic pictures of the file system structure, it
          must have a different way of representing it. Think of the file system tree as a maze, and you are
          standing in it. At any given moment, you stand in a single directory. Inside that directory, you
          can see its files and the pathway to its parent directory and the pathways to the subdirectories of
          the directory in which you are standing.
          The directory you are standing in is called the working directory. To find the name of the working
          directory, use the pwd command.

          When you first log on to a Linux system, the working directory is set to your home directory.
          This is where you put your files. On most systems, your home directory will be called /home/
          your_user_name, but it can be anything according to the whims of the system administrator.

          To list the files in the working directory, use the ls command.
          To change your working directory (where you are standing in the maze) you use the cd command.
          To do this, type cd followed by the pathname of the desired working directory. A pathname is
          the route you take along the branches of the tree to get to the directory you want. Pathnames can
          be specified in one of two different ways; absolute pathnames or relative pathnames. Let’s deal
          with absolute pathnames first.
          An absolute pathname begins with the root directory and follows the tree branch by branch until
          the path to the desired directory or file is completed. For example, there is a directory on your
          system in which programs are installed for the X window system. The pathname of the directory
          is /usr/X11R6/bin. This means from the root directory (represented by the leading slash in the
          pathname) there is a directory called “usr” which contains a directory called “X11R6” which
          contains a directory called “bin”.
          Now we can see that we have changed the current working directory to /usr/X11R6/bin and
          that it is full of files. Notice how your prompt has changed? As a convenience, it is usually set up
          to display the name of the working directory.





                                           LoveLy professionaL university                                   183
   184   185   186   187   188   189   190   191   192   193   194